Bug 1092848

Summary: virt-who dies when the system is being unregistered
Product: Red Hat Enterprise Linux 5 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.11CC: dgoodwin, liliu, ovasik, qianzhan, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.9-4.el5 Doc Type: Bug Fix
Doc Text:
no docs needed
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-16 00:29:35 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 Liushihui 2014-04-30 06:10:51 UTC
Description of problem:
system has been unregistered, However, virt-who still run normally

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 run normally
2. Unregister system to SAM server
[root@dhcp-128-110 libvirt-test-API]# subscription-manager unregister
[root@dhcp-128-110 libvirt-test-API]# subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.
3. Check the virt-who status
[root@dhcp-128-110 libvirt-test-API]# service virt-who status
virt-who (pid  32168) is running...

Actual results:
virt-who still run normally after system unregistered to SAM server

Expected results:
Unregister that system, and virt-who can no longer authenticate to report hosts.
so virt-who should stop after system has been unregistered. 

Additional info:
As bug 1009230 is not a bug, it should be a bug

Comment 1 Radek Novacek 2014-05-06 08:08:21 UTC
Currently, virt-who service is still running even if the system is not registered. It just doesn't report the host/guest associations to SAM. Once the system is registered, virt-who will start working propertly.

There are two possible behaviors of virt-who when system is not registered (or been unregistered):

1) Exit immediately and refuse to start until registration

2) Start anyway (or continue to run) when unregistered, start sending host-guest associations after registration

I'm not sure which one would be better but I agree that the behavior should be consistent across RHEL versions.

Any ideas which approach is better?

Comment 2 Radek Novacek 2014-05-16 08:27:06 UTC
I've decided that we should go with 2). It's how virt-who behaves on all supported RHELs.

When the system is unregistered, virt-who obtains SIGHUP signal to reload it's configuration. There is bug in handling this signal that causes death of virt-who.

I'll use this bug to fix it. It's the same bug as 1009230 (for RHEL-6), so I'll reopen it.

Comment 3 Radek Novacek 2014-05-16 09:12:24 UTC
Upstream commit that fixes this issue: https://git.fedorahosted.org/cgit/virt-who.git/commit/.

Comment 4 RHEL Program Management 2014-05-19 08:29:23 UTC
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-05-22 09:26:06 UTC
Fixed in virt-who-0.9-4.el5.

Comment 7 Liushihui 2014-06-05 09:20:36 UTC
Verified it on virt-who-0.9-4.el5

Comment 9 errata-xmlrpc 2014-09-16 00:29:35 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.

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