Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1061423 - Gear is not started after restore when hot_deploy marker is present for all cartridges
Gear is not started after restore when hot_deploy marker is present for all c...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
2.0.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
: UpcomingRelease
Depends On: 1038129
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-04 15:05 EST by Brenton Leanhardt
Modified: 2017-03-08 12 EST (History)
10 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-node-1.17.5.9-1.el6op openshift-origin-node-util-1.17.5-1.el6op
Doc Type: Bug Fix
Doc Text:
After restoring an application snapshot, gears with the hot_deploy marker did not restart. This bug fix updates the marker logic and gears with the hot_deploy marker now restart correctly. The MCollective service must be restarted after applying this fix.
Story Points: ---
Clone Of: 1038129
Environment:
Last Closed: 2014-02-25 10:47:55 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0209 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.3 bugfix and enhancement update 2014-02-25 15:40:32 EST

  None (edit)
Description Brenton Leanhardt 2014-02-04 15:05:16 EST
+++ This bug was initially created as a clone of Bug #1038129 +++

Description of problem:

When restoring a snapshot of gear with hot_deploy marker present, the gear is not started after successfull restore.
This apply to all cartridges, initially this was found in Zend cartridge, where
the hot_deploy marker is included in the cartridge template.

Steps to Reproduce:

1. rhc app create ruby01 ruby-1.9
2. touch ruby01/.openshift/markers/hot_deploy
3. cd ruby01 && git add -A && git commit -am 'xxx' && git push
4. rhc snapshot save ruby01
5. rhc snapshot restore -a ruby01 -f ruby01.tar.gg
6. rhc cartridge status -a ruby01 -c ruby-1.9

Actual results:

 ~/ruby01 → rhc cartridge status -a ruby01 -c ruby-1.9
RESULT:
Application is either stopped or inaccessible


Expected results:

Application should be started.

Additional info:

14:24 < agoldste> mfojtik: yeah we don't start the cart if the hot deploy marker is present
14:24 < agoldste> mfojtik: in activate()
14:24 < agoldste> which is what restore calls

--- Additional comment from Michal Fojtik on 2013-12-04 08:48:05 EST ---

Marking this as not blocker, since this bug was there since 2.0.35 and it seems to be nor regression. Jhon, are you OK with this?

--- Additional comment from Vojtech Vitek on 2013-12-04 08:54:14 EST ---



--- Additional comment from openshift-github-bot on 2013-12-11 09:17:24 EST ---

Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/a568bd63147b15e71ba41734421340eeee8b2b99
Bug 1038129 - Gear is not started after restore when hot_deploy marker is present

--- Additional comment from Yan Du on 2013-12-12 05:20:58 EST ---

Test on devenv_4127, 

Issue can't be reproduced, showing correct status after restore.

root@openshift-ubuntu:~# rhc snapshot restore -a r19 -f r19.tar.gz 
Restoring from snapshot r19.tar.gz...
Removing old git repo: ~/git/r19.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/r19.git and ~/app-root/data
Activation status: success

RESULT:
Success
root@openshift-ubuntu:~# rhc cartridge status -a r19 -c ruby-1.9
RESULT:
Application is running

Move to verified.

--- Additional comment from Lei Zhang on 2013-12-18 05:54:17 EST ---

This issue still exists on devenv-stage_619

There are my steps
Step 1 enable hot_deploy marker and git push
Step 2 save snapshot 
Step 3 restore snapshot
Step 4 check the statue of gear

[lijun@ray Work]$ rhc cartridge status -a myjbosseap6 -c jbosseap-6
RESULT:
Application is running
[lijun@ray Work]$ rhc snapshot restore -a  myjbosseap6 -f myjbosseap6.tar.gz -d
DEBUG: Using config file /home/lijun/.openshift/express.conf
DEBUG: Git config 'git config --get rhc.app-id' returned ''
DEBUG: Git config 'git config --get rhc.app-name' returned ''
DEBUG: Git config 'git config --get rhc.domain-name' returned ''
DEBUG: Authenticating with RHC::Auth::Token
DEBUG: Connecting to https://ec2-54-221-106-253.compute-1.amazonaws.com/broker/rest/api
DEBUG: Getting all domains
DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5
DEBUG: Using token authentication
DEBUG: Created new httpclient
DEBUG: Request GET https://ec2-54-221-106-253.compute-1.amazonaws.com/broker/rest/api
DEBUG: SSL Verification failed -- Using self signed cert
DEBUG:    code 200 1164 ms
DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6
DEBUG:    Using API version 1.5
DEBUG: Client API version 1.5 is not current. Refetching API
DEBUG: Using token authentication
DEBUG: Request GET https://ec2-54-221-106-253.compute-1.amazonaws.com/broker/rest/api
DEBUG:    code 200  304 ms
DEBUG: Using token authentication
DEBUG: Request GET https://ec2-54-221-106-253.compute-1.amazonaws.com/broker/rest/domains
DEBUG:    code 200  326 ms
DEBUG: Using token authentication
DEBUG: Request GET https://ec2-54-221-106-253.compute-1.amazonaws.com/broker/rest/domains/chunchen/applications/myjbosseap6
DEBUG:    code 200  319 ms
Restoring from snapshot myjbosseap6.tar.gz...
DEBUG: cat 'myjbosseap6.tar.gz' | ssh 52b175f46fe14772bc0004a5@myjbosseap6-chunchen.dev.rhcloud.com 'restore INCLUDE_GIT'
Removing old git repo: ~/git/myjbosseap6.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/myjbosseap6.git and ~/app-root/data
Activation status: success

