Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 921249 - subscription manager facts do not update after registering
subscription manager facts do not update after registering
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: beta
: 5.10
Assigned To: Devan Goodwin
Depends On:
Blocks: rhsm-rhel510 rhsm-2013
  Show dependency treegraph
Reported: 2013-03-13 14:57 EDT by J.C. Molet
Modified: 2013-09-30 18:59 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of:
Last Closed: 2013-09-30 18:59:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
System Facts displayed appropriately (226.47 KB, image/png)
2013-06-05 14:56 EDT, Sharath Dwaral
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 18:49:24 EDT

  None (edit)
Description J.C. Molet 2013-03-13 14:57:10 EDT
Description of problem:
A couple of the subscription manager facts are unknown when you are not registered.  When you do register and then open the facts viewer, these values are still shown as unknown when they are known.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have subscription-manager installed, and be in a completely unregistered state
2. start subscription-manager-gui
3. register to your candlepin server through the gui
4. (optional) wait for your product statuses to update: see Bug 921245 
5. Go to System > View System Facts
Actual results:

in the gui the only thing under virt is:

virt.is_guest: Unknown
virt.uuid: Unknown

In the CLI during the same time:
# subscription-manager facts --list | grep ^virt
virt.host_type: kvm
virt.is_guest: True
virt.uuid: 131e448d-c000-f6bb-e2a9-8bb549e21ab4

Expected results:
virt.is_guest and virt.uuid would show the same information.  Additionally the gui would also show the value of virt.host_type

Additional info:
Comment 1 RHEL Product and Program Management 2013-04-09 16:57:08 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 3 Adrian Likins 2013-04-29 17:40:05 EDT
anything in /var/log/rhsm.log?

curious if virt-what (or our parsing of it's output) is failing in this case
Comment 4 Devan Goodwin 2013-05-07 14:43:03 EDT
Problem masked by:

2013-05-07 15:16:32,225 [INFO]  @repolib.py:158 - repos updated: 0
2013-05-07 15:16:32,255 [ERROR]  @hwprobe.py:423 - signal only works in main thread
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/hwprobe.py", line 410, in getVirtInfo
    host_type = self._get_output('virt-what')
  File "/usr/share/rhsm/subscription_manager/hwprobe.py", line 439, in _get_output
    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
ValueError: signal only works in main thread
2013-05-07 15:16:32,317 [WARNING]  @hwprobe.py:482 - Error finding UUID: 'virt.host_type'

Suspect this is happening in registration and auto-attach dialog, which are both asynchronous which could cause the signal / thread error above.
Comment 5 spandey 2013-05-13 08:51:43 EDT
I am getting same kind of issue , 

virtual guest is consuming more than 1 instance based subscription with gui auto-attach with register .

i can see virtual machine info in system facts , still getting this issue 

i got above traceback in rhsm.log file . 

using following rpm 
Comment 6 Devan Goodwin 2013-05-15 11:11:39 EDT
This bug was happening in the registergui code where we lookup suitable service levels, so it would surface if you registered via the GUI wizard, or if you used auto-attach after registration.

If you did this, and you looked on the server you would see unknown virt status:

(dgoodwin@lenovo ~) $ curl -k -u admin:admin "https://localhost:8443/candlepin/consumers/b41364aa-fbef-4cb5-aa61-c4ea36ec1ae7" | grep guest
0    "virt.is_guest" : "Unknown",

And something like this in the logs:

2013-05-14 15:32:44,530 [ERROR]  @hwprobe.py:423 - signal only works in main thread
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/hwprobe.py", line 410, in getVirtInfo
    host_type = self._get_output('virt-what')
  File "/usr/share/rhsm/subscription_manager/hwprobe.py", line 439, in _get_output
    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
ValueError: signal only works in main thread

The problem was indeed caused by an unnecessary reload of facts in the asynchronous autobind code. To fix I am having the relevant code re-use the facts we already looked up in the main thread before we went into the async code.
Comment 7 Devan Goodwin 2013-05-21 09:50:43 EDT
Fixed in subscription-manager.git master: 12b4ff606e1aeff6c5c82d0ed1d4792b4749eab5

Will appear in: subscription-manager-1.8.8-1
Comment 8 Sharath Dwaral 2013-06-05 14:56:54 EDT
Created attachment 757341 [details]
System Facts displayed appropriately


# rpm -qa | egrep "subscription-manager|python-rhsm"

CLI output:
# subscription-manager facts --list | grep virt
virt.host_type: kvm
virt.is_guest: True
virt.uuid: 3edf259b-25f7-1f57-9eb6-60d515bcfcd7

GUI Output:
Please see attachment

The system facts re updated appropriately.

Comment 10 errata-xmlrpc 2013-09-30 18:59:52 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.


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