Re: Database Upgrade Error

2017-03-25 Thread Christian Hammond
Hey Chris,

Sorry I didn't catch this thread earlier. This was indeed due to
differences in table formats. Switching everything to InnoDB is the
solution and recommendation. I believe this can actually be done in-place
without a database dump and import, but it still will take a while.

Glad you're back up and running!

Christian


On Fri, Mar 24, 2017 at 10:55 Chris Eagan  wrote:

> I found another discussion about this issue on this forum [forum post
> ] and
> sure enough, my database dump shows that the tables are using MyISAM. I
> converted the database dump to specify InnoDB instead using the following
> command and did a new import followed by an rb-site upgrade.
>
> sed 's/) ENGINE=MyISAM/) ENGINE=InnoDB/g' reviewboard.sql >
> reviewboard2.sql
>
>
> This took a really long time to import, so be sure you get it right before
> you try the import. I added wait_timeout = 31536000 to the [server]
> section of /etc/my.cnf.d/server.cnf and restarted MariaDB to ensure that
> the import had time to complete. Also, make sure you have enough free disk
> space to complete the import.
>
> Ultimately, this appears to have worked and given us successful migration
> of the database. Hopefully, this thread helps someone else. :)
>
> On Friday, March 24, 2017 at 9:16:05 AM UTC-4, Chris Eagan wrote:
>
> When attempting to perform an rb-site upgrade from version 2.0.18 to
> 2.5.9, I get the following output, ending in an error. If I continue,
> further table creation issues occur and the result is a corrupted database.
> I do have a backup of the database, which I have been using to restore and
> test the migrations.
>
> Rebuilding directory structure
> Upgrading site settings_local.py
> Updating database. This may take a while.
>
>
> The log output below, including warnings and errors,
> can be ignored unless upgrade fails.
>
>
> --  --
> Creating tables ...
> Creating table attachments_fileattachmenthistory
> Creating table diffviewer_rawfilediffdata
> Creating table notifications_webhooktarget_repositories
>
>
> [!] There was an error synchronizing the database. Make sure the
> database is created and has the appropriate permissions, and then
> continue.
> [!] Details: (1005, "Can't create table 'reviewboard.#sql-64a_3'
> (errno: 150)")
>
>
> Press Enter to continue
>
>
> The permissions are correct and I even tried running the command by
> specifying the root user of the database and their password. Some Googling
> makes this seem like it could be due to Foreign key issues where the new
> databases are being created out of order. I am wondering if disabling
> Foreign Key Checks globally, performing the migration, and then enabling
> the checks again would help and if it would be safe with respect to
> ReviewBoard itself.
>
> Something like:
>
> SET GLOBAL FOREIGN_KEY_CHECKS=0;
>
>
> Run the rb-site upgrade.
>
>
>
> SET GLOBAL FOREIGN_KEY_CHECKS=1;
>
>
> Thoughts? Recommendations?
>
> --
> 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
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

-- 
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 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database Upgrade Error

2017-03-24 Thread Chris Eagan
I found another discussion about this issue on this forum [forum post 
] and sure 
enough, my database dump shows that the tables are using MyISAM. I 
converted the database dump to specify InnoDB instead using the following 
command and did a new import followed by an rb-site upgrade.

sed 's/) ENGINE=MyISAM/) ENGINE=InnoDB/g' reviewboard.sql > reviewboard2.sql


This took a really long time to import, so be sure you get it right before 
you try the import. I added wait_timeout = 31536000 to the [server] section 
of /etc/my.cnf.d/server.cnf and restarted MariaDB to ensure that the import 
had time to complete. Also, make sure you have enough free disk space to 
complete the import.

Ultimately, this appears to have worked and given us successful migration 
of the database. Hopefully, this thread helps someone else. :)

On Friday, March 24, 2017 at 9:16:05 AM UTC-4, Chris Eagan wrote:
>
> When attempting to perform an rb-site upgrade from version 2.0.18 to 
> 2.5.9, I get the following output, ending in an error. If I continue, 
> further table creation issues occur and the result is a corrupted database. 
> I do have a backup of the database, which I have been using to restore and 
> test the migrations.
>
> Rebuilding directory structure
> Upgrading site settings_local.py
> Updating database. This may take a while.
>
>
> The log output below, including warnings and errors,
> can be ignored unless upgrade fails.
>
>
> --  --
> Creating tables ...
> Creating table attachments_fileattachmenthistory
> Creating table diffviewer_rawfilediffdata
> Creating table notifications_webhooktarget_repositories
>
>
> [!] There was an error synchronizing the database. Make sure the
> database is created and has the appropriate permissions, and then
> continue.
> [!] Details: (1005, "Can't create table 'reviewboard.#sql-64a_3'
> (errno: 150)")
>
>
> Press Enter to continue
>
>
> The permissions are correct and I even tried running the command by 
> specifying the root user of the database and their password. Some Googling 
> makes this seem like it could be due to Foreign key issues where the new 
> databases are being created out of order. I am wondering if disabling 
> Foreign Key Checks globally, performing the migration, and then enabling 
> the checks again would help and if it would be safe with respect to 
> ReviewBoard itself.
>
> Something like:
>
> SET GLOBAL FOREIGN_KEY_CHECKS=0;
>
>
> Run the rb-site upgrade.
>
>  
>
> SET GLOBAL FOREIGN_KEY_CHECKS=1;
>
>
> Thoughts? Recommendations?
>

-- 
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 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database Upgrade Error

2017-03-24 Thread Chris Eagan
I found another discussion about this issue on this forum [forum post 
] and sure 
enough, my database dump shows that the tables are using MyISAM. I 
converted the database dump to specify InnoDB instead using the following 
command and did a new import followed by an rb-site upgrade.

sed 's/) ENGINE=MyISAM/) ENGINE=InnoDB/g' reviewboard.sql > reviewboard2.sql


This took a really long time to import, so be sure you get it right before 
you try the import. I added wait_timeout = 31536000 to the [server] section 
of /etc/my.cnf.d/server.cnf and restarted MariaDB to ensure that the import 
had time to complete. Also, make sure you have enough free disk space to 
complete the import.

Ultimately, this appears to have worked and given us successful migration 
of the database. Hopefully, this thread helps someone else. :)

