Bug 1100311

Summary: Fix Delete Organization error and enable it for GA
Product: Red Hat Satellite 6 Reporter: Mike McCune <mmccune>
Component: Subscription ManagementAssignee: David Davis <daviddavis>
Status: CLOSED CURRENTRELEASE QA Contact: sthirugn <sthirugn>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.4CC: cmilsted, ctf1800, cwelton, dlobatog, greg_freestone, jmontleo, kborup, sghai, sthirugn, thunt, tomckay
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/6180
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-11 12:20:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1090671, 1094202, 1101642, 1120336    

Description Mike McCune 2014-05-22 13:42:27 UTC
1) Create an Org
2) Create an Activation Key
3) Delete the Org
4) Note error:

Error
Katello::Resources::Candlepin::ActivationKey: 404 Resource Not Found {"displayMessage":"ActivationKey with id 8a889e7e4620dab7014620ecf7a70010 could not be found.","requestUuid":"8315eb6d-ff88-4721-9a56-7e42734ce54e"} (DELETE /candlepin/activation_keys/8a889e7e4620dab7014620ecf7a70010)

Comment 2 Sachin Ghai 2014-05-29 08:38:33 UTC
Got same issue with snap7.

Comment 3 Daniel Lobato Garcia 2014-05-29 15:04:23 UTC
Assigning this to myself as I'm working on it.

Comment 4 Daniel Lobato Garcia 2014-06-04 00:00:27 UTC
Created redmine issue http://projects.theforeman.org/issues/6053 from this bug

Comment 5 Daniel Lobato Garcia 2014-06-04 00:04:04 UTC
https://github.com/Katello/katello/pull/4213 should address this.

Comment 6 Mike McCune 2014-06-06 21:40:30 UTC
*** Bug 1105736 has been marked as a duplicate of this bug. ***

Comment 7 Mike McCune 2014-06-06 21:41:53 UTC
David is working a series of org delete issues in the Foretello context.  re-assigning

Comment 8 David Davis 2014-06-09 20:18:14 UTC
Org destroy has been pushed out to 6.0.4.

Comment 9 Mike McCune 2014-06-19 15:23:49 UTC
For 6.0.4 we will be re-adding back and fixing all Org delete related issues.

Comment 10 sthirugn@redhat.com 2014-06-19 15:25:02 UTC
*** Bug 1111260 has been marked as a duplicate of this bug. ***

Comment 11 Brad Buckingham 2014-07-08 12:45:57 UTC
*** Bug 1116066 has been marked as a duplicate of this bug. ***

Comment 12 David Davis 2014-07-11 19:11:21 UTC
https://github.com/Katello/katello/pull/4405

Comment 13 Bryan Kearney 2014-07-15 22:02:11 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6180 has been closed
-------------
David Davis
For reference, here is the katello PR that disabled org destroy:

https://github.com/Katello/katello/pull/4233

And the katello cli PR:

https://github.com/Katello/hammer-cli-katello/pull/188
-------------
David Davis
Applied in changeset commit:katello|2706b5e7ca75852d0e34d0d8ab27c16cc990d0ee.

Comment 15 David Davis 2014-07-16 13:23:59 UTC
Waiting on CLI PR.

Comment 17 Stephen Benjamin 2014-07-25 10:18:14 UTC
*** Bug 1033099 has been marked as a duplicate of this bug. ***

Comment 18 sthirugn@redhat.com 2014-07-28 16:05:01 UTC
Verified in UI. But failed in CLI.

hammer> organization delete --id=9
Could not delete the organization:
  Error: The server does not support such operation.

hammer> organization delete --name='orgdelete1'
Could not delete the organization:
  Error: The server does not support such operation.

Version Tested:
Satellite-6.0.4-RHEL-6-20140723.0

Comment 19 David Davis 2014-07-28 16:39:14 UTC
I opened https://bugzilla.redhat.com/show_bug.cgi?id=1123933 for comment#18.

