Bug #21790
closedAuto-attach subscriptions not working for content hosts with custom products only
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1500959
Description of problem:
This is not a duplicate, but rather it seems to be a regression since the fix for BZ#1274693 of the same description. The fix for BZ#1274693 was reported as fixed in https://access.redhat.com/errata/RHBA-2016:1501 (v6.2.0)
However, this has been observed on a fully updated 6.2.12 Satellite
Version-Release number of selected component (if applicable): v6.2.12
How reproducible: Always
Steps to Reproduce:
1.) Create an activation key with only a custom product subscription attached to it.
- hammer activation-key info --name custom --organization myorg
Name: custom
ID: 5
Description:
Host Limit: Unlimited
Auto Attach: true
Lifecycle Environment: dev
Content View: rhel7
Host Collections:
- hammer activation-key subscriptions --name custom --organization myorg
---|------|----------|----------|---------------------|---------------------|---------|----------|--------
ID | NAME | ATTACHED | QUANTITY | START DATE | END DATE | SUPPORT | CONTRACT | ACCOUNT
---|------|----------|----------|---------------------|---------------------|---------|----------|--------
8 | epel | | | 2017/10/11 19:56:18 | 2047/10/04 19:56:18 | | |
---|------|----------|----------|---------------------|---------------------|---------|----------|--------
2.) Register a server using that activation key (expecting the auto-attach to give it the temporary subscription. (i.e. "Status Details: Guest has not been reported on any host and is using a temporary unmapped guest subscription.")
Actual results:
The registered client will get only the subscription for the custom product, and will not get the temporary subscription. (Manually clicking the "Run Auto Attach" from the Content Host's page WILL run auto attach and attach the temporary subscription).
Expected results:
The registered client should get a subscription based on auto-attach
Additional info:
If I remove the custom subscription from that activation key (so there are no subscriptions attached), and register a server, the registered server WILL get the temporary subscription