Bug 988069 - 1.2 upgrade fails when using mongo replica set
1.2 upgrade fails when using mongo replica set
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-07-24 12:33 EDT by Luke Meyer
Modified: 2017-03-08 12 EST (History)
4 users (show)

See Also:
Fixed In Version: openshift-enterprise-upgrade-1.2.1-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-05 13:20:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Luke Meyer 2013-07-24 12:33:58 EDT
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):

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:
/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')
Comment 3 Johnny Liu 2013-07-26 05:52:14 EDT
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 13:20:49 EDT
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.


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