Bug 1050850

Summary: In rhsm GUI "System->View System Facts" window, "Update Facts" doesn't work.
Product: Red Hat Enterprise Linux 7 Reporter: xingge <gxing>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney, ckozak, fsharath, jmolet, ldai, liliu, qianzhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:45:03 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:
Bug Depends On:    
Bug Blocks: 863175    

Description xingge 2014-01-09 08:50:47 UTC
Description of problem:
In rhsm GUI "System->View System Facts" window, "Update Facts" doesn't work.

Version-Release number of selected component (if applicable):
subscription-manager-firstboot-1.10.10-1.el7.x86_64
subscription-manager-1.10.10-1.el7.x86_64
subscription-manager-gui-1.10.10-1.el7.x86_64
python-rhsm-1.10.10-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.Register the system and attach some subscriptions

2.Open subscription-manager-gui

3.Open "Subscription Manager - Facts" window by click "System -> View System Facts"

4.Check the value of system facts cpu -> cpu.cpu_socket(s), note it is "2"

5.Modify the system facts I use below cmd:
#echo '{"cpu.cpu_socket(s)":"3"}' > /etc/rhsm/facts/custom.facts

6.Press "Update Facts" in the facts window


Actual results:
The "Last Update" time will update to the right value, but the "cpu.cpu_socket(s)" value will not change at all.

Expected results:
The "cpu.cpu_socket(s)" value should be changed to "3" which I set in the custom.facts.

Additional info:
If I restart the subscription-mananger-gui, then open the system facts window, I can find the system facts value was 
updated successfully.

Comment 1 Carter Kozak 2014-01-09 14:19:26 UTC
Nice catch, patch is on the way!

Comment 2 Carter Kozak 2014-01-14 14:29:10 UTC
commit e3a4499bee8fa50bc3799dbc5c96570199199eab
Author: ckozak <ckozak>
Date:   Thu Jan 9 09:13:49 2014 -0500

    1050850: re-evaluate system facts when checking for updates
    
    Checking for updates would be a noop after the first time because
    we assumed that system facts would not change very quickly. Now
    we check every time has_changed is called to more accurately
    determine whether the facts have changed.
    
    Added cpu speed from lscpu to the graylist because it is the
    same data we're already graylisting from another source.

Comment 4 Sharath Dwaral 2014-01-23 17:11:13 UTC
Version:

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.2-1
subscription-manager: 1.10.11-1.el7
python-rhsm: 1.10.11-1.el7


Verification:

1) Register system to candlepin

2) Open "Facts Dialog"  Click on System-> view System Facts

3) Note cpu.cpu_socket(s) value (2 in this case)

4) Change facts by creating custom facts file
   #echo '{"cpu.cpu_socket(s)":"3"}' > /etc/rhsm/facts/custom.facts

5) Click on "Update facts" on "Facts Dialog"

6) Verify updated value (new value in this case is 3)


CPU facts are successfully updated

VERIFIED

Comment 5 Ludek Smid 2014-06-13 09:45:03 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.