Bug 988069

Summary: 1.2 upgrade fails when using mongo replica set
Product: OpenShift Container Platform Reporter: Luke Meyer <lmeyer>
Component: Cluster Version OperatorAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.2.0CC: bleanhar, cpelland, jialiu, libra-onpremise-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-enterprise-upgrade-1.2.1-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-05 17:20:49 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:
Embargoed:

Description Luke Meyer 2013-07-24 16:33:58 UTC
Description of problem:
One script seems to be failing in the upgrade data step if a mongo replica set is in use.

Version-Release number of selected component (if applicable):
openshift-enterprise-upgrade-broker-1.2.0

Actual results:
ERROR: run_script
/usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20 had errors:
--BEGIN OUTPUT--
/opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:479:in `connect': Failed to connect to a master node at mongo1:27017,mongo2 (Mongo::ConnectionFailure)
        from /opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:631:in `setup'
        from /opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:147:in `initialize'
        from /opt/rh/ruby193/root/usr/local/share/gems/gems/mongo-1.8.1/lib/mongo/legacy.rb:56:in `initialize'
        from /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20:15:in `new'
        from /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20:15:in `mongo_connect'
        from /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20:61:in `<main>'


Additional info:
This is easily fixed by modifying the mongo_connect method in /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20 to look as follows:

def mongo_connect
  db = OpenShift::DataStore.db
  $coll = db.collection('user')
end

Comment 3 Johnny Liu 2013-07-26 09:52:14 UTC
Verified this bug with openshift-enterprise-upgrade-broker-1.2.1-2.el6op.noarch, and PASS. No error is seen when migrate mongo data, and after upgrade, create and destroy app successfully.

Comment 5 errata-xmlrpc 2013-08-05 17:20:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1138.html