Bug 772575 - Create a deleted org will be failed
Summary: Create a deleted org will be failed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 1.0
Assignee: Tom McKay
QA Contact: SAM QE List
URL:
Whiteboard:
Depends On:
Blocks: 703617
TreeView+ depends on / blocked
 
Reported: 2012-01-09 10:02 UTC by Suyuan Li
Modified: 2012-04-27 00:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-27 00:21:36 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 771352 0 high CLOSED SAM does need to use the katello-jobs backend engine 2021-02-22 00:41:40 UTC

Internal Links: 771352

Description Suyuan Li 2012-01-09 10:02:04 UTC
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 19:49:23 UTC
katello-jobs is required for org deletion since it is an async task

See BZ 771352

Comment 2 Eric Sammons 2012-02-02 18:04:38 UTC
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 18:13:42 UTC
Switching back to ON_QA will test with 2/2/12 puddle.

Comment 4 Eric Sammons 2012-02-07 15:17:39 UTC
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 13:37:49 UTC
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.