RESULT:
Success
[lijun@ray Work]$ rhc cartridge status -a myjbosseap6 -c jbosseap-6
RESULT:
Application is either stopped or inaccessible

--- Additional comment from Jakub Hadvig on 2014-01-22 09:55:18 EST ---

Tried to reproduce devenv_4258.
After restoring the app, the cartridge is running.

Tested on Ruby-1.9 and JBoss7-AS

--- Additional comment from chunchen on 2014-01-23 06:01:07 EST ---

It's fixed, verified on devenv_4263, please refer to the following results:

1. rhc app create ceap6 jbosseap-6
2. touch ceap6/.openshift/markers/hot_deploy
3. cd ceap6 && git add -A && git commit -am 'xxx' && git push
4. rhc snapshot save ceap6
5. rhc snapshot restore -a ceap6 -f ceap6.tar.gz
6. rhc cartridge status -a ceap6 -c jbosseap-6

RESULT:
Application is running
Comment 5 Anping Li 2014-02-07 01:22:22 EST
Verify on puddle-2-0-3-2014-02-06 as following actions. I found that the embedded mysql is in 'stop' status after restore.

1. snapshot restore ruby1.9
[ose215@dhcp-9-237 ~]$ rhc snapshot restore -a ruby01 -f ruby01.tar.gz 
Restoring from snapshot ruby01.tar.gz...
Removing old git repo: ~/git/ruby01.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/ruby01.git and ~/app-root/data
httpd: Could not reliably determine the server's fully qualified domain name, using nd217.oseanli.cn for ServerName
Activation status: success

RESULT:
Success
[ose215@dhcp-9-237 ~]$ rhc cartridge status -a ruby01 -c ruby-1.9
RESULT:
Application is running

2. Snapshot restore jbosseap with scaled cartridges
[ose215@dhcp-9-237 ~]$ rhc snapshot restore jbosseap -f jbosseap.tar.gz 
Restoring from snapshot jbosseap.tar.gz...
Removing old git repo: ~/git/jbosseap.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/jbosseap.git and ~/app-root/data
Distribution status: success
Activation status: success

RESULT:
Success
[ose215@dhcp-9-237 ~]$ rhc app show jbosseap --gears
ID                       State   Cartridges             Size  SSH URL
------------------------ ------- ---------------------- ----- ----------------------------------------------------------------------
52f475db4945dc14ab0001e2 started jbosseap-6 haproxy-1.4 small 52f475db4945dc14ab0001e2@jbosseap-hanli1dom.oseanli.cn
52f4763a4945dc14ab00020d started jbosseap-6 haproxy-1.4 small 52f4763a4945dc14ab00020d@52f4763a4945dc14ab00020d-hanli1dom.oseanli.cn

3. snapshot restore jbosseap with mysql

[ose215@dhcp-9-237 ~]$ rhc app show jbosseap --gears
ID                       State   Cartridges             Size  SSH URL
------------------------ ------- ---------------------- ----- ----------------------------------------------------------------------
52f475db4945dc14ab0001e2 started jbosseap-6 haproxy-1.4 small 52f475db4945dc14ab0001e2@jbosseap-hanli1dom.oseanli.cn
52f4763a4945dc14ab00020d started jbosseap-6 haproxy-1.4 small 52f4763a4945dc14ab00020d@52f4763a4945dc14ab00020d-hanli1dom.oseanli.cn
52f4794b4945dc14ab000252 started mysql-5.1              small 52f4794b4945dc14ab000252@52f4794b4945dc14ab000252-hanli1dom.oseanli.cn


[ose215@dhcp-9-237 ~]$ rhc snapshot restore jbosseap
Restoring from snapshot jbosseap.tar.gz...
Removing old git repo: ~/git/jbosseap.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/jbosseap.git and ~/app-root/data
Restoring snapshot for mysql-5.1 gear
Removing old data dir: ~/app-root/data/*
Restoring ~/app-root/data
Old and new names are the same, no need to rename
Distribution status: success
Activation status: success

RESULT:
Success
[ose215@dhcp-9-237 ~]$ rhc app show jbosseap --gears
ID                       State   Cartridges             Size  SSH URL
------------------------ ------- ---------------------- ----- ----------------------------------------------------------------------
52f475db4945dc14ab0001e2 started jbosseap-6 haproxy-1.4 small 52f475db4945dc14ab0001e2@jbosseap-hanli1dom.oseanli.cn
52f4763a4945dc14ab00020d started jbosseap-6 haproxy-1.4 small 52f4763a4945dc14ab00020d@52f4763a4945dc14ab00020d-hanli1dom.oseanli.cn
52f4794b4945dc14ab000252 stopped mysql-5.1              small 52f4794b4945dc14ab000252@52f4794b4945dc14ab000252-hanli1dom.oseanli.cn
Comment 6 Anping Li 2014-02-07 02:59:38 EST
"The embedded mysql is in 'stop' status after restore" is another bugs  https://bugzilla.redhat.com/show_bug.cgi?id=1030305. we expects to merge it  from online.
Comment 8 errata-xmlrpc 2014-02-25 10:47:55 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0209.html

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