Comment 20 sthirugn@redhat.com 2014-07-28 18:29:19 UTC
Referring my Comment 18 above, cli issue was a cache issue.  The following command to clear the cache fixed the issue.

mv ~/.cache/apipie_bindings ~/.cache/apipie_bindings~backup

Now I am able to delete ORG in cli:

hammer> organization create --name='orgdelete4'
Organization created

hammer> lifecycle-environment create --name='QA' --organization='orgdelete4' --prior='Library'
Environment created

hammer> activation-key create --name='ak1' --organization='orgdelete4'
Activation key created

hammer> product create --name='product1' --organization='orgdelete4'
Product created

hammer> repository create --name='samrepo1' --url='http://download.lab.bos.redhat.com/devel/candidate-trees/SAM/latest-SAM-1.4-RHEL-6/compose/SAM/x86_64/os/' --organization='orgdelete4' --product='product1' --content-type='yum'
Repository created

hammer> subscription upload --file='/tmp/manifest.zip' --organization='orgdelete4'
[...........................................................] [100%]
Task 6203fbbc-c58d-446f-901a-be3f80d38ce9: success

hammer> activation-key add-subscription --id=15 --subscription-id='8a8880c547692cd501477e32a44e0785'
Subscription added to activation key

hammer> organization delete --name='orgdelete4'
Could not delete the organization:
  Error: The server does not support such operation.

hammer> exit

# mv ~/.cache/apipie_bindings ~/.cache/apipie_bindings~backup

# hammer -u admin -p changeme shell
Welcome to the hammer interactive shell
Type 'help' for usage information
Command completion is disabled on ruby < 1.9 due to compatibility problems.

hammer> organization delete --name='orgdelete4'
[...........................................................] [100%]
Task 64a0a644-b108-47c6-ae06-53cee54cb63d: success

Comment 21 sthirugn@redhat.com 2014-07-28 18:30:08 UTC
Verified. (as per my Comment 18 and Comment 20) above.

Version Tested:
Satellite-6.0.4-RHEL-6-20140723.0

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.19-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.19-1.el6_5.noarch
* candlepin-tomcat6-0.9.19-1.el6_5.noarch
* elasticsearch-0.90.10-4.el6sat.noarch
* foreman-1.6.0.29-1.el6sat.noarch
* foreman-compute-1.6.0.29-1.el6sat.noarch
* foreman-gce-1.6.0.29-1.el6sat.noarch
* foreman-libvirt-1.6.0.29-1.el6sat.noarch
* foreman-ovirt-1.6.0.29-1.el6sat.noarch
* foreman-postgresql-1.6.0.29-1.el6sat.noarch
* foreman-proxy-1.6.0.21-1.el6sat.noarch
* foreman-selinux-1.6.0-8.el6sat.noarch
* foreman-vmware-1.6.0.29-1.el6sat.noarch
* katello-1.5.0-27.el6sat.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.6-1.el6sat.noarch
* katello-installer-0.0.56-1.el6sat.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-katello-0.3-3.el6sat.noarch
* pulp-nodes-common-2.4.0-0.23.beta.el6sat.noarch
* pulp-nodes-parent-2.4.0-0.23.beta.el6sat.noarch
* pulp-puppet-plugins-2.4.0-0.23.beta.el6sat.noarch
* pulp-puppet-tools-2.4.0-0.23.beta.el6sat.noarch
* pulp-rpm-plugins-2.4.0-0.23.beta.el6sat.noarch
* pulp-selinux-2.4.0-0.23.beta.el6sat.noarch
* pulp-server-2.4.0-0.23.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch

Comment 22 Brad Buckingham 2014-08-11 11:48:31 UTC
*** Bug 1126773 has been marked as a duplicate of this bug. ***

Comment 24 Dominic Cleal 2014-08-21 14:09:17 UTC
*** Bug 1132528 has been marked as a duplicate of this bug. ***

Comment 25 Bryan Kearney 2014-09-11 12:20:30 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.