Bug 1650473

Summary: not able to install software on rhel8 via subscribtion
Product: Red Hat Enterprise Linux 8 Reporter: Dominik Holler <dholler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: dholler, jsefler, mduarted, mmirecki
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-16 17:14:39 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:
Attachments:
Description Flags
terminal log none

Description Dominik Holler 2018-11-16 09:34:49 UTC
Created attachment 1506375 [details]
terminal log

Description of problem:
In the free developer's account, there seems to be no subscription for VMs available.

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


How reproducible:


Steps to Reproduce:
1. Install rhel-8.0-beta-1 in VM
2.
3.

Actual results:
Cannot install software from red hat repository.

https://access.redhat.com/management/systems/c7353691-1c02-4ff6-ab28-9bec07461ab1 says:
Installed products are not covered by attached subscriptions. Updates cannot be received. 

Expected results:
subscription-manager auto-attach
attaches VM to a subscription to enable installation of software from red hat repository.

Additional info:

Comment 1 John Sefler 2018-11-16 16:04:36 UTC
You are missing the "--auto-attach" option from your registration command...
[root@rhel8 ~]# subscription-manager register --username=dominik.holler --password=xxx

Append "--auto-attach" to the end of that ^^^^ command and you will be successfully registered and subscribed in one step.


The following command that you ran....
[root@rhel8 ~]# subscription-manager auto-attach
Auto-attach preference: enabled
... did not perform an action, it simply returned a preference.  Read the man page for more info on the auto-attach module.  With this preference, your system will eventually execute "subscription-manager attach --auto" within the next four hours and your system will automatically be subscribed. 


Alternatively, had you run the following command after registration, you would have been immediately subscribed...
[root@rhel8 ~]# subscription-manager attach --auto



Yes I know... "attach --auto" and "auto-attach" sound the same but they are not.

Comment 2 Dominik Holler 2018-11-16 16:54:51 UTC
(In reply to John Sefler from comment #1)
> You are missing the "--auto-attach" option from your registration command...
> [root@rhel8 ~]# subscription-manager register
> --username=dominik.holler --password=xxx
> 
> Append "--auto-attach" to the end of that ^^^^ command and you will be
> successfully registered and subscribed in one step.
> 
> 
> The following command that you ran....
> [root@rhel8 ~]# subscription-manager auto-attach
> Auto-attach preference: enabled
> ... did not perform an action, it simply returned a preference.  Read the
> man page for more info on the auto-attach module.  With this preference,
> your system will eventually execute "subscription-manager attach --auto"
> within the next four hours and your system will automatically be subscribed. 
> 
> 
> Alternatively, had you run the following command after registration, you
> would have been immediately subscribed...
> [root@rhel8 ~]# subscription-manager attach --auto
> 
> 
> 
> Yes I know... "attach --auto" and "auto-attach" sound the same but they are
> not.

subscription-manager attach --auto did the trick.
A stupid error of me, thanks.

But is this by intention, that the VM is now subscribed to a subscription for physical machines?
[root@rhel8 ~]# subscription-manager list --consumed | grep "System Type"
System Type:         Physical
[root@rhel8 ~]# virt-what
kvm

Comment 3 John Sefler 2018-11-16 17:13:16 UTC
(In reply to Dominik Holler from comment #2)
> But is this by intention, that the VM is now subscribed to a subscription
> for physical machines?
> [root@rhel8 ~]# subscription-manager list --consumed | grep "System Type"
> System Type:         Physical
> [root@rhel8 ~]# virt-what
> kvm

YES - A subscription with SystemType:"Physical" is always consumable by a virtual system when necessary.  In this case, the only subscription available in your account that provided content for the installed engineering product "Red Hat Enterprise Linux for x86_64 Beta" was SKU:RH00069.  Therefore the auto-attach algorithm in the entitlement server (Candlepin) has no other choice but to attach an entitlement from the physical pool.  If there was two available pools (one of SystemType:"Physical" and one of SystemType:"Virtual") that both provided the installed engineering product "Red Hat Enterprise Linux for x86_64 Beta", then the auto-attach algorithm in the entitlement server would have attached an entitlement from the virtual pool for your kvm guest.

Comment 4 Dominik Holler 2018-11-16 17:14:39 UTC
John, thank you very much for your hints!