Bug 741678 - org delete does not remove ALL the stuff from CP,pulp
Summary: org delete does not remove ALL the stuff from CP,pulp
Keywords:
Status: CLOSED DUPLICATE of bug 771957
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-09-27 14:54 UTC by Garik Khachikyan
Modified: 2015-01-04 21:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-26 09:33:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Generated Production.logs (62.34 KB, application/octet-stream)
2011-12-29 10:32 UTC, Sachin Ghai
no flags Details

Description Garik Khachikyan 2011-09-27 14:54:20 UTC
Description of problem:
Try of reusing the product name (which was removed before) fails with JDBC exception from Candlepin side.

Version-Release number of selected component (if applicable):
candlepin-0.4.16-1.fc14.noarch
katello-0.1.84-1.git.26.51fa1e1.fc14.noarch
pulp-0.0.234-1.fc14.noarch
katello-cli-0.1.10-1.git.300.19ad8f0.el6.noarch

How reproducible:
always.

Steps to Reproduce:
1. org create --name org1
2. provider create --name provider1 --org org1 --type custom
3. product create --provider provider1 --org org1 --name product1 --url http://repos.fedorapeople.org/repos/katello/katello/ --assumeyes
4. org delete --name org1
5. try to repeat the steps: {1-3}
  
Actual results:
Scenario fails on repeating with product creation.
---
RestClient::InternalServerError: Candlepin::Product: 500 Internal Server Error {"displayMessage":"Runtime Error Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (POST /candlepin/products/)
---
I guess the product and/or repo stuff does not get properly cleaned during `org delete` action.

Expected results:
org delete should cascade remove all the underlying components.

Additional info:

Comment 1 Ivan Necas 2011-10-11 15:26:42 UTC
not reproducible on

candlepin-0.4.19-1.el6.noarch
pulp-0.0.230-3.el6.noarch
katello-0.1.91-1.git.0.8475254.el6.noarch

Comment 5 Garik Khachikyan 2011-10-12 14:23:20 UTC
well, i can confirm: recent latest is really "greatest" :) 

things are fixed now!

thanks to commits of:
katello-cli-0.1.10-1.git.651.e5b8708.el6.noarch
katello-0.1.92-1.git.0.657d7d5.el6.noarch
candlepin-0.4.19-1.el6.noarch
pulp-0.0.237-4.el6.noarch

Comment 6 Sachin Ghai 2011-12-29 10:26:30 UTC
verified with following katello build:

[root@dhcp201-197 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.155-1.el6.noarch
katello-configure-0.1.48-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-cli-common-0.1.31-1.el6.noarch
katello-glue-foreman-0.1.155-1.el6.noarch
katello-common-0.1.155-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-0.1.155-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-0.1.4-1.el6.noarch
katello-cli-0.1.31-1.el6.noarch
katello-glue-candlepin-0.1.155-1.el6.noarch
katello-all-0.1.155-1.el6.noarch
katello-certs-tools-1.0.1-1.el6.noarch


I think this issue is still reproducible.  Please see the steps I followed:


-----
1. katello> org create --name org1
Successfully created org [ org1 ]

2. katello> provider create --org org1 --name provider1
Successfully created provider [ provider1 ]

3. katello> product create --provider provider1 --org org1 --name product1 --url http://repos.fedorapeople.org/repos/katello/katello/ --assumeyes
Successfully created product [ product1 ]
Discovering repository urls, this could take some time...
(+)  [1] http://repos.fedorapeople.org/repos/katello/katello/fedora-16/x86_64
::::
::::
<truncate>


4. katello> org delete --name org1
Successfully deleted org [ org1 ]

5. katello> org create --name org1
Validation failed: Name has already been taken
----

Issue:1
==========
After deleting the org, when I created the same org with same name, I got
"Validation failed: Name has already been taken".

Since I've already removed org1 so user should be able to re-create org1.

Comment 7 Sachin Ghai 2011-12-29 10:30:15 UTC
Later, I changed the name of org from org1 to "new_org" and repeat all steps:

1. katello> org create --name new_org
Successfully created org [ new_org ]


2. katello> provider create --org new_org --name provider1Successfully created provider [ provider1 ]


3. katello> product create --provider provider1 --org new_org --name product1 --url http://repos.fedorapeople.org/repos/katello/katello/ --assumeyes

RestClient::InternalServerError: Candlepin::Product: 500 Internal Server Error {"displayMessage":"Runtime Error Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (POST /candlepin/products/)
katello> 



Please see the attached production.logs

since the reported issue is still reproducible, I'm moving this to 'assigned' state.

Comment 8 Sachin Ghai 2011-12-29 10:32:14 UTC
Created attachment 549932 [details]
Generated Production.logs

Comment 9 Ivan Necas 2012-01-26 09:33:58 UTC
I was able 100% reproduce the issue o katello-0.1.155-1, but not on katello-0.1.196-1. There is another BZ [1] tracking this issue, that has some fix already. I'm closing this BZ because it's clearly the same issue, and there was already som fix on that.

*** This bug has been marked as a duplicate of bug 771957 ***

Comment 11 Hayk Hovsepyan 2012-12-04 11:15:40 UTC
Automated in class: "com.redhat.qe.katello.tests.e2e.OrgReCreate"

Comment 12 Mike McCune 2013-08-16 18:22:14 UTC
getting rid of 6.0.0 version since that doesn't exist


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