Project

General

Profile

Actions

Bug #22171

closed

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 almost 7 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Urgent
Category:
Hosts
Target version:
-
Difficulty:
Triaged:
Yes
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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 ''


Related issues 1 (0 open1 closed)

Related to Hammer CLI - Tracker #26990: Tracker for VMware issuesClosedOleh Fedorenko

Actions
Actions #1

Updated by meuchel marde almost 7 years 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>'

Actions #2

Updated by meuchel marde almost 7 years ago

  • Category set to Hammer core
  • Assignee set to alexender fleming
  • Difficulty set to trivial
Actions #3

Updated by Tomáš Strachota almost 7 years ago

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

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.

Actions #4

Updated by Oleh Fedorenko over 5 years ago

Actions #5

Updated by Oleh Fedorenko about 5 years ago

  • Status changed from New to Closed
  • Triaged changed from No to Yes

Hi, I could not reproduce this issue on the latest (I've created a host with the same command succesfully).

I'm going to close this issue, but if you're still facing this issue, please reopen.

Actions

Also available in: Atom PDF