Hide Forgot
Description of problem: When trying to create an org in foreman when an org with the same name already exists, an ISE is thrown. This is incongruent with such behavior for other subcommands Version-Release number of selected component (if applicable): Satellite-6.0.2-RHEL-6-20131023.1 How reproducible: Steps to Reproduce: 1. 'hammer -u admin -p admin organization create --name foobar' ; note org is created 2. 'hammer -u admin -p admin organization create --name foobar' 3. View results Actual results: [root@cloud-qe-21 ~]# hammer -u admin -p admin organization create --name foobar Could not create the organization: Error: 500 Internal Server Error Expected results: Something like "Organization creation failed: An organization with this name already exists" Additional info:
Likewise, attempting to modify an org to have the same name as an existing one throws the same error.
Turns out to be a Foreman API error. Please include production.log info when you get HTTP error codes like this.
*** Bug 1062306 has been marked as a duplicate of this bug. ***
checked into upstream.
DEBUG basecli:43: Running test TestOrg/test_bugzilla_1023125 DEBUG ssh:100: >>> LANG=en_US hammer -v -u admin -p changeme --output csv organization create --name='ucwoer' DEBUG ssh:153: <<< ['Message,Id,Name', 'Organization created,171,ucwoer', ''] DEBUG ssh:100: >>> LANG=en_US hammer -v -u admin -p changeme --output csv organization info --id='171' DEBUG ssh:153: <<< ['Id,Name,Created at,Updated at,Label,Description', '171,ucwoer,2014/03/11 16:27:16,2014/03/11 16:27:16,ucwoer,""', ''] DEBUG ssh:100: >>> LANG=en_US hammer -v -u admin -p changeme --output csv organization list --search='label="ucwoer"' DEBUG ssh:153: <<< ['Id,Name,Label,Description', '171,ucwoer,ucwoer,""', ''] DEBUG ssh:100: >>> LANG=en_US hammer -v -u admin -p changeme --output csv organization create --name='ucwoer' DEBUG ssh:156: <<< [ERROR 2014-03-11 12:27:26 Exception] Name has already been taken Name has already been taken Title has already been taken Label already exists (including organizations being deleted) Organization Names and labels must be unique across all organizations Could not create the organization: Name has already been taken Name has already been taken Title has already been taken Label already exists (including organizations being deleted) Organization Names and labels must be unique across all organizations DEBUG factory:78: [ERROR 2014-03-11 12:27:26 Exception] Name has already been taken Name has already been taken Title has already been taken Label already exists (including organizations being deleted) Organization Names and labels must be unique across all organizations Could not create the organization: Name has already been taken Name has already been taken Title has already been taken Label already exists (including organizations being deleted) Organization Names and labels must be unique across all organizations . ---------------------------------------------------------------------- Ran 1 test in 16.700s OK
This was delivered with 6.0.3, which is the Satellite 6 Beta.