Bug 1410721 - [networking_public_267] The default check script should be disable when using customized check script for ipfailover pod
Summary: [networking_public_267] The default check script should be disable when using...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Routing
Version: 3.x
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Phil Cameron
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-06 08:57 UTC by zhaozhanqi
Modified: 2017-05-30 12:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-30 12:48:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 12509 0 None None None 2017-01-16 20:41:32 UTC

Description zhaozhanqi 2017-01-06 08:57:02 UTC
Description of problem:
when I created ipfaiover pod using the customized check script. the default check script 'script \"</dev/tcp/${serviceip}/${port}\" still be using after the customized check script. then the customized script will never become effective.

  if [ "$port" = "0" ]; then
    echo "   script \"true\""
  else
    if [[ -n "${HA_CHECK_SCRIPT}" ]]; then
      echo "   if [[ -f ${HA_CHECK_SCRIPT} ]]; then"
      echo "       script \"${HA_CHECK_SCRIPT}\""
      echo "   fi"
-    fi
+   else
    echo "   script \"</dev/tcp/${serviceip}/${port}\""
+    fi
  fi
Version-Release number of selected component (if applicable):
openshift/origin-keepalived-ipfailover   latest              72946971f1da

How reproducible:
always

Steps to Reproduce:
1. touch 2 file '/root/check.sh' and '/root/notify.sh'

2.  Create ipfailover pod with 
  oadm ipfailover ipf --create --virtual-ips='172.18.3.100'  --replicas=1 -w 80  --check-interval=4 --check-script='/root/check.sh' --latest-images --notify-script='/root/notify.sh'

3. mount the check.sh and notify to pod
4. check the keepalived.conf in pod
   
Actual results:


vrrp_script chk_ipf {
   if [[ -f /root/check.sh ]]; then
       script "sh /root/check.sh"
   fi
   script "</dev/tcp/172.18.3.141/80"
   interval 4
}

Expected results:
the default script '  script "</dev/tcp/172.18.3.141/80"' should not be shown

vrrp_script chk_ipf {
   if [[ -f /root/check.sh ]]; then
       script "sh /root/check.sh"
   fi
   interval 4
}

Additional info:

Comment 3 Phil Cameron 2017-01-19 14:26:28 UTC
https://github.com/openshift/origin/pull/12509
MERGED

Comment 4 zhaozhanqi 2017-01-20 02:46:06 UTC
Verified this bug on 
openshift version
openshift v1.5.0-alpha.2+0dfac7b-26
kubernetes v1.5.2+43a9be4
etcd 3.1.0-rc.0

with images:

openshift/origin-keepalived-ipfailover   latest              6da1e099dca9


the issue has been fixed. 

Marked as 'verified'


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