Bug 2245237

Summary: Creating an override with hammer for one repository overrides all repositories
Product: Red Hat Satellite Reporter: Stefan Meyer <smeyer>
Component: RepositoriesAssignee: Lucy Fu <lufu>
Status: CLOSED MIGRATED QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.13.5CC: ahumbe, iballou, lufu, ofedoren, rlavi, zhunting
Target Milestone: UnspecifiedKeywords: MigratedToJIRA, Regression, Triaged, UserExperience
Target Release: Unused   
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: 2024-06-06 16:31:00 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:

Description Stefan Meyer 2023-10-20 10:03:09 UTC
Description of problem:
- When using hammer to set a repository to enabled will enable all repositories

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

How reproducible:
- Everytime

Steps to Reproduce:

1. List enabled repositories for the client
   	# hammer host subscription product-content --content-access-mode-all=true --content-access-mode-env=true  --host fluffy.example.com
	-----|------------------------------------------------------------------|-------------------------------------------|------------------|---------
	ID   | NAME                                                             | LABEL                                     | DEFAULT ENABLED? | OVERRIDE
	-----|------------------------------------------------------------------|-------------------------------------------|------------------|---------
	8227 | epel-9-x86_64                                                    | redhat_epel_epel-9-x86_64                 | yes              |
	381  | Red Hat Enterprise Linux 9 for x86_64 - AppStream (Kickstart)    | rhel-9-for-x86_64-appstream-kickstart     | no               |
	397  | Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)         | rhel-9-for-x86_64-appstream-rpms          | yes              |
	468  | Red Hat Enterprise Linux 9 for x86_64 - BaseOS (Kickstart)       | rhel-9-for-x86_64-baseos-kickstart        | no               |
	394  | Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)            | rhel-9-for-x86_64-baseos-rpms             | yes              |
	5429 | Red Hat Enterprise Linux 9 for x86_64 - High Availability (RPMs) | rhel-9-for-x86_64-highavailability-rpms   | no               |
	5882 | Red Hat Enterprise Linux 9 for x86_64 - Resilient Storage (RPMs) | rhel-9-for-x86_64-resilientstorage-rpms   | no               |
	385  | Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs)              | satellite-client-6-for-rhel-9-x86_64-rpms | no               |
	-----|------------------------------------------------------------------|-------------------------------------------|------------------|---------

2. Change the satellite-client-6-for-rhel-9-x86_64-rpms repo to enabled
	# hammer host subscription content-override --host fluffy.example.com --content-label satellite-client-6-for-rhel-9-x86_64-rpms --enabled=true --value=true
	Updated content override.

3. List enabled repositories for the client again
	[root@satellite6:/root]# hammer host subscription product-content --content-access-mode-all=true --content-access-mode-env=true  --host fluffy.example.com
	-----|------------------------------------------------------------------|-------------------------------------------|------------------|----------
	ID   | NAME                                                             | LABEL                                     | DEFAULT ENABLED? | OVERRIDE
	-----|------------------------------------------------------------------|-------------------------------------------|------------------|----------
	8227 | epel-9-x86_64                                                    | redhat_epel_epel-9-x86_64                 | yes              | enabled:1
	381  | Red Hat Enterprise Linux 9 for x86_64 - AppStream (Kickstart)    | rhel-9-for-x86_64-appstream-kickstart     | no               | enabled:1
	397  | Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)         | rhel-9-for-x86_64-appstream-rpms          | yes              | enabled:1
	468  | Red Hat Enterprise Linux 9 for x86_64 - BaseOS (Kickstart)       | rhel-9-for-x86_64-baseos-kickstart        | no               | enabled:1
	394  | Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)            | rhel-9-for-x86_64-baseos-rpms             | yes              | enabled:1
	5429 | Red Hat Enterprise Linux 9 for x86_64 - High Availability (RPMs) | rhel-9-for-x86_64-highavailability-rpms   | no               | enabled:1
	5882 | Red Hat Enterprise Linux 9 for x86_64 - Resilient Storage (RPMs) | rhel-9-for-x86_64-resilientstorage-rpms   | no               | enabled:1
	385  | Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs)              | satellite-client-6-for-rhel-9-x86_64-rpms | no               | enabled:1
	-----|------------------------------------------------------------------|-------------------------------------------|------------------|----------




Actual results:
- All repositories are now enabled

Expected results:
- Only satellite-client-6-for-rhel-9-x86_64-rpms should be enabled


Additional info:

Comment 2 Brad Buckingham 2023-10-30 11:29:29 UTC
Bulk setting Target Milestone = 6.15.0 where sat-6.15.0+ is set.

Comment 3 Lucy Fu 2023-11-09 15:28:27 UTC
Created redmine issue https://projects.theforeman.org/issues/36908 from this bug

Comment 8 Eric Helms 2024-06-06 16:31:00 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.