Bug 1038129 - Gear is not started after restore when hot_deploy marker is present for all cartridges
Summary: Gear is not started after restore when hot_deploy marker is present for all c...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
: 1036513 (view as bug list)
Depends On:
Blocks: 1061423
TreeView+ depends on / blocked
 
Reported: 2013-12-04 13:33 UTC by Michal Fojtik
Modified: 2015-05-15 00:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1061423 (view as bug list)
Environment:
Last Closed: 2014-03-12 03:05:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Fojtik 2013-12-04 13:33:27 UTC
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

Comment 1 Michal Fojtik 2013-12-04 13:48:05 UTC
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?

Comment 2 Vojtech Vitek 2013-12-04 13:54:14 UTC
*** Bug 1036513 has been marked as a duplicate of this bug. ***

Comment 3 openshift-github-bot 2013-12-11 14:17:24 UTC
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

Comment 4 Yan Du 2013-12-12 10:20:58 UTC
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.

Comment 5 Lei Zhang 2013-12-18 10:54:17 UTC
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.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

Comment 6 Jakub Hadvig 2014-01-22 14:55:18 UTC
Tried to reproduce devenv_4258.
After restoring the app, the cartridge is running.

Tested on Ruby-1.9 and JBoss7-AS

Comment 7 chunchen 2014-01-23 11:01:07 UTC
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


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