[resent to list]
On the index update, OK. I can redirect stdout/stderr and log something
on bad exitcode instead.
Pre-upgrade, the system was running RB 1.6.9 and Postgres 8.4 (installed
from a Postgres repo rather than Ubuntu, though that probably doesn't
matter). When I tried the 1.6.9 -> 3.0.15 direct upgrade, 'rb-site
upgrade' failed; these are my notes:
----
easy_install -U
rb-site upgrade <site>
which fails with:
Database evolutions for reviews failed!
The SQL statement was: ALTER TABLE "reviews_reviewrequest" ADD COLUMN
"issue_verifying_count" integer NULL, ADD COLUMN
"inactive_file_attachments_count" integer NULL, ADD COLUMN
"file_attachments_count" integer NULL, ADD COLUMN
"inactive_screenshots_count" integer NULL, ADD COLUMN
"screenshots_count" integer NULL;
The database error was: cannot ALTER TABLE "reviews_reviewrequest"
because it has pending trigger events
CommandError: Error applying evolution for reviews: cannot ALTER TABLE
"reviews_reviewrequest" because it has pending trigger events
drop owned by the_user;
----
I think the last line is a note-to-self, not part of the error.
Googling that showed it's a known issue with Postgres where it coughs up
this confusing error if you alter/drop a table inside a transaction. I
don't remember for sure, but then I think I tried upgrading to Postgres
10 and running 'rb-site upgrade' again, and that didn't help, and then I
rolled back to a VM snapshot and started over with upgrading through
1.7.x, 2.0.x, 2.5.x, 3.0.x, which worked.
regards,
--jh
On 7/23/19 6:44 AM, Christian Hammond wrote:
> Hi John,
>
> Yeahh that's annoying. Haystack logs this for User objects because
> Django doesn't have a field that's updated whenever profile data
> updates. I'd love to fix this, but the workarounds are.. unclean.
>
> While not ideal, as it could mask other issues, you could always try
> redirecting stderr to /dev/null:
>
> rb-site manage .... 2>/dev/null
>
> That should at the very least keep those errors out of your logs. You
> can redirect stdout as well, if you need to.
>
> Glad you were able to get the upgrade working, given the age and messy
> install. Review Board should be able to upgrade straight from 1.6.9 to
> 3.0.15 without installing intermediate releases, but I gather you hit
> some issues that prevented that from working?
>
> Christian
>
> On Mon, Jul 22, 2019 at 1:07 PM john h <
bike....@gmail.com
> <mailto:
bike....@gmail.com>> wrote:
>
> Hi all,
>
> I recently upgraded a ReviewBoard install from Ubuntu 14.04/RB 1.6.9
> to 18.04/
3.0.15. <
http://3.0.15.> I did it by advancing through
> each final minor release of RB with pip (starting with 1.7.xx, since
> that was the earliest available via pip), and running rb-site
> upgrade and recommended commands/edits. RB was messily/incompletely
> installed, and I had to remove/reinstall
> /usr/local/python2.7/dist-packages to clean up the dependency mess
> in there. More details if needed-- it was fairly messy, and I'm a
> little unsure the site is 100% clean at this point, but it appears
> to be Mostly Working.
>
> Search functionality had never been enabled or installed in
> crontab. I did that (using Whoosh, our site seems fairly small at
> 6000 review requests over a decade), but now I'm getting the
> following error from sudo -u www-data "/usr/bin/python"
> "/usr/local/bin/rb-site" manage
> "/var/www/
mercury-reviewboard.pct.niksun.com
> <
http://mercury-reviewboard.pct.niksun.com>" update_index -- -a 1:
>
> WARNING:py.warnings:/usr/local/lib/python2.7/dist-packages/haystack/indexes.py:167:
> UserWarning: No updated date field found for 'User' - not
> restricting by age.
> warnings.warn(update_field_msg)
>
> Indexing 82 users
> Indexing 0 Review Requests
>
> My first try at indexing had this all running as root, so I removed
> the data/search-index directory, reran everything as the www-data
> user RB is running as, and the error persists. How might I clear
> this error? TOO MUCH MAIL FROM ROOT :)
>
> --
> Supercharge your Review Board with Power Pack:
>
https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
>
https://rbcommons.com/
> Happy user? Let us know!
https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google
> Groups "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
reviewboard...@googlegroups.com
> <mailto:
reviewboard...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/reviewboard/4248b707-3179-431a-a8e7-d9bd43c09cf0%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Christian Hammond
> President/CEO of Beanbag <
https://www.beanbaginc.com/>
> Makers of Review Board <
https://www.reviewboard.org/>
> <mailto:
reviewboard...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/reviewboard/CAE7Vndk0j-YuUNL17sETB%2BuKZu2XrNBAm0nK9G9xc54js9OcZg%40mail.gmail.com
> <
https://groups.google.com/d/msgid/reviewboard/CAE7Vndk0j-YuUNL17sETB%2BuKZu2XrNBAm0nK9G9xc54js9OcZg%40mail.gmail.com?utm_medium=email&utm_source=footer>.