Bug 1002860 - mongo data migration failed when mongo ssl enabled.
mongo data migration failed when mongo ssl enabled.
Status: CLOSED WONTFIX
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
1.2.1
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: John W. Lamb
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-30 02:40 EDT by Johnny Liu
Modified: 2017-03-08 12 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-05 10:30:28 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 Johnny Liu 2013-08-30 02:40:10 EDT
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Setup ose-1.1.3 env
2. Enable mongo ssl
2.1. Make sure the following line is existing in /etc/openshift/broker.conf
MONGO_SSL="true"
2.2. Make sure the following lines are existing in /etc/mongodb.conf
sslOnNormalPorts = true
sslPEMKeyFile = /etc/ssl/mongodb.pem
sslPEMKeyPassword = pass
2.3. As you'll notice there is an sslPEMKeyFile setting which references a pem file on the file system.  You'll need to generate this file by using:
# cd /etc/ssl/
# openssl req -new -x509 -days 365 -nodes -out mongodb-cert.pem -keyout mongodb-cert.key
# cat mongodb-cert.key mongodb-cert.pem > mongodb.pem
2.4. Restart the broker and mongod.
3. Create an app against this env.
4. Run ose-upgrade testing.

Actual results:
[root@broker ~]# ose-upgrade data
INFO: OpenShift broker installed.
INFO: Setting broker step 'data' status to UPGRADING
INFO: running /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/step_lock oseupgrade_1_data
INFO: /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/step_lock oseupgrade_1_data ran without error:
--BEGIN OUTPUT--

--END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/step_lock oseupgrade_1_data OUTPUT--
INFO: Running upgrade scripts in /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data
INFO: running /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20
INFO: /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20 ran without error:
--BEGIN OUTPUT--
User migration Started
Checking for all users 
.User migration Done!

--END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.20 OUTPUT--
INFO: running /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.23
ERROR: run_script
/usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.23 had errors:
--BEGIN OUTPUT--
Migration Started...
Could not connect to a primary node for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:220:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/cluster.rb:217:in `with_primary'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/session/context.rb:108:in `with_node'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/session/context.rb:82:in `remove'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/query.rb:275:in `block in remove_all'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/session.rb:312:in `with'
/opt/rh/ruby193/root/usr/share/gems/gems/moped-1.3.2/lib/moped/query.rb:274:in `remove_all'
/usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.23:354:in `clean'
/usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.23:463:in `<main>'

--END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/broker/upgrades/1/data/migrate-mongo-2.0.23 OUTPUT--
INFO: Setting broker step 'data' status to FAILED


Expected results:
data migrate should be passed.

Additional info:
When disable mongo ssl, this step is passed.
Comment 1 Johnny Liu 2013-08-30 02:41:19 EDT
Version-Release number of selected component (if applicable):
upgrade from ose-1.1.3 to ose-1.2.2
Comment 4 Luke Meyer 2013-09-05 10:30:28 EDT
We never discussed enabling mongo ssl in 1.1 - it's not exactly well-supported since there was a memory leak with that setup. We don't expect customers to actually hit this - but if they do, reopen.

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