Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1362739 - Pause/Stop guest result in bonus pool revoke in rhevm mode
Summary: Pause/Stop guest result in bonus pool revoke in rhevm mode
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Candlepin
Version: Unspecified
Hardware: x86_64
OS: Linux
unspecified
high vote
Target Milestone: Unspecified
Assignee: Barnaby Court
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-03 05:14 UTC by Liushihui
Modified: 2016-09-29 19:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-29 19:09:25 UTC


Attachments (Terms of Use)
before_pause_guest.jpeg (deleted)
2016-08-03 05:17 UTC, Liushihui
no flags Details
after_pause_guest.jpeg (deleted)
2016-08-03 05:18 UTC, Liushihui
no flags Details

Description Liushihui 2016-08-03 05:14:42 UTC
Description of problem:
In rhevm mode, guest's bonus pool will revoke after pause/stop this guest.

Version-Release number of selected component (if applicable):
virt-who-0.17-7.el7.noarch
subscription-manager-1.17.9-1.el7.x86_64
python-rhsm-1.17.5-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
Precondition: Rhel host with three guests and it has been added to rhevm.
Process:
1. Register system to satellite

2. Configure virt-who run at rhevm mode and restart virt-who service, virt-who send host/guest mapping info to satellite

3. In satellite webUI, Go to Hosts-->Content hosts, click on the hypervisor, Go to subscriptions-->Add, subscribe "Red Hat Enterprise Linux for Virtual Datacenters, Standard"

4. In guest, subscribe the bonus pool which generated by hosts
[root@6 ~]# subscription-manager subscribe --pool=8a90c20e5644d65001564e51286f09c3
Successfully attached a subscription for: Red Hat Enterprise Linux for Virtual Datacenters, Standard (DERIVED SKU)
[root@6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux for Virtual Datacenters, Standard (DERIVED SKU)
Provides:            Oracle Java (for RHEL Server)
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Beta
                     Red Hat Software Collections (for RHEL Server)
SKU:                 RH00050
Contract:            10752427
Account:             5584289
Serial:              9220063663641762890
Pool ID:             8a90c20e5644d65001564e51286f09c3
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Level:       Standard
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Stackable
Starts:              02/29/2016
Ends:                02/27/2017
System Type:         Virtual

5. In satellite webUI, go to Hosts-->Content Host-->Guest-->Subscriptions-->List/Remove, the bonus pool is show on it. see screenshot in attachment before_pause_guest.jpeg

6. In rhevm webUI, pause/stop guest. 

7. Check virt-who's log, virt-who has send the updated info to satellite, the guest uuid is not exist under host.
[root@hp-dl560egen8-01 ~]# tail -f /var/log/rhsm/rhsm.log
2016-08-02 23:13:18,840 [virtwho.main DEBUG] MainProcess(75644):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
    "abd3f71b-a1f6-4538-9805-b5047d0978fd": [], 
    "9a722f5e-1411-4a1d-8e75-17e7dad3958a": []
}
2016-08-02 23:15:18,609 [virtwho.main DEBUG] MainProcess(75644):MainThread @executor.py:send_report:101 - Report for config "env/cmdline" sent

8. In Satellite webUI,go to Hosts-->Content Host-->Guest-->Subscriptions-->List/Remove, the bonus pool is gone. see screenshot in attachment after_pause_guest.jpeg

9. In rhevm webUI, Resume/Restart guest.

10. Check virt-who's log, virt-who has send the updated info to satellite, the guest uuid is exist under host.
[root@hp-dl560egen8-01 ~]# tail -f /var/log/rhsm/rhsm.log
2016-08-02 23:15:15,840 [virtwho.main DEBUG] MainProcess(75644):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
    "abd3f71b-a1f6-4538-9805-b5047d0978fd": [], 
    "9a722f5e-1411-4a1d-8e75-17e7dad3958a": [
     {
            "guestId": "530c34dc-2086-4f1d-a509-c417950bd0cb", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "rhevm"
            }
        }, 
]
}
2016-08-02 23:15:18,609 [virtwho.main DEBUG] MainProcess(75644):MainThread @executor.py:send_report:101 - Report for config "env/cmdline" sent

11. In guest, check consumed pool.
[root@6 ~]# subscription-manager refresh
1 local certificate has been deleted.
All local data refreshed
[root@6 ~]# subscription-manager list --consumed
No consumed subscription pools to list

Actual results:
The bonus pool was revoke after pause/stop guest.

Expected results:
The bonus pool shouldn't revoke after pause/stop guest. 

Additional info:

Comment 1 Liushihui 2016-08-03 05:17:40 UTC
Created attachment 1186949 [details]
before_pause_guest.jpeg

Comment 2 Liushihui 2016-08-03 05:18:23 UTC
Created attachment 1186950 [details]
after_pause_guest.jpeg

Comment 3 Radek Novacek 2016-08-09 15:36:40 UTC
Some hypervisors don't report guests that are not running because they're not assigned to any host. 

I think that the guest subscription shouldn't change when the guest is not reported on given host anymore and only change when it appears on some other host.

Reassigning to candlepin for evaluation.

Comment 4 Barnaby Court 2016-09-29 19:09:25 UTC
If rhevm gave a way to report on guests that were paused instead of omitting them from the report entirely we could act in a better manner.


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