Bug 1836868

Summary: Change of 'auto-attach' preference via subscription-manager doesn't get reflected in Satellite WebUI
Product: Red Hat Satellite Reporter: Jan Senkyrik <jsenkyri>
Component: Hosts - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: high    
Version: 6.7.0CC: ahumbe, jhanley, ktordeur, zhunting
Target Milestone: 6.10.0Keywords: EasyFix, PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.1.1.22-1,tfm-rubygem-katello-4.1.1.28-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:09:12 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:

Description Jan Senkyrik 2020-05-18 11:40:53 UTC
Description of problem:
- If you set 'Auto-Attach' to 'Disabled' in the WebUI the change will get immediately reflected to CLI (subscription-manager) as well.
 
- However this doesn't work the other way around. If you change 'Auto-Attach' using CLI (subscription-manager) the change will NOT get reflected in WebUI. 

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

How reproducible:
- Always.

Steps to Reproduce:
1. Use subscription-manager to disable auto-attach:
# subscription-manager auto-attach --disable && subscription-manager refresh
2. Check auto-attach preference in WebUI:
- WebUI --> Hosts --> Content Hosts --> <host> --> Subscriptions tab

Actual results:
- Auto-Attach: Yes

Expected results:
- Auto-Attach: No

Kind regards,
Jan

Comment 1 Jessica Richards 2020-08-06 16:18:39 UTC
This issue also appears to affect Satellite 6.5.3-1, judging from the screenshot in Salesforce case 02720528.

Comment 5 Lucy Fu 2021-08-18 13:59:25 UTC
Created redmine issue https://projects.theforeman.org/issues/33285 from this bug

Comment 6 Maria 2021-08-26 10:02:42 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33285 has been resolved.

Comment 9 Stephen Wadeley 2021-10-05 08:31:06 UTC
Hello


testing on snap 21 of Sat6.10


Fixed in version has tfm-rubygem-katello-4.1.1.28-1

I have:

[root@dhcp-sat610 ~]# rpm -q tfm-rubygem-katello
tfm-rubygem-katello-4.1.1.29-1.el7sat.noarch
[root@dhcp-sat610 ~]# rpm -q satellite
satellite-6.10.0-0.9.beta.el7sat.noarch


I have registered a RHEL85 host

In the web UI I see:
Auto-Attach Yes

On Sat6.10:

[root@dhcp-sat610 ~]# hammer host info --name dhcp-rhel85.<redacted>.redhat.com --fields "Subscription Information/Autoheal"
Subscription Information: 
    Autoheal: true


On the Content Host:

root@dhcp-rhel85 ~]# subscription-manager auto-attach --show
Auto-attach preference: enabled
[root@dhcp-rhel85 ~]# # Check web UI: Auto-Attach Yes
[root@dhcp-rhel85 ~]# subscription-manager auto-attach --disable
Auto-attach preference: disabled
[root@dhcp-rhel85 ~]# # Reload web UI, it changes to Auto-Attach No


So it works as expected, but you do have to reload the web UI to see the change.


Thank you

Comment 12 errata-xmlrpc 2021-11-16 14:09:12 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 (Moderate: Satellite 6.10 Release), 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-2021:4702