Bug 1444259
| Summary: | Satellite does not update content-host's "auto-attach" when subscription-manager auto-attach --disable is run | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Liushihui <shihliu> | ||||||||
| Component: | Subscription Management | Assignee: | Eric Helms <ehelms> | ||||||||
| Status: | CLOSED WONTFIX | QA Contact: | Katello QA List <katello-qa-list> | ||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | Unspecified | CC: | bkearney, hsun, jhnidek, khowell, qianzhan, redakkan, sgao, shihliu, skallesh, yanpliu, yuefliu | ||||||||
| Target Milestone: | Unspecified | Keywords: | Reopened | ||||||||
| Target Release: | Unused | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2017-05-19 17:29:03 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: |
|
||||||||||
Please can you tell me, what is content of /etc/pki/product-default/. Can you also give me content of certificate(s) in this directory using: rct cat-cert /etc/pki/product-default/*.pem Thanks. Can you please provides output of log file /var/log/rhsm/rhsm.log and output of journalctl -f. Please see the info as the following, the rhsm.log and journalctl.log in attachment.
[root@hp-z220-04 product-default]# ll /etc/pki/product-default/
total 4
-rw-r--r--. 1 root root 2159 Sep 27 2016 69.pem
[root@hp-z220-04 product-default]# rct cat-cert /etc/pki/product-default/69.pem
+-------------------------------------------+
Product Certificate
+-------------------------------------------+
Certificate:
Path: /etc/pki/product-default/69.pem
Version: 1.0
Serial: 12750047592154746560
Start Date: 2016-01-04 13:07:32+00:00
End Date: 2035-12-30 13:07:32+00:00
Subject:
CN: Red Hat Product ID [b0918f42-730b-4ee9-b4ee-9504e60fcb1a]
Issuer:
C: US
CN: Red Hat Entitlement Product Authority
O: Red Hat, Inc.
OU: Red Hat Network
ST: North Carolina
emailAddress: ca-support
Product:
ID: 69
Name: Red Hat Enterprise Linux Server
Version: 7.3
Arch: x86_64
Tags: rhel-7,rhel-7-server
Brand Type:
Brand Name:
Created attachment 1275568 [details]
journalctl.log
Created attachment 1275569 [details]
rhsm.log
Is auto-attach enabled in the Satellite WebUI when this happens? After disable auto-attach in CLI as the following, it will auto-attach a sku in GUI, please see screenshot in attachment auto-attach.jpeg.
[root@hp-z220-04 ~]# subscription-manager auto-attach --disable
Auto-attach preference: disabled
[root@hp-z220-04 ~]# subscription-manager list --consumed
No consumed subscription pools to list
[root@hp-z220-04 ~]# subscription-manager refresh
All local data refreshed
[root@hp-z220-04 ~]# subscription-manager list --consumed
+-------------------------------------------+
Consumed Subscriptions
+-------------------------------------------+
Subscription Name: CloudForms (10-pack)
Provides: Oracle Java (for RHEL Server)
Red Hat Software Collections Beta (for RHEL Server)
Red Hat CloudForms Beta
Red Hat Enterprise Linux Server
Red Hat CloudForms
Red Hat Beta
Red Hat Software Collections (for RHEL Server)
SKU: MCT2358
Contract: 11261876
Account: 5758125
Serial: 3545091525090374005
Pool ID: 8ac903175bd0429d015bd04f8c2d03b3
Provides Management: Yes
Active: True
Quantity Used: 1
Service Level: Premium
Service Type: L1-L3
Status Details: Subscription is current
Subscription Type: Standard
Starts: 02/26/2017
Ends: 02/25/2018
System Type: Physical
Created attachment 1276112 [details]
auto-attach.jpeg
Please can you tell me, how did you setup your Satellite/Subman that it does not consume any subscription after registration. I just cannot reproduce this bug:
[root@rhel01 rhsm]# subscription-manager register --org="Default_Organization" --activationkey="experiment"
The system has been registered with ID: 0c273ac2-8b93-4aa8-b3b1-a8cd1663436c
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Subscribed
[root@rhel01 rhsm]# subscription-manager list --consumed
+-------------------------------------------+
Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux for Virtual Datacenters, Standard (DERIVED SKU)
Provides: Red Hat Developer Toolset (for RHEL Server)
Oracle Java (for RHEL Server)
Red Hat Enterprise Linux Atomic Host Beta
Red Hat Software Collections Beta (for RHEL Server)
Red Hat Enterprise Linux Atomic Host
Red Hat Enterprise Linux Server
Red Hat Software Collections (for RHEL Server)
Red Hat Beta
dotNET on RHEL (for RHEL Server)
SKU: RH00050
Contract:
Account:
Serial: 3010330367683125969
Pool ID: ff8080815bca5dfb015bcad9afcf027b
Provides Management: Yes
Active: True
Quantity Used: 1
Service Level: Standard
Service Type: L1-L3
Status Details: Guest has not been reported on any host and is using a temporary unmapped guest
subscription.
Subscription Type: Stackable (Temporary)
Starts: 1.5.2017
Ends: 6.5.2017
System Type: Virtual
We decided to close this as "not a bug". This is expected behavior, when auto-attach is enabled in activation key. Another bug report will be opened for Katello, because Katello should respect setting of auto-attach of subscription from subscription-manager. Hi Jiri, I think you can reproduce this bug according to the following steps, so I reopen this bug: [NOTE]: Please use physical machine to do the test(not virtual machine). 1 Register system to satellite with username/passsword(not active-key) [root@hp-z220-05 ~]# rpm -ivh http://10.73.131.233/pub/katello-ca-consumer-latest.noarch.rpm Retrieving http://10.73.131.233/pub/katello-ca-consumer-latest.noarch.rpm Preparing... ################################# [100%] Updating / installing... 1:katello-ca-consumer-satellite62-o################################# [100%] [root@hp-z220-05 ~]# subscription-manager register --username=admin --password=admin Registering to: satellite62-ohsnap.redhat.com:443/rhsm The system has been registered with ID: 7e180dc5-f444-42aa-9352-0ad0be4b9801 2. Wait for a short while(1 minute), open satellite webUI, go to Host-->Content host,choose this host, go to Subscription-->list/Remove tab, remove the auto-attached pool. 3. On CLI, disable auto-pool and list consumed pool [root@hp-z220-05 ~]# subscription-manager auto-attach --disable Auto-attach preference: disabled [root@hp-z220-05 ~]# subscription-manager list --consumed No consumed subscription pools to list 4. Valid certificate in /etc/pki/product-default/ [root@hp-z220-05 product-default]# rct cat-cert /etc/pki/product-default/*.pem +-------------------------------------------+ Product Certificate +-------------------------------------------+ Certificate: Path: /etc/pki/product-default/69.pem Version: 1.0 Serial: 12750047592154747473 Start Date: 2016-11-08 19:33:04+00:00 End Date: 2036-11-03 19:33:04+00:00 Subject: CN: Red Hat Product ID [69bd1f69-a20f-4c3e-b9a1-f6d05c2f0197] Issuer: C: US CN: Red Hat Entitlement Product Authority O: Red Hat, Inc. OU: Red Hat Network ST: North Carolina emailAddress: ca-support Product: ID: 69 Name: Red Hat Enterprise Linux Server Version: 7.4 Beta Arch: x86_64 Tags: rhel-7,rhel-7-server Brand Type: Brand Name: 5. Subscribe the specify pool "Red Hat Enterprise Linux for Virtual Datacenters, Standard" [root@hp-z220-05 ~]# subscription-manager subscribe --pool=8ac903695bd51c25015bd5279e0a0213 Successfully attached a subscription for: Red Hat Enterprise Linux for Virtual Datacenters, Standard [root@hp-z220-05 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: CloudForms (10-pack) Provides: Oracle Java (for RHEL Server) Red Hat Software Collections Beta (for RHEL Server) Red Hat CloudForms Beta Red Hat Enterprise Linux Server Red Hat CloudForms Red Hat Beta Red Hat Software Collections (for RHEL Server) SKU: MCT2358 Contract: 11261876 Account: 5758125 Serial: 1508148817519989888 Pool ID: 8ac903695bd51c25015bd527a1f503f2 Provides Management: Yes Active: True Quantity Used: 1 Service Level: Premium Service Type: L1-L3 Status Details: Subscription is current Subscription Type: Standard Starts: 02/26/2017 Ends: 02/25/2018 System Type: Physical Subscription Name: Red Hat Enterprise Linux for Virtual Datacenters, Standard Provides: SKU: RH00002 Contract: 11261867 Account: 5758125 Serial: 642175500493185993 Pool ID: 8ac903695bd51c25015bd5279e0a0213 Provides Management: No Active: True Quantity Used: 1 Service Level: Standard Service Type: L1-L3 Status Details: Subscription is current Subscription Type: Stackable Starts: 02/26/2017 Ends: 02/25/2018 System Type: Physical Result: Although auto-attach has been disabled and system only specified to subscribe "Red Hat Enterprise Linux for Virtual Datacenters, Standard", system still auto subscribe another pool "CloudForms (10-pack)" I can't help myself. I reproduced everything step-by-step, but this is result of last command: [root@localhost subscription_manager]# ./bin/subscription-manager list --consumed+-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Red Hat Enterprise Linux for Virtual Datacenters, Standard Provides: SKU: RH00002 Contract: 11261867 Account: 5758125 Serial: 425959188729822828 Pool ID: Not Available Provides Management: Yes Active: True Quantity Used: 1 Service Level: Standard Service Type: L1-L3 Status Details: Subscription is current Subscription Type: Starts: 26.2.2017 Ends: 26.2.2018 System Type: Physical From review of rhsm.log, this appears to be happening server-side (i.e. an auto-attach by Satellite is happening in the background). Can you please confirm by disabling auto-attach in the Satellite WebUI before registering, and then repeating this scenario? Hi kevin, I'm sorry I haven't found a way to disabling auto-attach in the Satellite WebUI before registering. I think the key reason is host will auto-attach a pool in WebUI when run "subscription-manager auto-attach --disable" on CLI. The scenerio as the following: 1 On host CLI, register to satellite: go to satellite WebUI, , host will auto attach a pool. The auto-attach option is enabled status.(It's correct) 2 On satellite WebUI, Remove the auto-attached pool: On satellite WebUI, The auto-attached pool on step1 will be removed.The auto-attach option is enabled status.(It's correct) 3 On satellite WebUI, refresh host subscription page many times, the auto-attach option always enabled status and host hasn't auto-attached any pool..(It's correct) 4 On host CLI, Disable auto-attached pool: go to Satellite WebUI, host has auto-attached a pool, The auto-attach option still enabled status.======> I think it's the key reason, disable auto-attach on CLI not only hasn't take any effect, but also make it auto-attach a pool on satellite WebUI. Thanks. (In reply to Kevin Howell from comment #17) > From review of rhsm.log, this appears to be happening server-side (i.e. an > auto-attach by Satellite is happening in the background). > > Can you please confirm by disabling auto-attach in the Satellite WebUI > before registering, and then repeating this scenario? Moving to Satellite. When the user calls auto-attach --disable, this should be reflected in Satellite. In candlepin, when this call happens, we emit a consumer updated event. Katello should use this to update auto-attach for that content host in Satellite. I am going to close this out. If you are using satelltie to manage, then the need to use subscription manager to manage the box is removed. I dont see us addressing this in the near term. *** Bug 1445190 has been marked as a duplicate of this bug. *** |
Description of problem: Disabled "auto-attach" attribute in subscription-manager.If system specify a pool to attach, it still auto attach another pool. Version-Release number of selected component (if applicable): virt-who-0.19-2.el7sat.noarch subscription-manager-1.17.15-1.el7.x86_64 python-rhsm-1.17.9-1.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. Register system to Satellite-snapshot4 2. Disable "auto-attach" attribute in subscription-manager [root@hp-z220-10 ~]# subscription-manager auto-attach --disable Auto-attach preference: disabled [root@hp-z220-10 ~]# subscription-manager list --consumed No consumed subscription pools to list 3. Specify system to subscribe "Datacenters" pool. [root@hp-z220-10 ~]# subscription-manager subscribe --pool=8ac9035a5b884cc6015b885826cd02fe Successfully attached a subscription for: Red Hat Enterprise Linux for Virtual Datacenters, Standard 4. Check the consumed subscriptions. [root@hp-z220-10 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: CloudForms (10-pack) ===========>It's auto attached pool Provides: Oracle Java (for RHEL Server) Red Hat Software Collections Beta (for RHEL Server) Red Hat CloudForms Beta Red Hat Enterprise Linux Server Red Hat CloudForms Red Hat Beta Red Hat Software Collections (for RHEL Server) SKU: MCT2358 Contract: 11261876 Account: 5758125 Serial: 3797059728640792190 Pool ID: 8ac9035a5b884cc6015b885825630253 Provides Management: Yes Active: True Quantity Used: 1 Service Level: Premium Service Type: L1-L3 Status Details: Subscription is current Subscription Type: Standard Starts: 02/26/2017 Ends: 02/25/2018 System Type: Physical Subscription Name: Red Hat Enterprise Linux for Virtual Datacenters, Standard Provides: SKU: RH00002 Contract: 11261867 Account: 5758125 Serial: 7648731972332709471 Pool ID: 8ac9035a5b884cc6015b885826cd02fe Provides Management: No Active: True Quantity Used: 1 Service Level: Standard Service Type: L1-L3 Status Details: Subscription is current Subscription Type: Stackable Starts: 02/26/2017 Ends: 02/25/2018 System Type: Physical Actual results: Although auto-attach has been disabled and system only specified to subscribe "Red Hat Enterprise Linux for Virtual Datacenters, Standard", system still auto subscribe another pool "CloudForms (10-pack)" Expected results: System should only attach the specified pool "Red Hat Enterprise Linux for Virtual Datacenters, Standard" Additional info: If it hasn't set auto-attach to disable, it hasn't this pool, system will only attach the specified pool