Bug 1336769 - Creating a subnet using --organization-ids raises: resource have no errors
Summary: Creating a subnet using --organization-ids raises: resource have no errors
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-17 12:28 UTC by Sachin Ghai
Modified: 2018-08-31 15:19 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-02 20:58:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin Ghai 2016-05-17 12:28:58 UTC
Description of problem:
I was trying to create a subnet via hammer and used all possible options including --organization-ids.

# hammer -u admin -p changeme subnet create --name "subnet119" --dhcp-id=1  --dns-id=1 --dns-primary 10.0.0.1 --gateway 10.0.0.126 --mask 255.255.255.128 --tftp-id=1 --domain-ids=1 --location-ids=1   --organization-ids=1 --network=10.0.0.0
Could not create the subnet:
  resource have no errors

debug logs:


[DEBUG 2016-05-17 08:21:26 API] 500 Internal Server Error
{
    "error" => {
        "message" => "resource have no errors"
    }
}
[ERROR 2016-05-17 08:21:26 Exception] resource have no errors
Could not create the subnet:
  resource have no errors
[ERROR 2016-05-17 08:21:26 Exception] 

RestClient::InternalServerError (500 Internal Server Error):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:308:in `block in rest_client_call_block'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
    /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:67:in `post'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:295:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:224:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:174:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:169:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/resource.rb:14:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.6/lib/hammer_cli/apipie/command.rb:43:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.6/lib/hammer_cli_foreman/commands.rb:190:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.6/lib/hammer_cli/apipie/command.rb:34:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.6/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.6/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.6/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.6/bin/hammer:125:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'


Version-Release number of selected component (if applicable):
Sat6.2 snap11.0

How reproducible:


Steps to Reproduce:
1. create  subnet with --organization-ids
2.
3.

Actual results:
Could not create the subnet:
  resource have no errors

Expected results:
subnet should be created

Additional info:

Comment 1 Sachin Ghai 2016-05-17 12:32:06 UTC
# hammer -u admin -p changeme subnet create --name "subnet119" --dhcp-id=1  --dns-id=1 --dns-primary 10.0.0.1 --gateway 10.0.0.126 --mask 255.255.255.128 --tftp-id=1 --domain-ids=1 --location-ids=1   --organization-ids=1 --network=10.0.0.0
Could not create the subnet:
  resource have no errors


]# hammer -u admin -p changeme organization list
---|----------------------|----------------------|------------
ID | NAME                 | LABEL                | DESCRIPTION
---|----------------------|----------------------|------------
1  | Default Organization | Default_Organization |            
---|----------------------|----------------------|------------


Please note we are passing correct org id. 


Now, lets create subnet without associating subnet:

[root@cloud-qe-15 hammerify]#  hammer -u admin -p changeme subnet create --name "subnet119" --dhcp-id=1  --dns-id=1 --dns-primary 10.0.0.1 --gateway 10.0.0.126 --mask 255.255.255.128 --tftp-id=1 --domain-ids=1 --location-ids=1   --network=10.0.0.0
Subnet created

Comment 2 Sachin Ghai 2016-05-17 12:40:31 UTC
Further investigated and found that either we can specify --organization-ids or --locations-ids but not both..

see how I created subnet with using --locations-ids but with  --organization-ids

]#  hammer -u admin -p changeme subnet create --name "subnet120" --dhcp-id=1  --dns-id=1 --dns-primary 10.0.0.1 --gateway 10.0.0.126 --mask 255.255.255.128 --tftp-id=1 --domain-ids=1 --organization-ids=1   --network=10.0.0.0
Subnet created

Comment 4 Bryan Kearney 2018-08-02 20:58:35 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the forseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.


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