Bug 917864

Summary: gear-registry.db file is not getting updated in scaled env
Product: OKD Reporter: Sumana Annam <sannam>
Component: ContainersAssignee: Rob Millner <rmillner>
Status: CLOSED NEXTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: bmeng, jofernan, mfisher, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-09 02:32:43 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 Sumana Annam 2013-03-05 00:06:39 UTC
Description of problem:

Ref: https://openshift.redhat.com/community/faq/can-i-access-my-applications-gear

I have used haproxy_ctld -u to launch a new gear in manual mode. haproxy_ctld_daemon was not and is not running. Using rhc app show, I saw Scaling: go from 1 to 2 as expected. However, ~/haproxy-1.4/conf/gear-registry.db is empty. Where else can I find the IP or host of the framework gear?


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Rob Millner 2013-03-06 19:09:05 UTC
Can't reproduce this issue on devenv or int.

[rmtest-rmillnerint.int.rhcloud.com 51378bb36cec0e896a00007d]\> haproxy_ctld -u
[rmtest-rmillnerint.int.rhcloud.com 51378bb36cec0e896a00007d]\> cat ~/haproxy-1.4/conf/gear-registry.db
5137920b6cec0e896a000179.73.135:php-5.3;5137920b6cec0e896a000179-rmillnerint.int.rhcloud.com


Taking off the build blocker list.

Comment 2 Rob Millner 2013-03-06 22:32:09 UTC
The haproxy_ctld daemon should be running; but you can disable auto_scaling by setting the appropriate marker.

Here's how to do that:

Go into your git clone of the application
touch .openshift/markers/disable_auto_scaling
git add .openshift/markers/disable_auto_scaling
git commit -m 'Disabled automatic scaling'
git push


Then ssh back into your head gear, scale up and observe ~/haproxy-1.4/conf/gear-registry.db.

Comment 3 Meng Bo 2013-03-07 03:00:22 UTC
Try this bug in two ways,

One is Rob mentioned, after haproxy_ctld -u, gear info recorded into gear_registry.db

The other one, is kill the haproxy_ctld manually, then haproxy_ctld -u,
\> ps -ef |grep haproxy_ctld
501      2142     1  0 21:33 ?        00:00:00 haproxy_ctld.rb                                                                                  
501      23470 23012  0 21:41 pts/1    00:00:00 grep haproxy_ctld                                                             
\> kill -9 2142
\> cat haproxy-1.4/conf/gear-registry.db
\> haproxy_ctld -u
\> cat haproxy-1.4/conf/gear-registry.db
5137fe407883cf878100000a.189.249:jbossas-7;5137fe407883cf878100000a-bmengdev.dev.rhcloud.com
\> ps -ef |grep haproxy_ctld
501      13941     1  0 21:45 ?        00:00:00 haproxy_ctld.rb                                                                                  
501      24985 23012  0 21:45 pts/1    00:00:00 grep haproxy_ctld



One concern of the issue in topic is, the haproxy_ctld -u took a long timeļ¼Œand the gear which just scaled-up has already scaled-down automatically.

Please add disable_auto_scaling marker to prevent this kind of problem. As comment#2.  Thanks.

Move bug to verified.