Bug 825963 - Cannot upgrade wallaby database
Cannot upgrade wallaby database
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: wallaby (Show other bugs)
Development
Unspecified Unspecified
medium Severity unspecified
: 2.3
: ---
Assigned To: Robert Rati
Tomas Rusnak
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 04:11 EDT by Martin Kudlej
Modified: 2013-03-19 12:37 EDT (History)
5 users (show)

See Also:
Fixed In Version: wallaby-0.16.1-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-19 12:37:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Kudlej 2012-05-29 04:11:09 EDT
Description of problem:
I've tried to upgrade wallaby database and it broke:
$ wallaby upgrade-db
Console Connection Established...
Updating database to version 1.17
Creating snapshot named 'Database upgrade to 1.17 automatic pre-upgrade snapshot at Mon May 28 14:03:08 UTC 2012 -- 4c1192d84442c'
Adding Feature 'SharedJobQueueLocation'
...
Updating database to version 1.21
Creating snapshot named 'Database upgrade to 1.21 automatic pre-upgrade snapshot at Mon May 28 14:05:32 UTC 2012 -- 4c119360f6e52'
Retrieving Subsystem 'startd'
Verifying Subsystem 'startd'
Reverting database to state before patching attempt
fatal:  Subsystem 'startd' has a current value of "''" but expected nil

$ wallaby upgrade-db
Console Connection Established...
Updating database to version 1.21
Creating snapshot named 'Database upgrade to 1.21 automatic pre-upgrade snapshot at Mon May 28 14:06:03 UTC 2012 -- 4c11937e8eb0f'
Retrieving Subsystem 'll_daemon'
Verifying Subsystem 'll_daemon'
Reverting database to state before patching attempt
fatal:  Subsystem 'll_daemon' has a current value of "''" but expected nil

$ wallaby upgrade-db
Console Connection Established...
Updating database to version 1.21
Creating snapshot named 'Database upgrade to 1.21 automatic pre-upgrade snapshot at Tue May 29 08:03:51 UTC 2012 -- 4c1284671830c'
Retrieving Subsystem 'transferer'
Verifying Subsystem 'transferer'
Reverting database to state before patching attempt
fatal:  Subsystem 'transferer' has a current value of "''" but expected nil

$ echo $?
1

Version-Release number of selected component (if applicable):
python-condorutils-1.5-4.el5
qpid-qmf-debuginfo-0.14-2.el5
qpid-java-common-0.14-3.el5
qpid-java-client-0.14-3.el5
ruby-condor-wallaby-tools-5.0.2-1.el5
qpid-qmf-0.14-9.el5
python-qpid-qmf-0.14-9.el5
qpid-cpp-server-cluster-0.14-14.el5
qpid-cpp-server-devel-0.14-14.el5
wallaby-utils-0.14.2-2.el5
wallaby-0.14.2-2.el5
qpid-cpp-client-0.14-14.el5
python-qpid-0.14-6.el5
condor-7.6.5-0.14.el5
condor-aviary-7.6.5-0.14.el5
ruby-qpid-qmf-0.14-9.el5
qpid-java-example-0.14-3.el5
python-wallabyclient-5.0.2-1.el5
condor-classads-7.6.5-0.14.el5
qpid-cpp-client-ssl-0.14-14.el5
qpid-cpp-server-store-0.14-14.el5
qpid-tools-0.14-2.el5
condor-debuginfo-7.6.8-0.2.el5
python-wallaby-0.14.2-2.el5
condor-wallaby-client-5.0.2-1.el5
ruby-qpid-qmf-0.10-2.el5
qpid-cpp-server-0.14-14.el5
qpid-cpp-server-xml-0.14-14.el5
qpid-qmf-devel-0.14-9.el5
ruby-wallaby-0.14.2-2.el5
condor-wallaby-base-db-1.22-2.el5
qpid-qmf-0.10-2.el5
qpid-qmf-devel-0.10-2.el5
qpid-cpp-client-devel-0.14-14.el5
qpid-cpp-server-ssl-0.14-14.el5
qpid-cpp-client-devel-docs-0.14-14.el5
condor-wallaby-tools-5.0.2-1.el5


