Red Hat Bugzilla – Bug 860536
gears info will not record into gear-registry.db and failed to redirect connection to gears when access the scalable app dns
Last modified: 2015-05-14 18:59:57 EDT
Created attachment 617391 [details]
Description of problem:
Create scalable app, and disable the auto scaling for it. Scale-up the app. Go to the /haproxy-status/ page, only the gears gear-<appname>-<domainname> and local-gear exist. SSH to the app and try to check the haproxy-1.4/conf/gear-registry.db, nothing in it.
Access the APP DNS, it will not redirect to the other gears.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Create scalable app and disable the auto scaling
$rhc app create -a php1s -s -t php-5.3
2.Scale up the app
3.Go to haproxy/status/ page to check the gears
4.SSH to the app and check the gear-registry.db content
5.Write the following code to the php/index.php to grep the Gear DNS
echo "GEAR DNS: " . $_ENV['OPENSHIFT_GEAR_DNS']
3. Only gear-php1s-bmengdev and local-gear exist
4. Nothing in the gear-registry.db
5. It will always show the APP DNS when access the url via different session.
3. All gears should show here.
4. All gears should exist in the gear-registry.db
5. It should redirect the connection to different gears each access.
User can get the gear info via REST API /gear_groups/
As per a conv. w/ Mrunal, picking this one up.
Works fine for me -- couple of things:
1. devenv_2229 looks to be really old -- am on devenv_2246.
2. The second part is in step 5 -- don't use $_ENV -- that might not always work
-- try getenv instead. Try something like:
echo "GEAR DNS: " . getenv('OPENSHIFT_GEAR_DNS');
If it still fails for you, please attach the haproxy.cfg, gear-registry.db and broker + mcollective logs -- those would contain clues re: why the connectors did not publish/put all the gears
into the registry.
Figured out why this is broken -- its because of a fix made to bugz 857205.
The issue is set-gear-endpoints haproxy connector is called for both the
proxy/framework and web/framework -- and depending on the order things are
processed, we will end up w/ randomness of this working or not.
Need to "fix" the fixes made in bugz 857205 in order for this to work properly.
Waiting on pull request to be merged:
Checked on devenv_2250, issue has been fixed.
[php1s-bmengdev.dev.rhcloud.com conf]\> cat gear-registry.db