Bug 1025344

Summary: cli: Attempting to disable a promoted repo does not return a complete error context.
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: HammerAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: sthirugn <sthirugn>
Severity: medium Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:24:57 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 Corey Welton 2013-10-31 14:12:47 UTC
Description of problem:
When a user tries to disable a repo that has been promoted, this fails - but the fail message is incomplete, it is missing the context/reason.

Version-Release number of selected component (if applicable):
Satellite-6.0.2-RHEL-6-20131030.0

How reproducible:


Steps to Reproduce:
1.  Sync AND promote RHEL content in org "Katello Infrastructure"
2.  katello --user admin --password admin product repository_set_disable --org "Katello Infrastructure" --name "Red Hat Enterprise Linux Server" --set_name "Red Hat Enterprise Linux 6 Server (RPMs)"
3.  view results.

Actual results:
Repository disable [ Red Hat Enterprise Linux 6 Server (RPMs) ] failed.:


Expected results:
Repository disable [ Red Hat Enterprise Linux 6 Server (RPMs) ] failed.:  Cannot disable promoted content.  Please perform a content deletion changeset before disabling this repo.

(or something similar)


Additional info:

Comment 3 Brad Buckingham 2014-06-25 21:19:36 UTC
Although much has changed in both API/CLI since this bug was introduced, need to confirm it is an issue in the current implementation.

Comment 4 Brad Buckingham 2016-04-13 16:22:56 UTC
I am no longer seeing the behavior described on Satellite 6.2 beta snap 7; therefore, moving the bug to ON_QA for verification.

hammer> repository-set available-repositories --organization "Default Organization" --product "Red Hat Enterprise Linux Server" --name "Red Hat Enterprise Linux 7 Server (Kickstart)"
----------------------------------------------|--------|---------|---------------|--------
NAME                                          | ARCH   | RELEASE | REGISTRY NAME | ENABLED
----------------------------------------------|--------|---------|---------------|--------
Red Hat Enterprise Linux 7 Server (Kickstart) | x86_64 | 7.0     |               | no     
Red Hat Enterprise Linux 7 Server (Kickstart) | x86_64 | 7.1     |               | no     
Red Hat Enterprise Linux 7 Server (Kickstart) | x86_64 | 7.2     |               | yes    
----------------------------------------------|--------|---------|---------------|--------

hammer> repository-set disable --organization "Default Organization" --product "Red Hat Enterprise Linux Server" --name "Red Hat Enterprise Linux 7 Server (Kickstart)" --name "Red Hat Enterprise Linux 7 Server (Kickstart)" --releasever "7.2" --basearch x86_64
Could not disable repository:
  Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it.
hammer>

Comment 5 sthirugn@redhat.com 2016-04-13 16:25:49 UTC
Verified as per Comment 4.

Comment 7 Bryan Kearney 2016-07-27 11:24:57 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, 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/RHBA-2016:1501