Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1161136

Summary: [2.1 backport] openshift-sni-proxy restart command needs to call 'oo-rebuild-haproxy-sni-proxy' function
Product: OpenShift Container Platform Reporter: Luke Meyer <lmeyer>
Component: ContainersAssignee: Luke Meyer <lmeyer>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1.0CC: bleanhar, bperkins, jokerman, libra-bugs, libra-onpremise-devel, lmeyer, mmccomas, xjia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-frontend-haproxy-sni-proxy-0.3.2.2-1.el6op Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1160562 Environment:
Last Closed: 2014-12-02 14:36:59 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:
Bug Depends On: 1161135    
Bug Blocks:    

Description Luke Meyer 2014-11-06 13:26:55 UTC
+++ This bug was initially created as a clone of Bug #1160562 +++

Description of problem:
If changing something in /etc/openshift/node-plugins.d/openshift-origin-frontend-haproxy-sni-proxy.conf. Need to restart openshift-sni-proxy.  But it doesn't call 'oo-rebuild-haproxy-sni-proxy' function. 

/etc/init.d/openshift-sni-proxy: 

restart() {
    $exec -c -q -f $cfgfile
    if [ $? -ne 0 ]; then
        echo "Errors in configuration file, check with $prog check."
        return 1
    fi
    stop
    start
}

case "$1" in
    start)
        # Fix the IP address and config params if they changed.
        oo-rebuild-haproxy-sni-proxy || :
        start
        ;;
    stop|restart|reload)
        $1
        ;;
    force-reload)
        restart
        ;;

Version-Release number of selected component (if applicable):
OSE-2.2 2014-10-29.1

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
oo-rebuild-haproxy-sni-proxy is not called

Expected results:
oo-rebuild-haproxy-sni-proxy should be run when restarting openshift-sni-proxy service

Additional info:

Comment 2 Luke Meyer 2014-11-06 21:21:03 UTC
origin-server cherrypick:
commit 7599f7cda80e9090a3ccaed560865e211cdea787
Author: Luke Meyer lmeyer
Date: Thu Nov 6 16:03:29 2014 -0500

Comment 6 xjia 2014-11-10 03:19:59 UTC
PUDDLE:
2.1.z/2014-11-06.1

Verify:
[root@node1 ~]# cat /var/lib/openshift/.httpd.d/sniproxy.cfg | grep 2310
[root@node1 ~]# cat /etc/openshift/node-plugins.d/openshift-origin-frontend-haproxy-sni-proxy.conf | grep 2310
[root@node1 ~]# vim /etc/openshift/node-plugins.d/openshift-origin-frontend-haproxy-sni-proxy.conf
[root@node1 ~]# cat /etc/openshift/node-plugins.d/openshift-origin-frontend-haproxy-sni-proxy.conf | grep 2310
PROXY_PORTS="2303,2304,2305,2306,2307,2308,2309,2310"
[root@node1 ~]# /etc/init.d/openshift-sni-proxy restart
Stopping haproxy15:                                        [  OK  ]
Starting haproxy15:                                        [  OK  ]
[root@node1 ~]# cat /var/lib/openshift/.httpd.d/sniproxy.cfg | grep 2310
listen sniproxy-2310
       bind         127.0.0.1:2310,172.16.100.79:2310
[root@node1 ~]#

Comment 7 JBoss JIRA Server 2014-11-10 03:25:03 UTC
Xuan Jia <xjia> updated the status of jira ENTESB-2162 to Closed