Bug 1199604

Summary: Hammer: org create - unclear message when trying to assign a non-existent subnet
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: APIAssignee: Amit Karsale <akarsale>
Status: CLOSED NEXTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.0CC: akarsale, aruzicka, bkearney, mhulan
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 20:01:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Corey Welton 2015-03-06 17:53:01 UTC
Description of problem:

When testing bug #1183196, I inadvertently tried creating org, associating it with a subnet that did not exist.  When this occurs, user gets an error message that seems to have nothing to do with the subnet.


Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-7-20150303.0

How reproducible:


Steps to Reproduce:
1.  Create capsules/smart proxiess; furthermore, create only one subnet.  Or create zero, and modify hammer command below accordingly.
2.  Attempt to create an org:
hammer organization create --description "eeee" --name "eeee" --smart-proxy-ids=2 --domain-ids 1 --subnet-ids 1,2
3.  View results


Actual results:
[root@rhsm-qe-2 ~]# hammer organization create --description "eeee" --name "eeee" --smart-proxy-ids=2 --domain-ids 1 --subnet-ids 1,2
[Foreman] Username: admin
[Foreman] Password for admin: 
Could not create the organization:
  Resource organization not found by id ''


Expected results:

An error message that makes more sense -- "No subnet found for id '2'" or whatever

Additional info:

Comment 2 Bryan Kearney 2016-07-08 20:32:37 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 4 Adam Ruzicka 2016-10-10 11:58:19 UTC
Created redmine issue http://projects.theforeman.org/issues/16846 from this bug

Comment 5 Adam Ruzicka 2016-10-10 13:00:47 UTC
The actual output is slightly changed, but it still says doesn't make much sense.

$ hammer organization create --description "eeee" --name "eeee" --smart-proxy-ids=1000 --domain-ids=5000
Could not create the organization:
  no resource loaded

Comment 6 Amit Karsale 2016-10-13 10:21:20 UTC
here are we expecting a generic error message statement or error specific to a specific parameter wrongly passed, as the current message is generic for any resource not found, maybe we can revise the error message from "no resource loaded" to something like "some of the attribute values are inappropriate."

Comment 7 Amit Karsale 2016-11-28 12:25:39 UTC
Does the above ^^ message seems valid, if so I can make necessary changes to fix it.

Comment 8 Bryan Kearney 2017-01-13 19:49:41 UTC
Can you tell which ones passed in are invalid? That would be the most helpful.

Comment 9 Amit Karsale 2017-02-10 04:43:42 UTC
This issue is been merged in the upstream branch.

Comment 10 Satellite Program 2017-02-12 09:17:34 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16846 has been resolved.

Comment 11 Bryan Kearney 2017-08-01 20:01:17 UTC
The fix to this bug will be delivered with release 6.3 of Satellite.