Bug 906744
| Summary: | The db connection info doesn't updated to the web gear after move the db gear across district | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OKD | Reporter: | Rony Gong 🔥 <qgong> | ||||
| Component: | Pod | Assignee: | Rajat Chopra <rchopra> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 2.x | CC: | dmcphers | ||||
| 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: | 2013-02-13 23:16:45 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: | |||||||
| Attachments: |
|
||||||
Fixed with rev#bb93bb5, pull request - https://github.com/openshift/origin-server/pull/1272 Verified on devenv_2765.
1.In multi distct env, move the db gear across district.
[root@ip-10-114-222-187 openshift]# oo-admin-move --gear_uuid 510f42945a4a0f3f0a00002b -i ip-10-202-43-37 --allow_change_district
** Notice: The native BSON extension was not loaded. **
For optimal performance, use of the BSON extension is recommended.
To enable the extension make sure ENV['BSON_EXT_DISABLED'] is not set
and run the following command:
gem install bson_ext
If you continue to receive this message after installing, make sure that
the bson_ext gem is in your load path.
URL: http://qsjbosseap-qgong20.dev.rhcloud.com
Login: qgong
App UUID: 510f42405a4a0f3f0a000005
Gear UUID: 510f42945a4a0f3f0a00002b
DEBUG: Source district uuid: 510f41eb5a4a0fab16000001
DEBUG: Destination district uuid: 510f41fa5a4a0fc116000001
DEBUG: Getting existing app 'qsjbosseap' status before moving
DEBUG: Gear component 'jbossas-7' was running
DEBUG: Stopping existing app cartridge 'mongodb-2.2' before moving
DEBUG: Performing cartridge level pre-move for embedded mongodb-2.2 for 'qsjbosseap' on ip-10-114-222-187
DEBUG: Reserved uid '1000' on district: '510f41fa5a4a0fc116000001'
DEBUG: Creating new account for gear '510f42945a' on ip-10-202-43-37
DEBUG: Moving content for app 'qsjbosseap', gear '510f42945a' to ip-10-202-43-37
Identity added: /var/www/openshift/broker/config/keys/rsync_id_rsa (/var/www/openshift/broker/config/keys/rsync_id_rsa)
Warning: Permanently added '10.114.222.187' (RSA) to the list of known hosts.
Warning: Permanently added '10.202.43.37' (RSA) to the list of known hosts.
Agent pid 14076
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 14076 killed;
DEBUG: Performing cartridge level move for embedded mongodb-2.2 for 'qsjbosseap' on ip-10-202-43-37
DEBUG: Performing cartridge level post-move for embedded mongodb-2.2 for 'qsjbosseap' on ip-10-202-43-37
DEBUG: Starting cartridge 'mongodb-2.2' in 'qsjbosseap' after move on ip-10-202-43-37
DEBUG: Fixing DNS and mongo for gear '510f42945a' after move
DEBUG: Changing server identity of '510f42945a' from 'ip-10-114-222-187' to 'ip-10-202-43-37'
DEBUG: Deconfiguring old app 'qsjbosseap' on ip-10-114-222-187 after move
Successfully moved 'qsjbosseap' with gear uuid '510f42945a4a0f3f0a00002b' from 'ip-10-114-222-187' to 'ip-10-202-43-37'
2. Check the db connection:
[qsjbosseap-qgong20.dev.rhcloud.com ~]\> mongo
MongoDB shell version: 2.2.2
connecting to: 510f42945a-qgong20.dev.rhcloud.com:38031/admin
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
> show dbs;
admin 0.03125GB
local (empty)
qsjbosseap 0.03125GB
|
Created attachment 691526 [details] development.log of move db cartridge across district Description of problem: The db connection info doesn't update to the web gear after move the db gear across district.So can't connect to the db anymore Version-Release number of selected component (if applicable): devenv_2757 How reproducible: always Steps to Reproduce: 1.Create multi node env, 2 districts and add nodes into them 2.Create scalable application(jbosseap) and embed db, check the db connection info by ssh into db gear [510b941199-qgong14.dev.rhcloud.com ~]\> env|grep DB OPENSHIFT_MYSQL_DB_PROXY_PORT=38301 OPENSHIFT_MYSQL_DB_PORT=3306 OPENSHIFT_MYSQL_DB_HOST=127.2.15.1 OPENSHIFT_MYSQL_DB_PASSWORD=dFArF-66lsgc OPENSHIFT_MYSQL_DB_USERNAME=adminJHShuXh OPENSHIFT_MYSQL_DB_SOCKET=/var/lib/openshift/510b9411998a40120700045c//mysql-5.1/socket/mysql.sock OPENSHIFT_MYSQL_DB_URL=mysql://adminJHShuXh:dFArF-66lsgc.15.1:3306/ OPENSHIFT_MYSQL_DB_LOG_DIR=/var/lib/openshift/510b9411998a40120700045c//mysql-5.1/log 3.Move the db cartridge accross district, then check the db connection info, find updated [510b941199-qgong14.dev.rhcloud.com ~]\> env|grep DB OPENSHIFT_MYSQL_DB_PROXY_PORT=38176 OPENSHIFT_MYSQL_DB_PORT=3306 OPENSHIFT_MYSQL_DB_HOST=127.2.2.129 OPENSHIFT_MYSQL_DB_PASSWORD=dFArF-66lsgc OPENSHIFT_MYSQL_DB_USERNAME=adminJHShuXh OPENSHIFT_MYSQL_DB_SOCKET=/var/lib/openshift/510b9411998a40120700045c//mysql-5.1/socket/mysql.sock OPENSHIFT_MYSQL_DB_URL=mysql://adminJHShuXh:dFArF-66lsgc.2.129:3306/ OPENSHIFT_MYSQL_DB_LOG_DIR=/var/lib/openshift/510b9411998a40120700045c//mysql-5.1/log 4. check the db connection info in the web gear still keep same, so can't connect db Actual results: 4. check the db connection info in the web gear still keep same, so can't connect db [qsjbosseap-qgong14.dev.rhcloud.com ~]\> set -x [qsjbosseap-qgong14.dev.rhcloud.com ~]\> mysql + mysql + '[' -n 510b941199-qgong14.dev.rhcloud.com ']' + hostopt='-h 510b941199-qgong14.dev.rhcloud.com' + portopt='-P 38301' + useropt='-u adminJHShuXh' + passopt=--password=dFArF-66lsgc + /usr/bin/mysql -h 510b941199-qgong14.dev.rhcloud.com -P 38301 -u adminJHShuXh --password=dFArF-66lsgc ERROR 2003 (HY000): Can't connect to MySQL server on '510b941199-qgong14.dev.rhcloud.com' (111) [qsjbosseap-qgong14.dev.rhcloud.com ~]\> timed out waiting for input: auto-logout Connection to qsjbosseap-qgong14.dev.rhcloud.com closed Expected results: The db connection info should update to the web gear after move the db gear across district, db could connect. Additional info: