Bug 1094202 - Deleting repository is not possible
Summary: Deleting repository is not possible
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: David Davis
QA Contact: sthirugn@redhat.com
URL:
Whiteboard:
Depends On: 1100311
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-05 09:50 UTC by Matej Kollar
Modified: 2019-09-26 18:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:29:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1128459 0 unspecified CLOSED hammer product delete should throw valid error message when attempting to delete a non-existent product 2021-02-22 00:41:40 UTC

Internal Links: 1128459

Description Matej Kollar 2014-05-05 09:50:33 UTC
Description of problem: After deleting organization in which is product containing repository, it is not possible to delete repository, even if you know Id. Howeverm, it looks like it works...



Steps to Reproduce:
1. Create org, in org product and in product repo
2. (Sync repo, this step may not be necessary)
3. Delete organization.

Actual results:
# hammer -v repository delete --id 5
Repository deleted
# hammer -v repository delete --id 5
Repository deleted
# hammer -v repository delete --id 5
Repository deleted


Expected results:
Repo should be gone after first call...

Comment 1 RHEL Program Management 2014-05-05 09:54:44 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Brad Buckingham 2014-06-25 15:28:29 UTC
This issue should no longer exist once the org deletion issues are addressed; however, assigning to David to ensure that it is.

Comment 4 David Davis 2014-07-16 20:17:47 UTC
Confirmed as working as part of https://bugzilla.redhat.com/show_bug.cgi?id=1100311. QA, please verify.

Comment 6 sthirugn@redhat.com 2014-08-10 15:13:40 UTC
hammer> organization create --name='deleteorg'
Organization created

hammer> product create --name='testproduct' --organization='deleteorg'
Product created

hammer> product list --organization='deleteorg'
---|-------------|-------------|--------------|--------------|-----------
ID | NAME        | DESCRIPTION | ORGANIZATION | REPOSITORIES | SYNC STATE
---|-------------|-------------|--------------|--------------|-----------
96 | testproduct |             | deleteorg    | 0            | not_synced
---|-------------|-------------|--------------|--------------|-----------

hammer> repository create --name='testrepo' --product-id=96 --organization-id=4 --content-type=yum
Repository created

hammer> repository list --product-id=96 --organization-id=4
---|----------|-------------|--------------|----
ID | NAME     | PRODUCT     | CONTENT TYPE | URL
---|----------|-------------|--------------|----
24 | testrepo | testproduct | yum          |    
---|----------|-------------|--------------|----

hammer> repository update --url='$url' --id=24 --organization-id=4
Repository updated

hammer> repository synchronize --id=24 --organization-id=4
[..................................................................................................] [100%]
Task be41773f-0324-4208-b3a9-b5eff8dbe077: success
No new packages.

hammer> organization delete --id=4
[..................................................................................................] [100%]
Task 6f804d77-a000-4c68-9373-c9415a1cccd2: success

hammer> product list --organization-id=4
Couldn't find organization '4'

hammer> product info --id=96 --organization-id=4
no resource loaded

hammer> repository delete --id=24
Could not delete the Repository:
  Couldn't find Katello::Repository with id=24

A new issue https://bugzilla.redhat.com/show_bug.cgi?id=1128459 is created to track the following issue 

hammer> product delete --id=96
Could not destroy the product:
  undefined method `user_deletable?' for nil:NilClass

Comment 8 Bryan Kearney 2014-09-11 12:29:42 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


Note You need to log in before you can comment on or make changes to this bug.