Re: [Koha-devel] Major surprise - "automatic" upgrade
Hi Jared, At 10:41 AM 4/28/2013 -0400, you wrote:
Paul,
I've looked at the code in <http://cleanup_database.pl>cleanup_database.pl (and <http://search.pl>search.pl), and can't see any obvious reason to "redirect to Installer."
So -- what has happened? Â Can I dump the cleaned db back into production? What are the specific changes 3.8.5 to 3.8.10 that required "updating"?
The redirect is because you had a newer version of the code than the database was run on.
Thanks for your reply, but this is worrisome. I had at {server}/ a tarred 3.8.10. I had at {server}/home/paul/ an untarred 3.8.10 (for .dif purposes.)
Koha doesn't have any support for automatic upgrades, so I guess you must have untarred 3.8.10 at some point.
[see above] O.K. it's not "automatic" but it did in fact run automatically without my permission. I ran: './cleanup_database.pl --zebraqueue -v' and Koha *updated* from 3.8.5 to some variant of 3.8.10. Note the '-v' -- but it sat there running with nothing "verbose."
You can take a look at the release notes for the versions between 3.8.5 and 3.8.10:Â <http://git.koha-community.org/gitweb/?p=koha.git;a=tree;f=misc/release_notes;h=fd4b7d4bf8f9d401c87878ec184593a078bb5a93;hb=3.8.x>http://git.koha-community.org/gitweb/?p=koha.git;a=tree;f=misc/release_notes;h=fd4b7d4bf8f9d401c87878ec184593a078bb5a93;hb=3.8.x
I can find no mention of 'db' or 'database'
Based on the "Update report" you shared, it doesn't look like there were any actual database changes in between versions 3.8.5 and 3.8.10, but I couldn't say that with certainty without checking (you can take a look at the release notes linked above, and by reviewing the installer/data/mysql/<http://updatedatabase.pl>updatedatabase.pl file on the 3.8.10 installation).
I have looked at it, but question why it would be triggered?
The update is trigged whenever you have an older version of the database than the code,
By what? And "the code" in what? The relevant code in cleanup_database.pl is "$sth2 = $dbh->prepare("DELETE FROM zebraqueue WHERE id=?");" a simple MySQL directive. Why does 'cleanup_database.pl' even look for '<http://updatedatabase.pl>updatedatabase<http://updatedatabase.pl>.pl' and|or "other/more recent" versions of "the code"? The bottom line is "why does a simple .pl using TRUNCATE lead to an upgrade"?
Most likely downgrading to 3.8.5 would not cause any problems at all,
"Downgrading" is new to me. Do you mean "restore system from backup"? Best - Paul
even if there were database changes, but it's always a good idea to check.
Regards, Jared
-- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) <mailto:jcamins@cpbibliography.com>jcamins@cpbibliography.com (web) <http://www.cpbibliography.com/>http://www.cpbibliography.com/
Paul, As Release Manager for Koha 3.12, I think it is very important to state at the outset for people who are not following this entire thread that Koha does not have automatic upgrades, nor anything like them. Some web-based systems like Wordpress can do automatic upgrades, but Koha cannot. That unequivocal statement made, I'll close up this discussion by addressing your specific situation. [see above] O.K. it's not "automatic" but it did in fact run automatically
without my permission. I ran:
'./cleanup_database.pl --zebraqueue -v'
and Koha *updated* from 3.8.5 to some variant of 3.8.10. Note the '-v' -- but it sat there running with nothing "verbose."
*NOTHING* is automatic, or even slightly automatic. That command deleted stale entries in the zebraqueue table and had nothing to do with an upgrade. The update ran when you entered your administrative password into the installer and told it to go ahead and run the upgrade. Until then, you had a 3.8.5 database.
You can take a look at the release notes for the versions between 3.8.5 and 3.8.10:Â http://git.koha-community.org/gitweb/?p=koha.git;a=tree;f=misc/release_notes...
I can find no mention of 'db' or 'database'
They are release notes. They tell you all the bugs that got fixed, and you can refer to Bugzilla for detailed descriptions. Based on the "Update report" you shared, it doesn't look like there were
any actual database changes in between versions 3.8.5 and 3.8.10, but I couldn't say that with certainty without checking (you can take a look at the release notes linked above, and by reviewing the installer/data/mysql/ updatedatabase.pl file on the 3.8.10 installation).
I have looked at it, but question why it would be triggered?
Because the code on your test server was for 3.8.10, and the staff client saw that your database was out of sync.
The update is trigged whenever you have an older version of the database than the code,
By what? And "the code" in what? The relevant code in cleanup_database.plis
"$sth2 = $dbh->prepare("DELETE FROM zebraqueue WHERE id=?");"
a simple MySQL directive. Why does 'cleanup_database.pl' even look for ' updatedatabase <http://updatedatabase.pl>.pl <http://updatedatabase.pl>' and|or "other/more recent" versions of "the code"?
The bottom line is "why does a simple .pl using TRUNCATE lead to an upgrade"?
It doesn't. See above. When I say triggered, I mean it asks you for a password to run the upgrade. Which you then entered. This is a fantastic argument for why you should never ever use the database user to login. If you don't enter the database user's credentials, you can't get into the installer and upgrade a database.
Most likely downgrading to 3.8.5 would not cause any problems at all,
"Downgrading" is new to me. Do you mean "restore system from backup"?
That would be my recommendation, but I was talking about downgrading the code as probably not being dangerous, but being something I WOULD NEVER UNDER ANY CIRCUMSTANCES RECOMMEND TO ANYONE FOR WHOSE SYSTEM I AM NOT RESPONSIBLE. Your system falls under that heading, so I am not recommending it. However, recognizing that you may not be willing or able to restore from a backup for reasons entirely unrelated to the issue you encountered, I acknowledged that there might be an alternative. As a reminder to everyone, though, this is a free support forum, and nothing anyone says can be taken as anything other than polite conversation and a desire to help. If you want support, there are companies (including one owned by yours truly) that specialize in providing it to different types of libraries in different places. The free support we get from the Koha community is fantastic, and helpful, but it is not a replacement for a sysadmin and support contract. Regards, Jared -- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcamins@cpbibliography.com (web) http://www.cpbibliography.com/
participants (2)
-
Jared Camins-Esakov -
Paul