Bug 860549 - Can not connect to mongodb after migration
Can not connect to mongodb after migration
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-26 02:35 EDT by Jianwei Hou
Modified: 2015-05-14 18:59 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:47:53 EST
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 Jianwei Hou 2012-09-26 02:35:08 EDT
Description of problem:
After server upgrade and migration, ssh into app and connect to mongodb fails

Version-Release number of selected component (if applicable):
on devenv-stage_239 upgrade to latest

How reproducible:
Always

Steps to Reproduce:
1. Launch an older env, devenv-stage_239 and prepare test data on it
2. modify /etc/yum.repos.d/li.repo, replace stage with candidate to upgrade to latesd devenv
3. upgrade and migrate
yum -y update
git clone  li repo
./li/misc/maintenance/bin/migrate-mongo-2.0.18
replace /usr/libexec/mcollective/mcollective/agent/migrate.rb with latest code, restart service and run migrate
rhc-admin-migrate --version 2.0.18
4. After migrate, ssh into app, and try to connect to mongo
  
Actual results:
Failed to connect to mongodb

[jbossas1s-239t2.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.0.7
connecting to: de64914715-239t2.dev.rhcloud.com:35586/admin
Wed Sep 26 02:26:18 DBClientCursor::init call() failed
Wed Sep 26 02:26:18 query failed : admin.$cmd { authenticate: 1.0, user: "admin", nonce: "80f614817c4aa0fc", key: "57d3812a9cd32cc24bd717b22046d609" } to: de64914715-239t2.dev.rhcloud.com:35586
Wed Sep 26 02:26:18 Error: error doing query: failed shell/collection.js:151
exception: login failed

Expected results:
Should connect to mongodb successfully

Additional info:
Comment 1 Rob Millner 2012-09-26 17:01:33 EDT
It works for me on both a scaled and non-scaled app; here's what was done differently.

On Step 3:

yum -y update

git clone li repo

service libra-broker stop

service mcollective stop

./li/misc/maintenance/bin/migrate-mongo-2.0.18

replace /usr/libexec/mcollective/mcollective/agent/migrate.rb with latest code

replace /usr/bin/rhc-admin-migrate with latest code

service mcollective start

service libra-broker start

rhc-admin-migrate --version 2.0.18



I believe the step where rhc-admin-migrate was replaced is the important change; an older version was installed by the upgrade which should be rectified by the next libra_ami build.
Comment 2 Jianwei Hou 2012-09-26 23:38:09 EDT
Verified following steps in comment 2

Steps:
yum -y update
git clone li repo
service libra-broker stop
service mcollective stop
./li/misc/maintenance/bin/migrate-mongo-2.0.18
replace /usr/libexec/mcollective/mcollective/agent/migrate.rb with latest code
replace /usr/bin/rhc-admin-migrate with latest code
service mcollective start
service libra-broker start
rhc-admin-migrate --version 2.0.18

Result:
After migrate, connect to mongodb successfully

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