Bug 1199604 - Hammer: org create - unclear message when trying to assign a non-existent subnet
Summary: Hammer: org create - unclear message when trying to assign a non-existent subnet
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: Amit Karsale
QA Contact: Katello QA List
Depends On:
TreeView+ depends on / blocked
Reported: 2015-03-06 17:53 UTC by Corey Welton
Modified: 2019-09-26 13:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2017-08-01 20:01:17 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16846 0 None None None 2016-10-10 11:58:20 UTC

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):

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.

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