Bug 1158737 - App didn't inherit HA when created from another HA app.
Summary: App didn't inherit HA when created from another HA app.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1160699
TreeView+ depends on / blocked
 
Reported: 2014-10-30 05:04 UTC by Liang Xia
Modified: 2015-07-07 23:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1160699 (view as bug list)
Environment:
Last Closed: 2015-07-07 23:49:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liang Xia 2014-10-30 05:04:15 UTC
Description of problem:
Create an app via rhc --from-app from another HA app,
the newly create app didn't inherit HA.

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

How reproducible:
always

Steps to Reproduce:
1.Create a scalable app.
$ rhc app-create appname cartridges --scaling
2.Make the app HA.
$ rhc app-enable-ha appname
3.Create another app based on above HA app.
$ rhc app-create newappname --from-app appname
4.Check newly created app.
$ rhc app-show newappname --gears

Actual results:
The app which is created based on HA app didn't inherit HA.

Expected results:
The newly created app should inherit HA.

Additional info:

Comment 1 openshift-github-bot 2014-11-04 23:36:20 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/2b58e82c28b162b7f5c1336811e7d2da19afdcb7
Bug 1158737 - exposes DISABLE_HA on broker

https://github.com/openshift/origin-server/commit/45df06e0959ed8fbc8bb01891d77d595989a1302
Bug 1158737 - exposes the "ha" attribute on the "application" rest endpoint

Comment 2 Chris Ryan 2015-03-16 18:25:11 UTC
This bug is still relevant and reproducible as of devenv_5470 (ami-dc3212b4)

Comment 3 Fabiano Franz 2015-04-24 22:20:34 UTC
Fixed in https://github.com/openshift/rhc/pull/687

Comment 4 openshift-github-bot 2015-04-25 00:52:18 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/cac72e679cba628644b3527f1cdb9c003af7cfd8
Bug 1158737 - creating --from-app need to inherit HA

Comment 5 Liang Xia 2015-04-28 07:59:13 UTC
Checked on devenv_5501 with rhc 1.36.1, the bug has been fixed.

# rhc app-create phps2 --from-app phps1
Application Options
-------------------
Domain:     lxiad
Cartridges: php-5.4
From app:   phps1
Gear Size:  Copied from 'phps1'
Scaling:    yes (copied from 'phps1')
HA:         yes (copied from 'phps1')

Creating application 'phps2' ... done


Waiting for your DNS name to be available ... done

Setting deployment configuration ... done
Pulling down a snapshot of application 'phps1' to /tmp/phps1_temp_clone.tar.gz
...
The authenticity of host 'phps1-lxiad.dev.rhcloud.com (10.181.70.242)' can't be established.
RSA key fingerprint is f9:70:40:4a:63:30:76:aa:11:93:30:13:52:e0:22:fe.
Are you sure you want to continue connecting (yes/no)? yes
done
Restoring from snapshot /tmp/phps1_temp_clone.tar.gz to application 'phps2' ...
The authenticity of host 'phps2-lxiad.dev.rhcloud.com (10.181.70.242)' can't be established.
RSA key fingerprint is f9:70:40:4a:63:30:76:aa:11:93:30:13:52:e0:22:fe.
Are you sure you want to continue connecting (yes/no)? yes
done

Cloning to 'phps2'...

Your application 'phps2' is now available.

  URL:        http://phps2-lxiad.dev.rhcloud.com/
  SSH to:     553f3c44001147572f00004d.rhcloud.com
  Git remote: ssh://553f3c44001147572f00004d.rhcloud.com/~/git/phps2.git/
  Cloned to:  /root/phps2

Run 'rhc show-app phps2' for more details about your app.


# rhc app show  phps2 --gears
ID                       State   Cartridges          Size  SSH URL
------------------------ ------- ------------------- ----- ----------------------------------------------------
553f3c44001147572f00004d started php-5.4 haproxy-1.4 small 553f3c44001147572f00004d.rhcloud.com
lxiad-phps2-1            started php-5.4 haproxy-1.4 small lxiad-phps2-1.rhcloud.com

Comment 6 Chris Ryan 2015-04-28 21:53:19 UTC
I'm still seeing the original issue (app not inheriting HA) on devenv_5503 and rhc 1.36.1:

workdir]$rhc --version
rhc 1.36.1

workdir]$rhc app create phps1 php-5.4 -s

Checking for a domain ... none

Applications are grouped into domains - each domain has a unique name (called a namespace) that becomes part of your
public application URL. You will not be able to create an application without completing this step.

Please enter a namespace (letters and numbers only): testdomain1
Your domain 'testdomain1' has been successfully created

Application Options
-------------------
Domain:     testdomain1
Cartridges: php-5.4
Gear Size:  default
Scaling:    yes

Creating application 'phps1' ... done


Your public SSH key must be uploaded to the OpenShift server to access code.  Upload now? (yes|no) yes

Since you do not have any keys associated with your OpenShift account, your new key will be uploaded as the 'default'
key.

Uploading key 'default' ... done

Waiting for your DNS name to be available ... done

Cloning into 'phps1'...
Warning: Permanently added 'phps1-testdomain1.dev.rhcloud.com' (RSA) to the list of known hosts.

Your application 'phps1' is now available.

  URL:        http://phps1-testdomain1.dev.rhcloud.com/
  SSH to:     553ffd645fc8b10aa5000542.rhcloud.com
  Git remote: ssh://553ffd645fc8b10aa5000542.rhcloud.com/~/git/phps1.git/
  Cloned to:  /home/cryan/workdir/phps1

Run 'rhc show-app phps1' for more details about your app.

workdir]$rhc app-enable-ha phps1

RESULT:
phps1 is now highly available

workdir]$rhc app-create phps2 --from-app phps1

Application Options
-------------------
Domain:     testdomain1
Cartridges: php-5.4
From app:   phps1
Gear Size:  Copied from 'phps1'
Scaling:    yes (copied from 'phps1')

Creating application 'phps2' ... done

Waiting for your DNS name to be available ... done

Setting deployment configuration ... done
Pulling down a snapshot of application 'phps1' to /tmp/phps1_temp_clone.tar.gz ... done
Restoring from snapshot /tmp/phps1_temp_clone.tar.gz to application 'phps2' ... done

Cloning into 'phps2'...

Your application 'phps2' is now available.

  URL:        http://phps2-testdomain1.dev.rhcloud.com/
  SSH to:     553fff1c5fc8b10aa5000581.rhcloud.com
  Git remote: ssh://553fff1c5fc8b10aa5000581.rhcloud.com/~/git/phps2.git/
  Cloned to:  /home/cryan/workdir/phps2

Run 'rhc show-app phps2' for more details about your app.

workdir]$rhc app show phps2 --gears

ID                       State   Cartridges          Size  SSH URL
------------------------ ------- ------------------- ----- -----------------------------------------------------------------------------
553fff1c5fc8b10aa5000581 started php-5.4 haproxy-1.4 small 553fff1c5fc8b10aa5000581.rhcloud.com
553fff1c5fc8b10064000047 started php-5.4             small 553fff1c5fc8b10064000047.rhcloud.com

workdir]$rhc app-enable-ha phps2

RESULT:
phps2 is now highly available

Comment 7 Chris Ryan 2015-04-29 22:26:22 UTC
The output in comment #6 above was an error in my setup. Please disregard.


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