Bug 772161 - Virt-who can't send the HOST/GUEST info to SAM after host re-registering to SAM.
Summary: Virt-who can't send the HOST/GUEST info to SAM after host re-registering to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.9
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: beta
: 5.9
Assignee: Bryan Kearney
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771748
TreeView+ depends on / blocked
 
Reported: 2012-01-06 08:48 UTC by Hui Wang
Modified: 2015-09-28 02:26 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2013-01-08 03:48:01 UTC
Target Upstream Version:


Attachments (Terms of Use)
host info (203.74 KB, image/png)
2012-01-06 08:49 UTC, Hui Wang
no flags Details
guest info (188.78 KB, image/png)
2012-01-06 08:50 UTC, Hui Wang
no flags Details
system info of the host in SAM webUI (197.45 KB, image/png)
2012-09-24 06:45 UTC, ndong
no flags Details
system info of the guest in SAM webUI (187.55 KB, image/png)
2012-09-24 06:46 UTC, ndong
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0033 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-01-08 08:38:27 UTC

Description Hui Wang 2012-01-06 08:48:28 UTC
description:
Keep the virt-who is running,unregister the host from SAM.Then after re-registering the host to SAM,and register the guest which is on the host to SAM.The SAM can't recieve the  HOST/GUEST relation.Pls see the attachments.

Version-Release number of selected component (if applicable):
virt-who-0.5-3.el5
python-rhsm-0.98.8-1.el5
subscription-manager-0.98.9-1.el5
subscription-manager-gnome-0.98.9-1.el5
subscription-manager-firstboot-0.98.9-1.el5
libvirt-0.8.2-24.el5
libvirt-0.8.2-24.el5
libvirt-python-0.8.2-24.el5
SAM1.0-Beta

How reproducible:
always

Steps to Reproduce:
1.Install RHEL 5.8-snapshot-2.0(kvm) and register to SAM.
#subscription-manager register --org=$orgname --name=$hostname --username=$username --password=$password
2.Install some guests on the host,and keep the guests are running
3.Keep virt-who is running.
4.Unregister the host from SAM.
#subscription-manager unregister
5.Then after re-registering the host to SAM,and register the guests which on the host to SAM using the sam org and username and password.
#subscription-manager register --org=$orgname --name=$hostname --username=$username --password=$password
6.Reload the headpin web padge ,check the HOST/GUEST relation on SAM.

Actual results:
The host&guest info displays guest "None" on host,the host&guest info display Host "Unkown" on guests.
See the attanchment.

Expected results:

The host&guest info displays guests' names on host,the host&guest info display host's name on guests.

Comment 1 Hui Wang 2012-01-06 08:49:39 UTC
Created attachment 551107 [details]
host info

Comment 2 Hui Wang 2012-01-06 08:50:21 UTC
Created attachment 551108 [details]
guest info

Comment 3 Radek Novacek 2012-01-12 09:03:38 UTC
I can confirm this issue. Virt-who loads connection information (SAM server, certificates, host system UUID) when starting. If this information changes during the time when virt-who is running, it won't reload its configuration. Same thing happens when virt-who is started before registering the system.

There are more possible solutions for this issue:

1) Change virt-who behaviour to try to reload configuration every time when connection fails. But this is not usual behaviour of system daemons. Usually, daemon needs to be restarted manually after changing the configuration.

2) Alter subscription-manager to restart virt-who after successful registration. I think ideal solution would be not to start virt-who daemon by default, but enable (and start) it after successful registration. And disable (and stop) virt-who after unregistration.

3) Document that virt-who needs to be restarted after registration of the system.

CCing some people for advice.

Comment 5 Radek Novacek 2012-01-13 09:52:47 UTC
Chris,

virt-who doesn't currently run DBus server, but I don't think it is necessary to add it for this simple case. We can use unix signals to notify virt-who to reload its configuration (e.g. Apache restarts itself when receives SIGHUP signal).

I agree that we should do #3 for 5.8 and fix this issue properly later.

Comment 10 RHEL Program Management 2012-04-02 13:11:53 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 15 Radek Novacek 2012-07-09 12:40:43 UTC
Chris, how we're going to implement this? Do you agree with suggested solution that after change of configuration subscription-manager will send SIGHUP (or maybe other signal?) to virt-who which restarts itself?

This can be easily done with something similar to:

kill -SIGHUP `cat /var/run/virt-who.pid`

Comment 16 Chris Duryee 2012-07-09 21:56:44 UTC
Radek,

That solution sounds fine to me. I'll move the BZ over to our component so it shows up on the tracker.

Comment 18 RHEL Program Management 2012-07-09 22:08:42 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 19 Radek Novacek 2012-07-17 08:10:05 UTC
FYI: virt-who supports reloading configuration upon receiving SIGHUP signal since version 0.7-1.

Comment 20 Bryan Kearney 2012-08-16 20:22:50 UTC
fixed in master at in version 5cb55c8a74d38d1cd1945354ea07699fa7eadc85.

Comment 22 ndong 2012-09-24 02:37:53 UTC
Since the HOST/GUEST info to SAM has been sent with virt-who-0.7-6.el5, changed status from ON_QA to VERIFIED.

Comment 23 ndong 2012-09-24 06:44:11 UTC
Version-Release number of selected component (if applicable):
subscription-manager-1.0.14-1.el5
subscription-manager-gui-1.0.14-1.el5
subscription-manager-firstboot-1.0.14-1.el5
python-rhsm-1.0.5-1.el5
virt-who-0.7-6.el5
libvirt-0.8.2-29.el5
libvirt-0.8.2-29.el5
libvirt-python-0.8.2-29.el5
katello-candlepin-cert-key-pair-1.0-1.noarch
candlepin-0.6.5-1.el6_2.noarch

Steps to Reproduce:
1.Install Red Hat Enterprise Linux Server release 5.9 Beta (Tikanga)
(kvm) and register to SAM.
#subscription-manager register --org=$orgname --name=$hostname --username=$username --password=$password
2.Install some guests on the host,and keep the guests are running
3.Keep virt-who is running.
4.Unregister the host from SAM.
#subscription-manager unregister
5.Then after re-registering the host to SAM,and register the guests which on the host to SAM using the sam org and username and password.
#subscription-manager register --org=$orgname --name=$hostname --username=$username --password=$password
6.Reload the headpin web padge ,check the HOST/GUEST relation on SAM.

the results
as attachments

Comment 24 ndong 2012-09-24 06:45:44 UTC
Created attachment 616383 [details]
system info of the host in SAM webUI

Comment 25 ndong 2012-09-24 06:46:31 UTC
Created attachment 616385 [details]
system info of the guest in SAM webUI

Comment 27 errata-xmlrpc 2013-01-08 03:48:01 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-2013-0033.html


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