Bug 1224190

Summary: "service virt-who stop" failed when set "VIRTWHO_INTERVAL" <= 5
Product: Red Hat Enterprise Linux 6 Reporter: Eko <hsun>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7CC: gxing, ovasik, rbalakri, sgao, shihliu, tlavigne
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.16-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 23:55:09 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:

Description Eko 2015-05-22 10:12:43 UTC
Description of problem:
If set "VIRTWHO_INTERVAL" <= 5, then try to stop the virt-who, the virt-who's process can't be killed completely.

Version-Release number of selected component (if applicable):
 - RHEL6.7-20150519.0-Server-x86_64 + ESX5.5 against Stage Candlepin
 - libvirt-0.10.2-54.el6.x86_64
 - virt-who-0.12-8.el6.noarch
 - subscription-manager-1.14.6-1.el6.x86_64

How reproducible:


Steps to Reproduce:
1. Set VIRTWHO_INTERVAL=5 or smaller than 5
# vi /etc/sysconfig/virt-who
VIRTWHO_INTERVAL=5

2. Restart virt-who
# /etc/init.d/virt-who restart
Stopping virt-who:                                         [FAILED]
Starting virt-who:                                         [  OK  ]

3. Check the virt-who process
# ps -ef|grep virt-who
root     23168     1  3 17:59 ?    00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py
root     23174 23168  8 17:59 ?    00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py

Note: There are two PID showed: 23168,23174 

4. Stop virt-who
# /etc/init.d/virt-who stop
Stopping virt-who:                                         [  OK  ]

5. Check the virt-who process again
# ps -ef|grep virt-who
root     23174     1  0 17:59 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py

Note: PID 23174 can't be killed.

6. Set the VIRTWHO_INTERVAL=6 or greater than 6:
# vi /etc/sysconfig/virt-who
VIRTWHO_INTERVAL=6

7. Repeat step3-5:
# /etc/init.d/virt-who restart
Stopping virt-who:                                         [FAILED]
Starting virt-who:                                         [  OK  ]

# ps -ef|grep virt-who
root     23879     1  4 18:07 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py
root     23885 23879 11 18:07 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py

# /etc/init.d/virt-who stop
Stopping virt-who:                                         [  OK  ]

# ps -ef|grep virt-who

Note: All the virt-who PID are killed normally.


Actual results:
If set "VIRTWHO_INTERVAL" <= 5, stop the virt-who, the virt-who's process can't be killed completely.

Expected results:
No matter what is the VIRTWHO_INTERVAL value, all the virt-who PID can be killed.


Additional info:

Comment 2 Radek Novacek 2015-05-26 11:29:12 UTC
Fixed in virt-who-0.12-9.el6.

Comment 4 Eko 2015-06-19 02:23:32 UTC
Check this issue on virt-who-0.12-10.el6.noarch, still can be duplicated when set the VIRTWHO_INTERVAL=1

1). set VIRTWHO_INTERVAL=1 in /etc/sysconfig/virt-who

2). restart virt-who
# /etc/init.d/virt-who restart
Stopping virt-who:                                         [FAILED]
Starting virt-who:                                         [  OK  ]

3). check virt-who PID
# ps -ef|grep virt-who
root     19391     1  5 10:16 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py
root     19397 19391  3 10:16 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py

4). stop virt-who
# /etc/init.d/virt-who stop
Stopping virt-who:                                         [  OK  ]

5). check virt-who PID again
# ps -ef|grep virt-who
root     19397     1  0 10:16 ?        00:00:00 /usr/bin/python /usr/share/virt-who/virtwho.py

[Result]: virt-who PID 19397 still exist.

Comment 6 Radek Novacek 2015-06-23 07:10:21 UTC
This bug is not very serious, as it's only reproducible with small interval only. Moving to 6.8.

Comment 8 Radek Novacek 2015-12-10 08:51:56 UTC
This issue looks like to be fixed upstream, it will be fixed by rebase.

Comment 9 Radek Novacek 2015-12-17 12:29:15 UTC
Fixed by rebase to virt-who-0.16-1.el6.

Comment 11 Liushihui 2016-02-04 08:54:32 UTC
Verified it on virt-who-0.16-3.el6.noarch since virt-who PID can be killed when stop virt-who service.

Verified version:
virt-who-0.16-3.el6.noarch
subscription-manager-1.16.8-1.el6.x86_64
python-rhsm-1.16.6-1.el6.x86_64

Verified process:
1. Set VIRTWHO_INTERVAL=5 or smaller than 5
[root@intel-canoepass-10 ~]# vi /etc/sysconfig/virt-who
VIRTWHO_INTERVAL=1/2/3/4/5
2. Restart virt-who
[root@intel-canoepass-10 ~]# service virt-who restart
Stopping virt-who: [  OK  ]
Starting virt-who: [  OK  ]
3. Stop virt-who
[root@intel-canoepass-10 ~]# service virt-who stop
Stopping virt-who: [  OK  ]
4. check virt-who PID
[root@intel-canoepass-10 ~]# ps -ef|grep virt-who
root      14584  10536  0 03:47 pts/1    00:00:00 grep virt-who

Result:
virt-who PID can be killed when stop virt-who service when set refresh interval smaller than 5s. Therefore, verify it.

Comment 13 errata-xmlrpc 2016-05-10 23:55:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0859.html