Bug 822080

Summary: cannot access mysql shell for scalable app after alter namespace
Product: OKD Reporter: Meng Bo <bmeng>
Component: ContainersAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: ramr, rmillner, xtian
Target Milestone: ---Keywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 17:59:22 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 Meng Bo 2012-05-16 09:40:29 UTC
Description of problem:
create scalable app and embed mysql to it, after alter domain, mysql shell cannot be accessed since the .env/OPENSHIFT_DB_GEAR_DNS and .env/OPENSHIFT_DB_URL not changed.

Version-Release number of selected component (if applicable):
cartridge-mysql-5.1-0.27.1-1.git.10.b36de63.el6.noarch
devenv-1778

How reproducible:
always

Steps to Reproduce:
1.create scalable app
2.add mysql to the app
3.alter namespace
4.ssh to the app and use mysql shell
  
Actual results:
mysql shell cannot be accessed.
[no1s-bmengdev2.dev.rhcloud.com ~]\> mysql
ERROR 2005 (HY000): Unknown MySQL server host '46e1917008-bmengdev.dev.rhcloud.com' (1)

Expected results:
should connect to mysql db without any error.

Additional info:
domain name changed from bmengdev to bmengdev2

[no1s-bmengdev2.dev.rhcloud.com ~]\> env|grep DB
<---->
OPENSHIFT_DB_URL=mysql://admin:IIA1vwdyH4Dg.rhcloud.com:35551/
OPENSHIFT_DB_GEAR_DNS=46e1917008-bmengdev.dev.rhcloud.com
<---->

Comment 1 Ram Ranganathan 2012-05-21 21:27:38 UTC
Looks like execute-connections are not called on the mysql gear for scalable apps. If the connectors are not called, then the DB_GEAR_DNS is not updated.

From your output -- namespace for the app is bmengdev2  -- as seen from the
haproxy app ssh session:    no1s-bmengdev2.dev.rhcloud.com
and the DB_GEAR_DNS still is using the old bmengdev namespace (note missing 2 
at the end).  OPENSHIFT_DB_GEAR_DNS=46e1917008-bmengdev.dev.rhcloud.com

Assigning to rchopra.

Comment 2 Ram Ranganathan 2012-05-25 18:29:54 UTC
*** Bug 825245 has been marked as a duplicate of this bug. ***

Comment 3 Rajat Chopra 2012-05-25 19:24:07 UTC
Fixed with pull request # 61 on crankcase repo. rev#ab4dab6ad50b462ab6d9706dac72cca10c0ebbd6

Comment 4 Meng Bo 2012-05-28 09:45:12 UTC
verified on devenv_1806,
issue has been fixed.