Bug 966774 - HAProxy validate configuration does not work
Summary: HAProxy validate configuration does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Mrunal Patel
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-23 22:47 UTC by Mrunal Patel
Modified: 2015-05-14 23:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 04:10:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mrunal Patel 2013-05-23 22:47:04 UTC
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 10:47:25 UTC
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.231.250:php;533783926584498005737472-domx1.dev.rhcloud.com

To

533783926584498005737472.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.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.