Bug 1037457

Summary: undefined method error is seen in the output of ose-upgrade-migrate-datastore when upgrade jbosseap scalable app from 1.2 to 2.0
Product: OpenShift Container Platform Reporter: Johnny Liu <jialiu>
Component: Cluster Version OperatorAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 2.0.0CC: bleanhar, jdetiber, libra-onpremise-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-04 14:44:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Johnny Liu 2013-12-03 08:42:57 UTC
Description of problem:
When upgrade jbosseap scalable app from 1.2 to 2.0, "undefined method `name' for nil:NilClass" error is seen.

Version-Release number of selected component (if applicable):
openshift-enterprise-upgrade-node-2.0.0c-1.git.5.001bfec.el6op.noarch
openshift-enterprise-release-2.0.0c-1.git.5.001bfec.el6op.noarch
openshift-enterprise-yum-validator-2.0.0c-1.git.5.001bfec.el6op.noarch
openshift-enterprise-upgrade-broker-2.0.0c-1.git.5.001bfec.el6op.noarch

How reproducible:
Always

Steps to Reproduce:
1. Setup ose-1.2 env
2. Create jbosseap-6.0 scalable app on the node, and set min gear to 2.
3. Upgrade env from 1.2 to 2.0


Actual results:
# ose-upgrade post

+ /usr/libexec/openshift/ose-upgrade-migrate-datastore --postrelease
Starting postrelease migrations.
Running migration Migrate_2_0_35...
Done migrating 8/8 applications.
Time to get all gears from nodes: 5.443s
Total gears found on the nodes: 28
Failed to migrate app 52981043f16d95099e000172 - undefined method `name' for nil:NilClass
["/usr/libexec/openshift/ose-upgrade-migrate-datastore:1338:in `block (4 levels) in update_gears'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1333:in `map'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1333:in `block (3 levels) in update_gears'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1328:in `each'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1328:in `block (2 levels) in update_gears'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1325:in `each'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1325:in `block in update_gears'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.17.6/lib/openshift/data_store.rb:27:in `block (2 levels) in find'", "/opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/cursor.rb:286:in `each'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.17.6/lib/openshift/data_store.rb:26:in `block in find'", "/opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/collection.rb:276:in `find'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.17.6/lib/openshift/data_store.rb:25:in `find'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1322:in `update_gears'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1240:in `migrate'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:11:in `block in migrate'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:9:in `each'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:9:in `migrate'", "/usr/libexec/openshift/ose-upgrade-migrate-datastore:1452:in `<main>'"]

ERROR: Verification of gear migration failed. Count: 1
Migration Migrate_2_0_35 finished.

Migrations complete.
Done!

--END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/2/post/04-broker-migrate-datastore-postrelease OUTPUT--


Expected results:
No error is seen.

Additional info:

Comment 2 Jason DeTiberus 2013-12-03 21:50:16 UTC
I was unable to replicate this using the latest pad/puddle: http://etherpad.corp.redhat.com/ose-2-0-upgrade-2013-12-03

After fixing a broken upgrade with the mysql cartridge (which is included in the puddle on the pad above) I was not able to replicate.

I believe this error occurred because earlier versions of the 2013-12-02 pad linked to a puddle that was missing the updated msg-node rpm and all gear migrations were failing.

Comment 3 Johnny Liu 2013-12-05 09:35:29 UTC
Verified this bug following http://etherpad.corp.redhat.com/ose-2-0-upgrade-2013-12-04, and PASS.

+ /usr/libexec/openshift/ose-upgrade-migrate-datastore --postrelease
Starting postrelease migrations.
Running migration Migrate_2_0_35...
Error in executing parallel job for gear 52981043f16d95099e000172
Done migrating 7/8 applications.
Time to get all gears from nodes: 5.843s
Total gears found on the nodes: 28
Migration Migrate_2_0_35 finished.

Migrations complete.
Done!

--END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/2/post/04-broker-migrate-datastore-postrelease OUTPUT--