Bug 866416

Summary: Failed to connect mysql after snapshot restored to a new created scalable app
Product: OKD Reporter: joycezhang <jinzhang>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmace, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: devenv_2340+ Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-06 18:48:15 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 joycezhang 2012-10-15 10:21:37 UTC
Description of problem:
Mysql data couldn't be resotred to a new scalable jbossews app, it can't connect to mysql shell as below:
[myscalapp1-jingdev1.dev.rhcloud.com ~]\> mysql
ERROR 1130 (HY000): Host '127.0.254.129' is not allowed to connect to this MySQL server



Version-Release number of selected component (if applicable):
devenv_2327
rhc-0.99.5.gem

How reproducible:
always


Steps to Reproduce:
1.Create an scaling  jbossews  app
rhc app create -a app1 -t  jbossews-1.0  -s

2. Disable auto scaling by:
create new file $APP_Dir/.openshift/markers/disable_auto_scaling
cd $APP
touch .openshift/markers/disable_auto_scaling
git commit -a -m "disable_auto_scaling"
git push

3. Scale up by rest API

4. Add mysql to the app
#rhc cartridge add mysql-5.10 -a app1

5. Write some data to mysql

6. Snapshot save this app
#rhc snapshot save app1 -p xx

7. Delete this app
#rhc delete app app1 --confirm

8. Repeat step 1 to 4 to create a new scalable app with mysql added.

9. Restore snapshot
#rhc snapshot restore app1 -f ./app1.tar.gz

10. SSH into the app and check mysql data

  
Actual results:
It can't connect to mysql.


Expected results:
Mysql shell can be accessed, and data is restored.

Additional info:
1. It works well if snapshot restored to an existing scalable app.
2. It's also reproduced in other cartridges, like php-5.3.

Comment 1 Dan Mace 2012-10-16 22:07:17 UTC
Fix awaiting merge: https://github.com/openshift/origin-server/pull/691

Comment 2 Xiaoli Tian 2012-10-17 03:26:55 UTC
(In reply to comment #1)
> Fix awaiting merge: https://github.com/openshift/origin-server/pull/691

Above is merged in devenv-2340, move it to ON_QA to verify

Comment 3 joycezhang 2012-10-17 05:06:42 UTC
This bug has been verified on devenv_2340 with rhc-0.99.7.gem client. It's fixed. mysql can be accessed after the new created scalable app restored, and data is back as well. So mark it as Verified.Thanks.

Comment 4 Xiaoli Tian 2012-10-17 13:56:35 UTC
Move it to verified according to comment 3.