Bug 864791 - Virt-who status show as "virt-who dead but subsys locked" after kill the running virt-who server by press "ctrl+c" key.
Virt-who status show as "virt-who dead but subsys locked" after kill the runn...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-who (Show other bugs)
5.9
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Radek Novacek
Entitlement Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 03:11 EDT by cshao
Modified: 2016-11-30 19:31 EST (History)
10 users (show)

See Also:
Fixed In Version: virt-who-0.9-1.el5
Doc Type: Bug Fix
Doc Text:
no docs needed
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-15 20:29:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description cshao 2012-10-10 03:11:18 EDT
Description of problem:
Running virt-who server in terminal and then press "ctrl + C" key to kill it,  virt-who status show as "virt-who dead but subsys locked".

Version-Release number of selected component (if applicable):
rhev-hypervisor5-5.9-20121003.1.el5
virt-who-0.7-8.el5

How reproducible:
100%

Steps to Reproduce:
1. Register RHEV-H to RHEV-M.
2. Register RHEV-H to SAM.
3. Running virt-who server in terminal, configure the /etc/sysconfig/virt-who file as follows:
    VIRTWHO_BACKGROUND=0
    VIRTWHO_DEBUG=1
    VIRTWHO_VDSM=1
    VIRTWHO_INTERVAL=1
4. /etc/init.d/virt-who start
5. Press Ctrl + C
6. /etc/init.d/virt-who status

Actual results:
1. Virt-who status show as "virt-who dead but subsys locked".
2. No such issue when running virt-who server in background with "VIRTWHO_BACKGROUND=1".

========================
VIRTWHO_BACKGROUND=0
# /etc/init.d/virt-who start 
Starting virt-who: WARNING: Listening for events is not available in VDSM or ESX mode
DEBUG: Virt-who is running in vdsm mode
DEBUG: Starting infinite loop with 1 seconds interval
DEBUG: Sending list of uuids: []

###press "ctrl + C" key###
                                                           [  OK  ]
# /etc/init.d/virt-who status
virt-who dead but subsys locked

# ps aux | grep virt-who
root      9234  0.0  0.0   8828  1404 pts/0    T    Oct09   0:00 /bin/sh /etc/init.d/virt-who restart
root      9239  0.0  0.0   8692  1096 pts/0    T    Oct09   0:00 /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/bin/virt-who
root     27054  0.0  0.0   6060   652 pts/0    S+   05:59   0:00 grep virt-who

========================
VIRTWHO_BACKGROUND=1
# /etc/init.d/virt-who restart
Stopping virt-who:                                         [  OK  ]
Starting virt-who:    


Expected results:
Virt-who status show as "virt-who is stopped" after kill the running virt-who server by press "ctrl+c" key.

Additional info:
It is a regression bug, because this is no such issue in rhev-hypervisor5-5.8-20120919.0.el5_8
virt-who-0.5-5.el5

================
VIRTWHO_BACKGROUND=0
# /etc/init.d/virt-who start
Starting virt-who: Virt-who is running in vdsm mode
Starting infinite loop with 1 seconds interval
Sending update to updateConsumer: []
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 325, in ?
KeyboardInterrupt

###press "ctrl + C" key###
                                                           [FAILED]
[root@rhevm-vds-72-21 ~]# /etc/init.d/virt-who status
virt-who is stopped
Comment 1 RHEL Product and Program Management 2014-01-29 05:35:58 EST
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 2 Radek Novacek 2014-03-24 09:16:55 EDT
This bug should be fixed by the rebase to virt-who-0.9-1.el5.
Comment 4 Ying Cui 2014-07-28 06:06:39 EDT
As RHEV-H 5.x was end of life more than 1 year, so can not test this bug on 5.x.

Tested this issue on RHEV-H 6.5.z build(20140723.0.el6ev), still can reproduce this issue with virt-who-0.8-9.el6.noarch.
Comment 5 Radek Novacek 2014-07-28 06:16:18 EDT
Please, retest with virt-who-0.9-1.el5, it should fix this issue.
Comment 6 Ying Cui 2014-07-28 06:24:02 EDT
Libin,
  No rhevh 5.x build now, you can reproduce this issue on rhel 5.x firstly, then test/verify this bug on rhel 5.x + latest virt-who version for 5.x.

Thanks
Ying
Comment 7 Ying Cui 2014-07-28 06:26:32 EDT
(In reply to Radek Novacek from comment #5)
> Please, retest with virt-who-0.9-1.el5, it should fix this issue.

Hi Radek,
  As comment 4, this bug still can reproduce with virt-who-0.8-9.el6.noarch in rhel 6.x stream, we need to clone it to 6.6 tree.

Thanks
Ying
Comment 8 Radek Novacek 2014-07-28 06:33:42 EDT
RHEL-6.6 will contain virt-who-0.10-3.el6.

Proper virt-who version to test with are:
virt-who-0.10-3.el6 on RHEL-6.6 and
virt-who-0.9-5.el5 on RHEL-5.11.

Please use above mentioned builds of virt-who to check if this issue has been fixed already. Thank you.
Comment 9 Liushihui 2014-07-29 02:02:36 EDT
Verified it on virt-who-0.9-5.el5 and virt-who-0.10-3.el6.noarch

Steps to verify:
1. Register RHEL system to SAM.
2. Running virt-who server on libvirtd mode in terminal , configure the /etc/sysconfig/virt-who file as follows:
    VIRTWHO_BACKGROUND=0
    VIRTWHO_DEBUG=1
    VIRTWHO_INTERVAL=1
3. /etc/init.d/virt-who start
4. Press Ctrl + C
DEBUG: Virtual machine found: 6.5_Server_x86_64: 3708b2bb-0d4b-6fa6-bb44-44ee3149ea19
DEBUG: Virtual machine found: 6.5_Client_i386: 774a817c-1a09-8b8f-4093-591fcbf365a3
DEBUG: Virtual machine found: 7.0_Server_x86_64: 70144381-3aaf-9515-3a51-6e2114006451
DEBUG: Virtual machine found: 5.10_Server_x86_64: 7279afd4-20d4-e5dc-f4c6-673448beb038
DEBUG: Virtual machine found: 6.4_Server_x86_64: 0804e244-3b17-322e-e115-e5cc33a1e502
INFO: Sending list of uuids: [{'guestId': '0804e244-3b17-322e-e115-e5cc33a1e502', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '70144381-3aaf-9515-3a51-6e2114006451', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '7279afd4-20d4-e5dc-f4c6-673448beb038', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '774a817c-1a09-8b8f-4093-591fcbf365a3', 'attributes': {'active': 0, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 5}, {'guestId': '3708b2bb-0d4b-6fa6-bb44-44ee3149ea19', 'attributes': {'active': 1, 'virtWhoType': 'libvirt', 'hypervisorType': 'QEMU'}, 'state': 1}]
^C                                                         [FAILED]

5. /etc/init.d/virt-who status,virt-who is stop 
[root@hp-z220-05 libvirt-test-API]# /etc/init.d/virt-who status
virt-who is stopped
Comment 11 errata-xmlrpc 2014-09-15 20:29:12 EDT
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.

http://rhn.redhat.com/errata/RHBA-2014-1206.html

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