Bug 862753

Summary: Unable to remove provider: promoted repos exist (actually they don't)
Product: Red Hat Satellite Reporter: Garik Khachikyan <gkhachik>
Component: katello-agentAssignee: David Davis <daviddavis>
Status: CLOSED WORKSFORME QA Contact: Garik Khachikyan <gkhachik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.1CC: daviddavis, inecas, mkoci
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-15 15:44:51 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 Garik Khachikyan 2012-10-03 13:07:49 UTC
Description of problem:
In current version of CFSE 1.1 puddle it is impossible to remove a provider that has repos synced (but *NOT* promoted). CLI complains:
---
Provider cannot be deleted since one of its products or repositories has already been promoted. Using a changeset, please delete the repository from existing environments before deleting it.
---

Version-Release number of selected component (if applicable):
katello-1.1.12-12.el6cf.noarch
katello-cli-1.1.8-6.el6cf.noarch
(puddle: 2012-10-02.2)

How reproducible:
always

Steps to Reproduce:
through CLI:
1.create provider, product, add 2 repos
2.sync that repos
3.try to remove provider
  
Actual results:
error above

Expected results:
no issues. Provider should get removed. proper way of handling checks on repos being promoted.

Additional info:
it's a regression

Comment 2 David Davis 2012-10-15 14:06:44 UTC
So this worked for me on master. Here's what I ran:

katello provider create --org=ACME_Corporation --name=bz
katello product create --org=ACME_Corporation --provider=bz --name=zoo
katello repo create --product=zoo --org=ACME_Corporation --url=http://mmccune.fedorapeople.org/discovery/zoo/ --name=zoo
katello repo create --product=zoo --org=ACME_Corporation --url=http://mmccune.fedorapeople.org/discovery/zoo_ks2/ --name=zoo_ks2
katello repo synchronize --org=ACME_Corporation --product=zoo --name=zoo
katello repo synchronize --org=ACME_Corporation --product=zoo --name=zoo_ks2
katello provider delete --org=ACME_Corporation --name=bz


And the final result:

Deleted provider [ bz ]

Comment 3 David Davis 2012-10-15 14:14:54 UTC
Removing a provider worked in the web UI too.

Comment 6 David Davis 2012-10-15 15:44:51 UTC
Garik, please reopen this if you're able to reproduce with the next puddle. Thanks.

Comment 7 Mike McCune 2013-08-16 18:11:57 UTC
getting rid of 6.0.0 version since that doesn't exist