On Friday, March 24, 2017 at 9:16:05 AM UTC-4, Chris Eagan wrote:
>
> When attempting to perform an rb-site upgrade from version 2.0.18 to 
> 2.5.9, I get the following output, ending in an error. If I continue, 
> further table creation issues occur and the result is a corrupted database. 
> I do have a backup of the database, which I have been using to restore and 
> test the migrations.
>
> Rebuilding directory structure
> Upgrading site settings_local.py
> Updating database. This may take a while.
>
>
> The log output below, including warnings and errors,
> can be ignored unless upgrade fails.
>
>
> --  --
> Creating tables ...
> Creating table attachments_fileattachmenthistory
> Creating table diffviewer_rawfilediffdata
> Creating table notifications_webhooktarget_repositories
>
>
> [!] There was an error synchronizing the database. Make sure the
> database is created and has the appropriate permissions, and then
> continue.
> [!] Details: (1005, "Can't create table 'reviewboard.#sql-64a_3'
> (errno: 150)")
>
>
> Press Enter to continue
>
>
> The permissions are correct and I even tried running the command by 
> specifying the root user of the database and their password. Some Googling 
> makes this seem like it could be due to Foreign key issues where the new 
> databases are being created out of order. I am wondering if disabling 
> Foreign Key Checks globally, performing the migration, and then enabling 
> the checks again would help and if it would be safe with respect to 
> ReviewBoard itself.
>
> Something like:
>
> SET GLOBAL FOREIGN_KEY_CHECKS=0;
>
>
> Run the rb-site upgrade.
>
>  
>
> SET GLOBAL FOREIGN_KEY_CHECKS=1;
>
>
> Thoughts? Recommendations?
>

-- 
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 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Database Upgrade Error

2017-03-24 Thread Chris Eagan
I went ahead and tested this and the upgrade finished without errors. I was 
able to login to Review Board but attempts to access existing review 
requests resulted in the following error:

IntegrityError: (1452, 'Cannot add or update a child row: a foreign key 
constraint fails 
(`reviewboard`.`reviews_reviewrequest_file_attachment_histories`, 
CONSTRAINT `reviewrequest_id_refs_id_fe050f91` FOREIGN KEY 
(`reviewrequest_id`) REFERENCES `reviews_reviewrequest` (`id`))')


This makes sense since there were clearly Foreign Key issues previously 
during the upgrade so it looks like my workaround doesn't work.

This installation is on CentOS 7 and Review Board was installed with EPEL 
packages. The installation appears to be using acceptable versions of all 
the dependencies and is running on Python 2.7.5.

It is worth trying to perform the upgrades via older releases of Review 
Board between the two releases I am trying to install?

On Friday, March 24, 2017 at 9:16:05 AM UTC-4, Chris Eagan wrote:
>
> When attempting to perform an rb-site upgrade from version 2.0.18 to 
> 2.5.9, I get the following output, ending in an error. If I continue, 
> further table creation issues occur and the result is a corrupted database. 
> I do have a backup of the database, which I have been using to restore and 
> test the migrations.
>
> Rebuilding directory structure
> Upgrading site settings_local.py
> Updating database. This may take a while.
>
>
> The log output below, including warnings and errors,
> can be ignored unless upgrade fails.
>
>
> --  --
> Creating tables ...
> Creating table attachments_fileattachmenthistory
> Creating table diffviewer_rawfilediffdata
> Creating table notifications_webhooktarget_repositories
>
>
> [!] There was an error synchronizing the database. Make sure the
> database is created and has the appropriate permissions, and then
> continue.
> [!] Details: (1005, "Can't create table 'reviewboard.#sql-64a_3'
> (errno: 150)")
>
>
> Press Enter to continue
>
>
> The permissions are correct and I even tried running the command by 
> specifying the root user of the database and their password. Some Googling 
> makes this seem like it could be due to Foreign key issues where the new 
> databases are being created out of order. I am wondering if disabling 
> Foreign Key Checks globally, performing the migration, and then enabling 
> the checks again would help and if it would be safe with respect to 
> ReviewBoard itself.
>
> Something like:
>
> SET GLOBAL FOREIGN_KEY_CHECKS=0;
>
>
> Run the rb-site upgrade.
>
>  
>
> SET GLOBAL FOREIGN_KEY_CHECKS=1;
>
>
> Thoughts? Recommendations?
>

-- 
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 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.