Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1092818 - Can't kill the running virt-who by press "ctrl+c" key one time when virt-who is running on the CLI
Can't kill the running virt-who by press "ctrl+c" key one time when virt-who ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-who (Show other bugs)
5.11
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Radek Novacek
gaoshang
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-29 23:45 EDT by Liushihui
Modified: 2016-11-30 19:32 EST (History)
4 users (show)

See Also:
Fixed In Version: virt-who-0.9-5.el5
Doc Type: Bug Fix
Doc Text:
no docs needed
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-15 20:29:33 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1206 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2014-09-16 00:16:42 EDT

  None (edit)
Description Liushihui 2014-04-29 23:45:00 EDT
Description of problem:
When virt-who is running on the CLI , it need to press "ctrl+c" key more than one time to kill the running virt-who, And it will generate some error log in the terminal when press "ctrl+c" at the first time.

Version-Release number of selected component (if applicable):
virt-who-0.9-2.el5
subscription-manager-1.8.22-1.el5
python-rhsm-1.8.18-1.el5

How reproducible:
Always

Steps to Reproduce:
1. Register system to SAM server and make sure virt-who stopped
#[root@dhcp-128-110 ~]# service virt-who status
virt-who is stopped
2. On the terminal1, run virt-who.
[root@dhcp-128-110 libvirt-test-API]# virt-who -i 3 -d
3. Kill the running virt-who with press "ctrl+c" on the terminal1.
4. Check the virt-who stauts on the terminal2, virt-who still run normally
#[root@dhcp-128-110 ~]# ps -ef|grep python
root      2190     1  0 Apr24 ?        00:00:00 /usr/bin/python ./hpssd.py
root      2644     1  0 Apr24 ?        00:00:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root      3088     1  0 Apr24 ?        00:00:00 /usr/bin/python -tt /usr/bin/puplet
root     32019 22088  0 22:21 pts/2    00:00:00 /usr/bin/python /usr/share/virt-who/virt-who.py -i 10 -d
root     32030  3383  0 22:22 pts/3    00:00:00 grep python

Actual results:
After step3, It can't kill the running virt-who and it will generate some error log in the terminal1 
WARNING: Listening for events is not available in VDSM, ESX, RHEV-M or Hyper-V mode
DEBUG: Virt-who is running in libvirt mode
DEBUG: Starting infinite loop with 3 seconds interval
DEBUG: Sending list of uuids: []
ERROR: Error in communication with subscription manager, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 205, in _send
    self.subscriptionManager.sendVirtGuests(virtualGuests)
  File "/usr/share/virt-who/subscriptionmanager.py", line 84, in sendVirtGuests
    self.connection.updateConsumer(self.uuid(), guest_uuids=uuids)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 717, in updateConsumer
    ret = self.conn.request_put(method, params)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 490, in request_put
    return self._request("PUT", method, params)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 429, in _request
    response = conn.getresponse()
  File "/usr/lib64/python2.4/httplib.py", line 872, in getresponse
    response.begin()
  File "/usr/lib64/python2.4/httplib.py", line 336, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.4/httplib.py", line 294, in _read_status
    line = self.fp.readline()
  File "/usr/lib64/python2.4/socket.py", line 325, in readline
    data = recv(1)
  File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 217, in read
    return self._read_bio(size)
  File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 202, in _read_bio
    return m2.ssl_read(self.ssl, size, self._timeout)
  File "/usr/share/virt-who/virt-who.py", line 339, in cleanup
    sys.exit(0)
SystemExit: 0
DEBUG: Sending list of uuids: []
DEBUG: Sending list of uuids: []
DEBUG: Sending list of uuids: []
DEBUG: Sending list of uuids: []

Expected results:
It should kill the running virt-who after press "ctrl+c" one time, and it shouldn't generate any error log on the terminal

Additional info:
It hasn't this problem in the RHEL7
Comment 1 Radek Novacek 2014-04-30 06:54:56 EDT
The code that handles service restart is the same as for handling keyboard interrupts. So fixing bug 1092811 will fix this bug too.

*** This bug has been marked as a duplicate of bug 1092811 ***
Comment 2 Liushihui 2014-06-15 22:55:06 EDT
Although bug 1092811 has been verified on virt-who-0.9-4.el5, This bug still exist , Therefore , I reopen it.

Version-Release number of selected component (if applicable):
virt-who-0.9-4.el5
subscription-manager-1.11.3-5.el5
python-rhsm-1.11.3-3.el5

How reproducible:
Always

Steps to Reproduce:
1. Register system to SAM server and make sure virt-who stopped
#[root@dhcp-128-110 ~]# service virt-who status
virt-who is stopped
2. On the terminal1, run virt-who.
[root@dhcp-128-110 libvirt-test-API]# virt-who -i 3 -d
3. Kill the running virt-who with press "ctrl+c" many times on the terminal1.
4. Check the virt-who stauts on the terminal2
# ps -ef|grep virt-who

Actual results:
After step3, virt-who process can't stop on the terminal1,
After step4, virt-who still run normally.
[root@hp-z220-03 ~]# ps -ef|grep virt-who
root      4047  3756  0 22:43 pts/2    00:00:00 /usr/bin/python /usr/share/virt-who/virt-who.py -i 3 -d
root      4053  3788  0 22:44 pts/3    00:00:00 grep virt-who
Comment 3 Radek Novacek 2014-06-19 05:05:27 EDT
True, CTRL+C is not handled correctly, this is easy fix.
Comment 4 RHEL Product and Program Management 2014-06-19 05:28:16 EDT
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 5 Radek Novacek 2014-06-19 06:51:26 EDT
Fixed in virt-who-0.9-5.el5.
Comment 7 Liushihui 2014-06-27 02:45:27 EDT
Verified on virt-who-0.9-5.el5
Comment 9 errata-xmlrpc 2014-09-15 20:29:33 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.