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
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 ***
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
True, CTRL+C is not handled correctly, this is easy fix.
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.
Fixed in virt-who-0.9-5.el5.
Verified on virt-who-0.9-5.el5
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