diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr b/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr index d276bfde88a..33b0ea310cb 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr +++ b/systemvm/patches/debian/config/etc/init.d/cloud-passwd-srvr @@ -86,16 +86,16 @@ getpid() { echo $pid } -stop_socat() { - spid=$(pidof socat) - [ "$spid" != "" ] && kill -9 $spid && echo "Killed socat (pid=$spid)" +stop_password_server() { + spid=$(pidof -s python passwd_server_ip.py) + [ "$spid" != "" ] && kill -9 $spid && echo "Killed password server (pid=$spid)" return 0 } stop () { - stop_socat + stop_password_server pid=$(getpid) - [ "$pid" != "" ] && kill -9 $pid && remove_iptables_rules && echo "Stopped password server (pid=$pid)" && stop_socat && return 0 + [ "$pid" != "" ] && kill -9 $pid && remove_iptables_rules && echo "Stopped password server (pid=$pid)" && stop_password_server && return 0 echo "Password server is not running" && return 0 } diff --git a/systemvm/patches/debian/config/opt/cloud/bin/vpc_guestnw.sh b/systemvm/patches/debian/config/opt/cloud/bin/vpc_guestnw.sh index 0115ab2482c..a7881345a01 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/vpc_guestnw.sh +++ b/systemvm/patches/debian/config/opt/cloud/bin/vpc_guestnw.sh @@ -121,7 +121,7 @@ setup_passwdsvcs() { desetup_passwdsvcs() { logger -t cloud "Desetting up password service for network $ip/$mask, eth $dev " sudo iptables -D INPUT -i $dev -d $ip -p tcp -m state --state NEW --dport 8080 -j ACCEPT - pid=`ps -ef | grep socat | grep $ip | grep -v grep | awk '{print $2}'` + pid=`ps -ef | grep passwd_server_ip.py | grep $ip | grep -v grep | awk '{print $2}'` if [ -n "$pid" ] then kill -9 $pid diff --git a/systemvm/patches/debian/config/opt/cloud/bin/vpc_passwd_server b/systemvm/patches/debian/config/opt/cloud/bin/vpc_passwd_server index 16a4466667d..3e201cb10d2 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/vpc_passwd_server +++ b/systemvm/patches/debian/config/opt/cloud/bin/vpc_passwd_server @@ -25,7 +25,7 @@ do rc=$? if [ $rc -ne 0 ] then - logger -t cloud "Password server failed with error code $rc. Restarting socat..." + logger -t cloud "Password server failed with error code $rc. Restarting password server..." sleep 3 fi result=`ip addr show | grep $ip` diff --git a/test/integration/component/maint/test_multiple_ip_ranges.py b/test/integration/component/maint/test_multiple_ip_ranges.py index f73c470d003..cd845d29de7 100644 --- a/test/integration/component/maint/test_multiple_ip_ranges.py +++ b/test/integration/component/maint/test_multiple_ip_ranges.py @@ -362,7 +362,7 @@ class TestMultipleIpRanges(cloudstackTestCase): def test_03_passwd_service_on_alias_IP(self): """Deploy guest vm in new CIDR and verify passwd service on alias ip 1.Deploy guest vm in new cidr - 2.Verify password service(socat) listens on alias ip in VR + 2.Verify password service(passwd_server_ip.py) listens on alias ip in VR """ list_router_response = list_routers( self.apiclient, @@ -403,7 +403,7 @@ class TestMultipleIpRanges(cloudstackTestCase): # attempt SshClient(host.ipaddress, port, username, password) - proc = "socat" + proc = "python passwd_server_ip.py" result = get_process_status( host.ipaddress, port,