Bug 966774 - HAProxy validate configuration does not work
HAProxy validate configuration does not work
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-23 18:47 EDT by Mrunal Patel
Modified: 2015-05-14 19:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-11 00:10:22 EDT
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)

  None (edit)
Description Mrunal Patel 2013-05-23 18:47:04 EDT
Description of problem:
It still calls old app_ctl.sh



Steps to Reproduce:
1. Modify gear-registry.db and observe haproxy logs. Validation will cause haproxy_ctld.rb to fail
Comment 2 Xiaoli Tian 2013-05-24 06:47:25 EDT
Verified it on devenv_3269.

1) Creating an scaling app:
# rhc app create scalephp php-5.3 -s
2) Set min gear to 2
#rhc cartridge-scale -a scalephp -c php-5.3 --min 2
3)Modify ip in gear-registry.db file to wrong value:

Modify  the following line 
533783926584498005737472@10.145.231.250:php;533783926584498005737472-domx1.dev.rhcloud.com

To

533783926584498005737472@10.145.231.2:php;533783926584498005737472-domx1.dev.rhcloud.com


4) Check haproxy.log and validate_config.log ( waiting for some minutes), 
There's no error log in haproxy.log

In validate_config.log, you could find the reparing log:
# cat validate_config.log 
# Logfile created on 2013-05-24 06:27:25 -0400 by logger.rb/31641
I, [2013-05-24T06:39:04.183850 #21723]  INFO -- : GEAR_INFO - validate: Repairing configuration to use IP address 10.145.231.250 for gear 533783926584498005737472-domx1.dev.rhcloud.com ...
I, [2013-05-24T06:39:04.184370 #21723]  INFO -- : GEAR_INFO - repair: Repaired gear registry - 533783926584498005737472-domx1.dev.rhcloud.com now resolves to 10.145.231.250 (was 10.145.231.2)
I, [2013-05-24T06:39:04.189709 #21723]  INFO -- : GEAR_INFO - repair: Repaired haproxy config - 533783926584498005737472-domx1.dev.rhcloud.com now resolves to 10.145.231.250 (was 10.145.231.2)
I, [2013-05-24T06:39:04.189786 #21723]  INFO -- : GEAR_INFO - validate: Configuration was modified, reloading haproxy



5) Check gear-registry.db again, the ip has been repaired back

533783926584498005737472@10.145.231.250:php;533783926584498005737472-domx1.dev.rhcloud.com

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