How reproducible:
100%

Steps to Reproduce:
1. I've installed wallaby database in past and set up pool
2. upgrade packages to above list
3. try to update database
  
Actual results:
It is not possible to upgrade database.

Expected results:
Upgrade of database will work. If there is any issue which cannot be skipped, upgrade tool will print human readable message what is wrong and what to do to fix it.
Comment 2 Robert Rati 2012-05-29 09:02:43 EDT
This is an issue introduced with the new annotation field.  Existing databases don't have the field, so the value is "nil" instead of "".  

Fixed on master.
Comment 5 Tomas Rusnak 2012-12-10 10:31:12 EST
Components used:

wallaby-utils-0.16.1-2.el6.noarch
wallaby-0.16.1-2.el6.noarch
condor-wallaby-base-db-1.25-1.el6_3.noarch
python-wallabyclient-5.0.4-1.el6_3.noarch
ruby-condor-wallaby-tools-5.0.2-1.el6.noarch
ruby-condor-wallaby-5.0.4-1.el6_3.noarch
condor-wallaby-client-5.0.4-1.el6_3.noarch
ruby-wallaby-0.16.1-2.el6.noarch
condor-wallaby-tools-5.0.4-1.el6_3.noarch

Load attached database files into wallaby ends with error:

# wallaby-agent -f 
storing results to :memory:
storing snapshots to :memory:
creating user tables
creating table for Mrg::Grid::Config::Feature...
creating table for Mrg::Grid::Config::Group...
creating table for Mrg::Grid::Config::Parameter...
creating table for Mrg::Grid::Config::Subsystem...
creating table for Mrg::Grid::Config::Node...
creating table for Mrg::Grid::Config::ArcLabel...
creating table for Mrg::Grid::Config::ParameterArc...
creating table for Mrg::Grid::Config::FeatureArc...
creating table for Mrg::Grid::Config::FeatureParams...
creating table for Mrg::Grid::Config::NodeMembership...
creating table for Mrg::Grid::Config::GroupParams...
creating table for Mrg::Grid::Config::GroupFeatures...
creating table for Mrg::Grid::Config::SubsystemParams...
creating table for Mrg::Grid::Config::DirtyElement...
creating snapshot tables
checking for necessary user database migrations....
checking for necessary default database migrations....
agent exiting with exception #<Errno::ENOENT: No such file or directory - :memory:>
/usr/lib/ruby/1.8/fileutils.rb:1207:in `stat'
/usr/lib/ruby/1.8/fileutils.rb:1207:in `lstat'
/usr/lib/ruby/1.8/fileutils.rb:1185:in `stat'
/usr/lib/ruby/1.8/fileutils.rb:1267:in `copy_file'
/usr/lib/ruby/1.8/fileutils.rb:464:in `copy_file'
/usr/lib/ruby/1.8/fileutils.rb:383:in `cp'
/usr/lib/ruby/1.8/fileutils.rb:1402:in `fu_each_src_dest'
/usr/lib/ruby/1.8/fileutils.rb:1418:in `fu_each_src_dest0'
/usr/lib/ruby/1.8/fileutils.rb:1400:in `fu_each_src_dest'
/usr/lib/ruby/1.8/fileutils.rb:382:in `cp'
/usr/bin/wallaby-agent:261
/usr/lib/ruby/site_ruby/1.8/sqlite3/database.rb:564:in `transaction'
/usr/bin/wallaby-agent:256
/usr/lib/ruby/site_ruby/1.8/mrg/grid/config/dbmeta.rb:71:in `migrate'
/usr/bin/wallaby-agent:255
/usr/bin/wallaby-agent:248:in `each'
/usr/bin/wallaby-agent:248

It looks like backwards compatibility is still broken. Please could you look at, and/or you want to open new bz for this issue?
Comment 6 Robert Rati 2012-12-12 11:18:05 EST
This issue isn't related to patching.
Comment 7 Tomas Rusnak 2012-12-13 05:33:43 EST
Thanks Robert, as you said, this is only "in memory" problem not related to patching.

I have another problem with patching with same packages (see comment #5):

# wallaby upgrade-db
Console Connection Established...
Updating database to version 1.21
Creating snapshot named 'Database upgrade to 1.21 automatic pre-upgrade snapshot at Mon Dec 10 10:11:26 UTC 2012 -- 4d07cc9c74af6'
Retrieving Subsystem 'kbdd'
...
Creating relationships between store entities
Updating database to version 1.22
Creating snapshot named 'Database upgrade to 1.22 automatic pre-upgrade snapshot at Mon Dec 10 10:14:29 UTC 2012 -- 4d07cd4b30788'
...
Creating relationships between store entities
Updating database to version 1.23
Creating snapshot named 'Database upgrade to 1.23 automatic pre-upgrade snapshot at Mon Dec 10 10:16:49 UTC 2012 -- 4d07cdd04e68e'
Retrieving Subsystem 'schedd'
...
Updating Parameter 'SHADOW.SPOOL'
Creating relationships between store entities
Updating database to version 1.24
Creating snapshot named 'Database upgrade to 1.24 automatic pre-upgrade snapshot at Mon Dec 10 10:17:44 UTC 2012 -- 4d07ce0457e5b'
Retrieving Subsystem 'kbdd'
...
Verifying Feature 'ExecuteNode'
Reverting database to state before patching attempt
fatal:  Feature 'ExecuteNode' params has a current value of [["BENCHMARKTIMER", "(CurrentTime - LastBenchmark)"], ["CONSOLE_DEVICES", "mouse, console"], ["CONTINUE", "( $(CPUIdle) && ($(ActivityTimer) > 10) && (KeyboardIdle > $(ContinueIdleTime)) )"], ["DAEMON_LIST", ">= STARTD"], ["KILL", "$(ActivityTimer) > $(MaxVacateTime)"], ["MAXJOBRETIREMENTTIME", 0], ["MAX_STARTD_LOG", "1000000"], ["PERIODIC_CHECKPOINT", "$(LastCkpt) > (3 * $(HOUR) + $RANDOM_INTEGER(-30,30,1) * $(MINUTE) )"], ["PREEMPT", "( ((Activity == \"Suspended\") && ($(ActivityTimer) > $(MaxSuspendTime))) || (SUSPEND && (WANT_SUSPEND == False)) )"], ["RUNBENCHMARKS", "(LastBenchmark == 0 ) || ($(BenchmarkTimer) >= (4 * $(HOUR)))"], ["START", "( (KeyboardIdle > $(StartIdleTime)) && ( $(CPUIdle) || (State != \"Unclaimed\" && State != \"Owner\")) )"], ["STARTD", "$(SBIN)/condor_startd"], ["STARTD_ADDRESS_FILE", "$(LOG)/.startd_address"], ["STARTD_ATTRS", ">= \"$(COLLECTOR_HOST)\", SmallJob, KeyboardNotBusy, IsVanilla, ActivationTimer, MINUTE, StartIdleTime, CPUIdle, KeyboardBusy, ContinueIdleTime, MaxSuspendTime, MaxVacateTime, HOUR, LastCkpt"], ["STARTD_DEBUG", ""], ["STARTD_JOB_EXPRS", "ImageSize, ExecutableSize, JobUniverse, NiceUser"], ["STARTD_LOG", "$(LOG)/StartLog"], ["STARTER", "$(SBIN)/condor_starter"], ["STARTER_LIST", "STARTER"], ["SUSPEND", "( $(KeyboardBusy) || ( (CpuBusyTime > 2 * $(MINUTE)) && $(ActivationTimer) > 90 ) )"], ["WANT_SUSPEND", "( $(SmallJob) || $(KeyboardNotBusy) || $(IsVanilla) ) && ( $(SUSPEND) )"], ["WANT_VACATE", "( $(ActivationTimer) > 10 * $(MINUTE) || $(IsVanilla) )"]] but expected [["BENCHMARKTIMER", "(CurrentTime - LastBenchmark)"], ["CONSOLE_DEVICES", "mouse, console"], ["CONTINUE", "( $(CPUIdle) && ($(ActivityTimer) > 10) && (KeyboardIdle > $(ContinueIdleTime)) )"], ["DAEMON_LIST", ">= STARTD"], ["KILL", "$(ActivityTimer) > $(MaxVacateTime)"], ["MAXJOBRETIREMENTTIME", "0"], ["MAX_STARTD_LOG", "1000000"], ["PERIODIC_CHECKPOINT", "$(LastCkpt) > (3 * $(HOUR) + $RANDOM_INTEGER(-30,30,1) * $(MINUTE) )"], ["PREEMPT", "( ((Activity == \"Suspended\") && ($(ActivityTimer) > $(MaxSuspendTime))) || (SUSPEND && (WANT_SUSPEND == False)) )"], ["RUNBENCHMARKS", "(LastBenchmark == 0 ) || ($(BenchmarkTimer) >= (4 * $(HOUR)))"], ["START", "( (KeyboardIdle > $(StartIdleTime)) && ( $(CPUIdle) || (State != \"Unclaimed\" && State != \"Owner\")) )"], ["STARTD", "$(SBIN)/condor_startd"], ["STARTD_ADDRESS_FILE", "$(LOG)/.startd_address"], ["STARTD_ATTRS", ">= \"$(COLLECTOR_HOST)\", SmallJob, KeyboardNotBusy, IsVanilla, ActivationTimer, MINUTE, StartIdleTime, CPUIdle, KeyboardBusy, ContinueIdleTime, MaxSuspendTime, MaxVacateTime, HOUR, LastCkpt"], ["STARTD_DEBUG", ""], ["STARTD_JOB_EXPRS", "ImageSize, ExecutableSize, JobUniverse, NiceUser"], ["STARTD_LOG", "$(LOG)/StartLog"], ["STARTER", "$(SBIN)/condor_starter"], ["STARTER_LIST", "STARTER"], ["SUSPEND", "( $(KeyboardBusy) || ( (CpuBusyTime > 2 * $(MINUTE)) && $(ActivationTimer) > 90 ) )"], ["WANT_SUSPEND", "( $(SmallJob) || $(KeyboardNotBusy) || $(IsVanilla) ) && ( $(SUSPEND) )"], ["WANT_VACATE", "( $(ActivationTimer) > 10 * $(MINUTE) || $(IsVanilla) )"]]


Please, could you take a look what should be a problem?
Comment 8 Robert Rati 2012-12-13 09:49:50 EST
That looks to be an issue caused by an old and unreleased version of the base-db.  Can you please re-test with released db versions?
Comment 9 Tomas Rusnak 2012-12-13 10:06:36 EST
Retested with db from attachment and with force parameter did the job:

...
Creating relationships between store entities
Updating database to version 1.25
Creating snapshot named 'Database upgrade to 1.25 automatic pre-upgrade snapshot at Thu Dec 13 07:12:58 UTC 2012 -- 4d0b6a50ecc0b'
Retrieving Subsystem 'job_etl_server'
...
Updating Parameter 'JOB_ETL_SERVER.SPOOL'
Creating relationships between store entities
Database upgrade completed successfully

Also retested with empty db from stable release.

>>> VERIFIED

Note You need to log in before you can comment on or make changes to this bug.