Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1662212 - No temporary subscriptions granted to VM
Summary: No temporary subscriptions granted to VM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: jcallaha
URL:
Whiteboard:
Depends On: 1665970
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-27 05:25 UTC by Eko
Modified: 2020-06-29 18:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1665970 (view as bug list)
Environment:
Last Closed: 2020-04-14 13:23:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vm is registered (159.79 KB, image/png)
2018-12-27 05:48 UTC, Eko
no flags Details
vm's subscripiton (144.89 KB, image/png)
2018-12-27 05:48 UTC, Eko
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:23:59 UTC

Description Eko 2018-12-27 05:25:25 UTC
According to the document:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.4/html-single/virtual_instances_guide/index#temporary_subscriptions

When a virtual machine is first registered, Satellite does not know with which virtualization manager or hypervisor the virtual machine is associated and so cannot assign a subscription. In this case a temporary subscription is granted, valid for a maximum period of 7 days.

but there is no any temporary subscription found in satellite6.5, test steps as below:

1. deploy satellite6.5 and make sure subscription manifest imported.

2. register a vm to the satellite6.5

3. check the Temporary SKU exist or not
no any Temporary SKU found by "subscription-manager list --av --all"

Comment 3 Eko 2018-12-27 05:48:25 UTC
Created attachment 1516985 [details]
vm is registered

Comment 4 Eko 2018-12-27 05:48:54 UTC
Created attachment 1516986 [details]
vm's subscripiton

Comment 5 Eko 2019-01-08 04:56:30 UTC
This issue can be reproduced in sat6.4 and sat6.5, it's hard to reproduce, but it's really exist.

How to reproduce:
1). register virt-who host to sat6.4 or 6.5
2). register vcenter guest to sat6.4 or 6.5
Make sure you never run virt-who for this vcenter and this satellite, the h/g associated info never be sent to this satellite before.
Thus, you can find the Temporary SKU for guest in satellite website, this is expected.

3). Now I will create a virt-who configure file for this vcenter, and make sure the hypervisor_id=uuid, just like:
# cat /etc/virt-who.d/esx.conf
[esx_config]
type=esx
server=xxx.xxx.xxx.xxx
username=administrator
password=xxx
owner=Default_Organization
env=Library
hypervisor_id=uuid

and then I will start virt-who service for this configure file, 
you will find the vcenter's guest is associated with a host in the satellite website. and now there is no any Temporary SKU found for this guest any more, this is expected.

4). this step, I will change the hypervisor_id=hostname in the above configure file:
# cat /etc/virt-who.d/esx.conf
[esx_config]
type=esx
server=xxx.xxx.xxx.xxx
username=administrator
password=xxx
owner=Default_Organization
env=Library
hypervisor_id=hostname

and then I will restart virt-who service for this configure file again,  
you will find the vcenter's guest is associated with the same host in the satellite website. and no any Temporary SKU found for this guest any more, this is expected.

5). now I will unregister the vcenter host in satellite website, that means the association is broken between the vcenter host and guest, the Temporary SKU for the guest should be available.
but the Actual Results: no any Temporary SKU found for this guest


My opinion:
This issue is caused by the duplicated start virt-who service with hypervisor_id=uuid and hypervisor_id=hostname,
Start virt-who service with hypervisor_id=uuid and hypervisor_id=hostname, there are two hyperviosr entry created, but only one hypervisior entry list, another entry is hidden.
Although I unregistered the vcenter host to break the association in satellite website, the hidden association is still exist.

Comment 6 Eko 2019-01-08 05:07:05 UTC
Workaround: Register and Unregister one by one:
start virt-who service with hypervisor_id=uuid, unregistered the hypervisor host in satellite website
start virt-who service with hypervisor_id=hostname, unregistered the hypervisor host in satellite website


if start virt-who service with hypervisor_id=uuid, after that start virt-who service with hypervisor_id=hostname again, you can't unregistered the hypervisor host completely in satellite website,because one of them is hidden.

Comment 9 Eko 2019-10-29 02:49:44 UTC
Hey, 
According to our latest test result, when the a virtual machine is registered to sat6.5, the temporary sku is available and can be attached.

Comment 11 jcallaha 2020-02-17 18:52:51 UTC
Verified in Satellite 6.7 Beta

Submitted a virt-who report with one guest vm and one hypervisor
Registering a VM to the Satellite properly entitled it with the temporary subscription.
Registering the hypervisor allowed me to attach the vdc sub
This made the guest of <hypervisor> sub available to be attached to the guest.
Attaching the guest sub was then successful on the guest vm.

Comment 14 errata-xmlrpc 2020-04-14 13:23:48 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.

https://access.redhat.com/errata/RHSA-2020:1454


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