Bug 772575 - Create a deleted org will be failed
Create a deleted org will be failed
Status: CLOSED CURRENTRELEASE
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.0.0
Unspecified Unspecified
medium Severity medium
: ---
: 1.0
Assigned To: Tom McKay
SAM QE List
:
Depends On:
Blocks: 703617
  Show dependency treegraph
 
Reported: 2012-01-09 05:02 EST by Suyuan Li
Modified: 2012-04-26 20:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-26 20:21:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
The error log should be modified. (38.85 KB, image/png)
2012-01-09 05:02 EST, Suyuan Li
no flags Details

  None (edit)
Description Suyuan Li 2012-01-09 05:02:04 EST
Created attachment 551523 [details]
The error log should be modified.

Description of problem:
Create a org with a name which was created ever but deleted will be failed.

Version-Release number of selected component (if applicable):
katello-headpin-all-0.1.122-2.el6.noarch
thumbslug-0.0.21-1.el6.noarch
candlepin-0.5.8-1.el6.noarch


How reproducible:
Always

Steps to Reproduce:
1. deploy a sam server
2. create an org with name test_org1
   # headpin -u admin -p admin org create --name=test_org1
     Successfully created org [ test_org1 ]
3. delete the org with name test_org1
   # headpin -u admin -p admin org delete --name=test_org1
     Successfully deleted org [ test_org1 ]
4. list all the org
	# headpin -u admin -p admin org list
	-------------------------------------------------------------------------------------------------------------------------------------------
		                                                         			Organization List

	 Id   Name               Description                    
	-------------------------------------------------------------------------------------------------------------------------------------------
	 1    ACME_Corporation   ACME_Corporation Organization  

5. recreate an org with name test_org1
   # headpin -u admin -p admin org create --name=test_org1
     Validation failed: Name has already been taken

6. list all the org
	# headpin -u admin -p admin org list
	-------------------------------------------------------------------------------------------------------------------------------------------
		                                                         			Organization List

	 Id   Name               Description                    
	-------------------------------------------------------------------------------------------------------------------------------------------
	 1    ACME_Corporation   ACME_Corporation Organization  
  
Actual results:
   test_org1 create failed and error raised validation failed.

Expected results:
   "Successfully created org [ test_org1 ]" will be raised and test_org1 will be listed.

Additional info:
On headpin WEBUI, do the same steps, error will be raised: 
"Validation Failed: . Environment Name has already been taken."
Comment 1 Tom McKay 2012-01-26 14:49:23 EST
katello-jobs is required for org deletion since it is an async task

See BZ 771352
Comment 2 Eric Sammons 2012-02-02 13:04:38 EST
FAILED


headpin> org create --name=test001
Successfully created org [ test001 ]
headpin> org delete --name=test001
Successfully deleted org [ test001 ]
headpin> org list
--------------------------------------------------------------------------------
                               Organization List

 Id   Name                        Description                                                
--------------------------------------------------------------------------------
 1    ACME_Corporation            ACME_Corporation Organization                              
 2    Org-X2YVL8SkHqThajDS        This is a test organization, created by web ui
...

# headpin -u admin -p admin org list|grep test001
# 


# headpin -u admin -p admin org create --name=test001
Validation failed: Name has already been taken

This error also occurs in the Web UI as 
Validation Failed:
Environment Name has already been taken
Comment 3 Eric Sammons 2012-02-02 13:13:42 EST
Switching back to ON_QA will test with 2/2/12 puddle.
Comment 4 Eric Sammons 2012-02-07 10:17:39 EST
87   SearchOrg-uNpAs1wnqi9w       This test org created via api for QE                       

[root@fry ~]# headpin -u admin -p admin org delete --name SearchOrg-uNpAs1wnqi9w 
Successfully deleted org [ SearchOrg-uNpAs1wnqi9w ]
[root@fry ~]# headpin -u admin -p admin org create --name SearchOrg-uNpAs1wnqi9w
Validation failed: Name has already been taken

FAILED
katello-headpin-all-0.1.130-2.el6.noarch
Comment 5 Eric Sammons 2012-02-14 08:37:49 EST
root@fry ~]# headpin -u admin -p admin org create --name testorg
Successfully created org [ testorg ]
[root@fry ~]# headpin -u admin -p admin org delete --name testorg
Successfully deleted org [ testorg ]
[root@fry ~]# headpin -u admin -p admin org create --name testorg
Successfully created org [ testorg ]
[root@fry ~]# headpin -u admin -p admin org list
--------------------------------------------------------------------------------
                               Organization List

 Id   Name                               Description                           
--------------------------------------------------------------------------------
 1    ACME_Corporation                   ACME_Corporation Organization         
 2    activationkeyorgPoGBKaH0           This test org created via api for QE  
 3    activationkeyorgfH5ufp9cBG2phLei   This test org created via api for QE  
 4    activationkeyorgaSzEKQuRJcMiI      This test org created via api for QE  
 5    activationkeyorgrIE6ussEU8i0       This test org created via api for QE  
 6    activationkeyorgsWQbiu6yC2         This test org created via api for QE  
 7    activationkeyorgvOBWPVAzbbVb       This test org created via api for QE  
 8    activationkeyorga2XPrBZmp4srg      This test org created via api for QE  
 9    activationkeyorga7mIxGmLALd        This test org created via api for QE  
 10   activationkeyorggXDcgOyB9          This test org created via api for QE  
 11   activationkeyorg035xfF54t8oHaa1    This test org created via api for QE  
 12   activationkeyorgrEQzsva2AFxKFw1    This test org created via api for QE  
 13   activationkeyorgLTmCYbIW           This test org created via api for QE  
 14   activationkeyorgqGZWenDI           This test org created via api for QE  
 15   activationkeyorgWC8CYFqkA          This test org created via api for QE  
 16   activationkeyorgMFNzYlWjpuEzPsf    This test org created via api for QE  
 17   activationkeyorgoY6Ktrrgwc2h7      This test org created via api for QE  
 18   activationkeyorgKNMl6rLK7iBbJ      This test org created via api for QE  
 20   testorg                            None                                  


VERIFIED katello-headpin-all-0.1.135-2.el6.noarch

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