Red Hat Bugzilla – Bug 1161434
Take over one minute to stop/restart virt-who service in ESX mode.
Last modified: 2016-11-30 19:33:27 EST
Description of problem: When virt-who run at esx mode, sometimes virt-who service can't stop/restart until over one minute Version-Release number of selected component (if applicable): subscription-manager-1.13.6-1.el7.x86_64 python-rhsm-1.13.6-1.el7.x86_64 virt-who-0.11-2.el7.noarch katello-headpin-1.4.3.28-1.el6sam_splice.noarch candlepin-0.9.6.5-1.el6sam.noarch How reproducible: 30% Steps to Reproduce: 1. Register system to SAM server 2. Make virt-who run at esx mode, configure as the following: # vim /etc/sysconfig/virt-who VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 VIRTWHO_INTERVAL=5 VIRTWHO_ESX_OWNER=ACME_Corporation VIRTWHO_ESX_ENV=Library VIRTWHO_ESX_SERVER=10.66.79.89 VIRTWHO_ESX_USERNAME=Administrator@vsphere.local VIRTWHO_ESX_PASSWORD=qwer1234P! 3. Restart virt-who service ,virt-who run at esx mode normally. [root@hp-z220-06 ~]# service virt-who status Redirecting to /bin/systemctl status virt-who.service virt-who.service - Daemon for reporting virtual guest IDs to subscription-manager Loaded: loaded (/usr/lib/systemd/system/virt-who.service; disabled) Active: active (running) since Fri 2014-11-07 14:29:49 CST; 8s ago Main PID: 6419 (python) CGroup: /system.slice/virt-who.service └─6419 /usr/bin/python /usr/share/virt-who/virtwho.py Nov 07 14:29:49 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: Started Daemon for reporting virtual guest IDs to subscription-manager. Nov 07 14:29:49 hp-z220-06.qe.lab.eng.nay.redhat.com python[6419]: Using virt-who configuration: virt-who Nov 07 14:29:49 hp-z220-06.qe.lab.eng.nay.redhat.com python[6419]: Starting infinite loop with 5 seconds interval Nov 07 14:29:55 hp-z220-06.qe.lab.eng.nay.redhat.com python[6419]: Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-99...465]} Hint: Some lines were ellipsized, use -l to show in full. 4. Stop/restart virt-who service [root@hp-z220-06 ~]# service virt-who restart Redirecting to /bin/systemctl restart virt-who.service [root@hp-z220-06 ~]# ps -ef|grep virt-who root 5837 1 48 14:13 ? 00:00:28 /usr/bin/python /usr/share/virt-who/virtwho.py root 5842 5402 0 14:13 pts/0 00:00:00 /bin/systemctl restart virt-who.service root 5867 5583 0 14:14 pts/2 00:00:00 grep --color=auto virt-who Actual results: virt-who can't stop/restart until over one minute. Expected results: virt-who should be stop/restart normally. Additional info: when virt-who run at libvirtd mode, it hasn't this problem.
virt-who service usually stops very fast (~0.2s), but when some long term operation is running (for example communication with ESX) it waits for completion of the operation. Systemd by default limits the shutdown of the service to 90 seconds. I will add a limit of the service shutdown to just 5 seconds.
Fixed in virt-who-0.11-5.el7.
Verified it on virt-who-0.11-5.el7.noarch
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/RHSA-2015-0430.html