Bug #22171

create a host from hammer CLI to VMWare with error "Ressource host not found by id" when all the options are present

Added by meuchel marde 16 days ago. Updated 16 days ago.

Status:New
Priority:Urgent
Assigned To:alexender fleming
Category:Hosts
Target version:-
Difficulty: Bugzilla link:
Found in release:1.16.0 Pull request:
Story points-
Velocity based estimate-

Description

Hello People,
I try to get the thing running and provision from hammer to VMWare. I have no clue on this type of issue.

[root@sp-satellite-v2 marde]# hammer -u marde host create --organization-id 1 --location-id 1 --architecture-id=1 --build=false --compute-attributes="cpus=1,memory_mb=2048" --compute-profile=1-Small --compute-resource=vcenter --domain-id=1 --environment-id=1 --hostgroup-id=8 --interface="primary=true,provision=true,mac=00:50:56:b7:34:f5,ip=22.1.134.25" --name="rh7tst-v1.prod.adp.fr" --operatingsystem-id=1 --partition-table-id=103 --puppet-proxy-id=1 --volume="name='Hard disk',size_gb=50" --ask-root-password yes
[Foreman] Password for marde:
Enter the root password for the host:
Could not create the host:
Resource host not found by id ''

History

#1 Updated by meuchel marde 16 days ago

in a verbose way, I get ...

[root@sp-satellite-v2 marde]# hammer -v --show-ids -u marde host create --organization-id 1 --location-id 1 --architecture-id=1 --build=false --medium-id=9 --compute-profile=1-Small --compute-resource-id 1 --domain-id=1 --environment-id=1 --hostgroup-id=8 --interface="primary=true,provision=true,mac=00:50:56:b7:34:f5,ip=22.1.134.25" --name="rh7tst-v1.prod.adp.fr" --operatingsystem-id=1 --partition-table-id=103 --puppet-proxy-id=1 --volume="name='Hard disk',size_gb=50" --root-pass 'changeme'
[Foreman] Password for marde:
[ERROR 2018-01-08 11:23:36 Exception] Resource host not found by id ''
Could not create the host:
Resource host not found by id ''
[ERROR 2018-01-08 11:23:36 Exception]

RestClient::ResourceNotFound (404 Resource Not Found):
/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.13/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.10/lib/hammer_cli_foreman/commands.rb:190:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.13/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.13/lib/hammer_cli/abstract.rb:24: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.13/lib/hammer_cli/abstract.rb:24: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.13/lib/hammer_cli/abstract.rb:24: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.13/bin/hammer:125:in `<top (required)>'
/bin/hammer:23:in `load'
/bin/hammer:23:in `<main>'

#2 Updated by meuchel marde 16 days ago

  • Found in release set to 1.16.0
  • Difficulty set to trivial
  • Assigned To set to alexender fleming
  • Category set to Hammer core

#3 Updated by Tomáš Strachota 16 days ago

  • Difficulty deleted (trivial)
  • Category changed from Hammer core to Hosts

Hello,
can you please provide output of the hammer command with -d (full debug vs. just verbose -v) and also the server side logs? I suspect the issue could be on server side.

Also available in: Atom PDF