Database update: cannot proceed even after "Successful Update"
Added by Jason de la Cruz over 10 years ago
I am upgrading myami from svn revision 17956 to 18149, however, I cannot apply updates past the initial update (schema-r17982.py) even though this initial update succeeded. Console log is below.
[jason@server dbschema]$ python schema_update.py connected to db 'projectdb' on server 'server' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' Database recorded revision is 17956 CUSTOM: SELECT value FROM `install` WHERE `key`='version' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' Database recorded revision is 17956 CUSTOM: SELECT * FROM `install` WHERE `key`='resetfrom' CUSTOM: SELECT * FROM `install` WHERE `key`='resetfrom' You must successfully run schema-r17982.py first CUSTOM: SELECT * FROM `install` WHERE `key`='resetfrom' You must successfully run schema-r18000.py first ------Copy the following lines to command terminal to run ------- python schema-r17982.py python schema-r18000.py python schema-r18034.py python log_package_revision.py [jason@server dbschema]$ python schema-r17982.py connected to db 'projectdb' on server 'server' connected to db 'leginondb' on server 'server' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' Database recorded revision is 17956 CUSTOM: SELECT value FROM `install` WHERE `key`='version' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' CUSTOM: SELECT * FROM `install` WHERE `key`='resetfrom' ------------------------------------------- CUSTOM: SELECT DISTINCT appiondb FROM processingdb ORDER BY `REF|projects|project` ASC ------------------------------------------- Successful Update CUSTOM: SELECT * FROM `install` WHERE `key`='resetfrom' CUSTOM: INSERT INTO `install` (`key`, `value`) VALUES ('resetfrom', 17956) INSERT: INSERT INTO `install` (`key`, `value`) VALUES ('resetfrom', 17956) CUSTOM: SELECT * FROM `install` WHERE `key`='revision' UPDATE: UPDATE `install` SET `value`='17982' WHERE install.key = 'revision'; Updated install table reset and revision [jason@server dbschema]$ python schema-r18000.py connected to db 'projectdb' on server 'server' connected to db 'leginondb' on server 'server' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' Database recorded revision is 17956 CUSTOM: SELECT value FROM `install` WHERE `key`='version' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' CUSTOM: SELECT * FROM `install` WHERE `key`='resetfrom' You must successfully run schema-r17982.py first
Reissuing the commands has the same effect. Please advise.
Replies (3)
RE: Database update: cannot proceed even after "Successful Update" - Added by Amber Herold over 10 years ago
Hi Jason,
It appears that the command to update the revision when running schema-r17982.py has failed, however I'm not sure why.
Perhaps the user that you are running the script as does not have permission to update the projectdb?
If you are certain that your permissions are correct, we can try updating the DB using mysql directly. That schema update is specific to a CTF data change. Have you ever used Appion to estimate the CTF? From the output, it does not look like it updated any ApCTFData tables, so I'm assuming you do not use Appion?
If that is correct, we can try just try updating the version field in the projectdb install table to 17982.
However, it would be best to understand why the update has failed to ensure the other schema updates are being run successfully.
RE: Database update: cannot proceed even after "Successful Update" - Added by Jason de la Cruz over 10 years ago
Hi Amber,
Correct, I was not using Appion. However the initial update required Appion to be installed (it was looking for "appionlib", else fail), so I installed the Appion package already included with myami just to proceed. Console log below:
[jason@server dbschema]$ python schema-r17982.py Traceback (most recent call last): File "schema-r17982.py", line 4, in <module> from appionlib import appiondata ImportError: No module named appionlib [jason@server dbschema]$ python schema-r18000.py connected to db 'projectdb' on server 'server' connected to db 'leginondb' on server 'server' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' Database recorded revision is 17956 CUSTOM: SELECT value FROM `install` WHERE `key`='version' SVN checkout revision is 18149 CUSTOM: SELECT value FROM `install` WHERE `key`='revision' CUSTOM: SELECT * FROM `install` WHERE `key`='resetfrom' You must successfully run schema-r17982.py first
I did not further configure Appion or initialize its database, so it would make sense that the Appion tables were not updated. I'd like to use Appion in the future; should I complete its installation and re-run the database updates before proceeding, or can I simply update the version field in projectdb and configure Appion later?
RE: Database update: cannot proceed even after "Successful Update" - Added by Amber Herold over 10 years ago
Looks like that was an error on our side. This particular update script is only needed for Appion.
I would say don't install Appion until you are ready to use it. For now you can work around this bug by updating the version in the DB manually. Ill also check in a fix for this today.