Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1841445 Details for
Bug 2022743
When SCA is enabled, Rest API of Satellite 6 can not attach subscriptions to the host whereas subscription-manager can.
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Reproducer commands and outputs
reproducer.txt (text/plain), 6.92 KB, created by
Sayan Das
on 2021-11-12 13:44:30 UTC
(
hide
)
Description:
Reproducer commands and outputs
Filename:
MIME Type:
Creator:
Sayan Das
Created:
2021-11-12 13:44:30 UTC
Size:
6.92 KB
patch
obsolete
> >Satellite : 6.10 - Beta (Applicable for Sat 6.9 as well) > >Host: host.example.com > >Org: SCA (With SImple content access enabled) > >Host: host.example.com > >AK: RHEL8 [ With initially no subscriptions attached ] > >Subscription: Red Hat Satellite Infrastructure Subscription (id 33) > > >** With SCA enabled: > >The host host.example.com is only registered to satellite under SCA . No subscriptions attached yet. > >A) As expected auto-attach API does not work for adding subscription. > ># hammer host subscription attach --host host.example.com --quantity 1 --subscription-id 33 >Failed to attach subscriptions to the host: > This host's organization is in Simple Content Access mode. Attaching subscriptions is disabled. > > >B) The add_subscriptions API also does not work if i want to individually add specific subscription to the system. > ># hammer host subscription auto-attach --host host.example.com >Failed to auto attach subscriptions to the host: > This host's organization is in Simple Content Access mode. Auto-attach is disabled > > >C) But subscription-manager on the system is still functional and allows to attach subscription [whereas auto-attach will be disabled] > ># subscription-manager attach --pool=8aca02237cef9bc7017cef9ee89b0915 >Successfully attached a subscription for: Red Hat Satellite Infrastructure Subscription > >And now from Satellite end, we can see the host has a subscription attached: > ># hammer host list --search "subscription_id = 33" >---|----------------------------------|------------------|------------|---------------|-------------------|---------------|---------------------------|---------------------- >ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT >---|----------------------------------|------------------|------------|---------------|-------------------|---------------|---------------------------|---------------------- >4 | host.example.com | RedHat 8.4 | | 10.74.249.113 | 00:1a:4a:00:02:7a | Error | Default Organization View | Library >---|----------------------------------|------------------|------------|---------------|-------------------|---------------|---------------------------|---------------------- > > >D) But, even if we have blocked the API auto-attach or add_subscriptions to work under SCA, the remove_subscriptions API still works. > > ># hammer host subscription remove --host host.example.com --subscription-id 33 >Subscription removed from the host successfully. > ># hammer host list --search "subscription_id = 33" >---|------|------------------|------------|----|-----|---------------|--------------|-----------------------|------------- >ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT | TRACE STATUS >---|------|------------------|------------|----|-----|---------------|--------------|-----------------------|------------- > > >From client: > >[root@host ~]# subscription-manager refresh >1 local certificate has been deleted. >All local data refreshed > >[root@host ~]# subscription-manager list --consumed >No consumed subscription pools were found. > > > >** We have an exact same scanrio present for Activation Keys with SCA enabled. > >A) The AK RHEL8 is created with nothing but a CV and LCE set. Now Trying to attach subscription in AK will not work as that API is also disabled under SCA. > > ># hammer activation-key add-subscription --name RHEL8 --subscription-id 33 --organization SCA >Could not add subscription to activation key: > The specified organization is in Simple Content Access mode. Attaching subscriptions is disabled > > >B) Now I Disabled SCA and added a subscription to AK. > > ># hammer activation-key add-subscription --name RHEL8 --subscription-id 33 --organization SCA >Subscription added to activation key. > ># hammer activation-key subscriptions --name RHEL8 --organization SCA >---|-----------------------------------------------|-------------|----------|---------------------|---------------------|---------|----------|-------- >ID | NAME | ATTACHED | QUANTITY | START DATE | END DATE | SUPPORT | CONTRACT | ACCOUNT >---|-----------------------------------------------|-------------|----------|---------------------|---------------------|---------|----------|-------- >33 | Red Hat Satellite Infrastructure Subscription | 0 out of 10 | 0 | 2020/11/11 05:00:00 | 2023/11/11 04:59:59 | Premium | | 6355539 >---|-----------------------------------------------|-------------|----------|---------------------|---------------------|---------|----------|-------- > > >I now re-enabled SCA, and even if UI cannot show it, hammer\API shows that the subscription is still associated with the AK. > > ># hammer activation-key subscriptions --name RHEL8 --organization SCA >---|-----------------------------------------------|-------------|----------|---------------------|---------------------|---------|----------|-------- >ID | NAME | ATTACHED | QUANTITY | START DATE | END DATE | SUPPORT | CONTRACT | ACCOUNT >---|-----------------------------------------------|-------------|----------|---------------------|---------------------|---------|----------|-------- >33 | Red Hat Satellite Infrastructure Subscription | 0 out of 10 | 0 | 2020/11/11 05:00:00 | 2023/11/11 04:59:59 | Premium | | 6355539 >---|-----------------------------------------------|-------------|----------|---------------------|---------------------|---------|----------|-------- > > >C) As usual, Using API we cannot add subscription to AK. > ># hammer activation-key add-subscription --name RHEL8 --subscription-id 33 --organization SCA >Could not add subscription to activation key: > The specified organization is in Simple Content Access mode. Attaching subscriptions is disabled > > >D) But we can remove existing subscription from AK whether SCA is enabled or not. > ># hammer activation-key remove-subscription --name RHEL8 --subscription-id 33 --organization SCA >Subscription removed from activation key. > > ># hammer activation-key subscriptions --name RHEL8 --organization SCA >---|------|----------|----------|------------|----------|---------|----------|-------- >ID | NAME | ATTACHED | QUANTITY | START DATE | END DATE | SUPPORT | CONTRACT | ACCOUNT >---|------|----------|----------|------------|----------|---------|----------|-------- > > > >--------------------------------------------------------------- >Actions (For Subscriptions) | SCA | NON-SCA | >--------------------------------------------------------------- >sub-man attach | Y | Y | >sub-man auto-attach | N | Y | >sub-man remove | Y | Y | > >Sat API attach to Host | N | Y | >Sat API auto-attach to Host | N | Y | >Sat API remove from host | Y | Y | > >Sat API attach to AK | N | Y | >Sat API remove from AK | Y | Y | >---------------------------------------------------------------
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2022743
: 1841445