Bug 798529

Summary: It'll cause metrics to stopping work after stop then restart an app of embeded metrics
Product: OKD Reporter: bzhao
Component: ContainersAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xKeywords: Regression
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: devenv_1650 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-02 21:56:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description bzhao 2012-02-29 07:46:40 UTC
Description of problem:
Metrics will stop work after stop then restart an app of embeded metrics

Version-Release number of selected component (if applicable):
rhc-0.87.6-1.el6_2.noarch
rhc-cartridge-metrics-0.1-0.9.3-1.el6_2.noarch

How reproducible:
Always

Notes:
Perl and ruby has only the same issue.

Steps to Reproduce:
1. create an app
#rhc-create-app -a perltest -l bzhao -p xxx -t perl-5.10

2. embed metrics-0.1 cartridge
#rhc-ctl-app -a perltest -l bzhao -p xxx -e add-metrics-0.1

3. stop this app using rhc-ctl-app
#rhc-ctl-app -a perltest -l bzhao -p xxx -c stop

3. restart this app using rhc-ctl-app and observe app and metrics's status
#rhc-ctl-app -a perltest -l bzhao -p xxx -c restart
  
Actual results:
Metrics will stop work after restart app

Expected results:
started app and metrics service without error successfully and get correct static metrics page without error

Additional info:
#rhc-ctl-app -a perltest -l bzhao -p xxx -c restart
#rhc-ctl-app -a perltest -l bzhao -p xxx -c status
RESULT:
Total Accesses: 0
Total kBytes: 0
Uptime: 10
ReqPerSec: 0
BytesPerSec: 0
BusyWorkers: 1
IdleWorkers: 0
Scoreboard: W....

# rhc-ctl-app -a perltest -p xxx -e status-metrics-0.1 -d
Contacting https://ec2-107-22-156-151.compute-1.amazonaws.com
Response from server:
DEBUG:

Exit Code: 0
api_c: placeholder
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
API version:    1.1.2

RESULT:
Metrics is either stopped or inaccessible

Comment 1 Dan McPherson 2012-02-29 16:00:56 UTC
This sounds like it is as expected.  And the same as the other embedded carts would behave.  Stop stops everything. Start starts everything.  Restart only restarts the app.


However, now that we have state tracking, this scenario has convinced me that if something is stopped entirely and restart is called we should start everything up.  So restart when started will still only affect the app.  But restart when stopped will mean: the user must have meant start and just didn't realize it was stopped.

Comment 2 bzhao 2012-03-02 01:46:46 UTC
Passed verification against rhc-0.87.7-1.el6_2.noarch