Project

General

Profile

Actions

Bug #25098

closed

`hammer host create ...` returns ISE instead of an error message when LibVirt compute-resource is not in correct organization

Added by Marek Hulán about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Compute resources - libvirt
Target version:
-
Fixed in Releases:
Found in Releases:

Description

The error is still reproducible:

I am still able to re-produce the error.
All the entities are in Default org and location, expect the Compute resource which is in ORG "abc"

hammer> compute-resource info --id 4
Id:            4
Name:          sjagtap_libvirt
Provider:      Libvirt
Url:           qemu+tcp://<libvirt>/system
Description:   
User:          
Locations:     
    Default Location
Organizations: 
    Default Organization
Created at:    2018/09/20 12:26:38
Updated at:    2018/09/20 12:26:38

hammer> host create --name host1 --architecture-id=1 --compute-resource-id=4 --domain-id=1 --environment-id=1 --ip="148.172.224.43" --location-id="2" --mac="94:e3:d9:06:72:48" --medium-id="1" --operatingsystem-id=3 --organization-id="1" --partition-table-id=94 --puppet-proxy-id="1" --root-password=dog8code
Host created.

compute-resource update --id 4 --organizations abc
Compute resource updated.
hammer> compute-resource info --id 4
Id:            4
Name:          sjagtap_libvirt
Provider:      Libvirt
Url:           qemu+tcp://<libvirt>/system
Description:   
User:          
Locations:     
    Default Location
Organizations: 
    abc
Created at:    2018/09/20 12:26:38
Updated at:    2018/09/20 12:26:38
hammer -v host create --name host2 --architecture-id=1 --compute-resource-id=4 --domain-id=1 --environment-id=1 --ip="148.172.224.43" --location-id="2" --mac="94:e3:d9:06:72:48" --medium-id="1" --operatingsystem-id=3 --organization-id="1" --partition-table-id=94 --puppet-proxy-id="1" --root-password=dog8code
[ERROR 2018-09-20T08:30:45 API] 500 Internal Server Error
[ERROR 2018-09-20T08:30:45 Exception] Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.
Could not create the host:
  Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.
[ERROR 2018-09-20T08:30:45 Exception]
RestClient::InternalServerError (500 Internal Server Error):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:223:in `exception_with_response'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:103:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:353:in `block in rest_client_call_block'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:807:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:725:in `block in transmit'
    /opt/rh/rh-ruby24/root/usr/share/ruby/net/http.rb:877:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:715:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:145:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:52:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/resource.rb:67:in `post'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:327:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:240:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:190:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:185:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/resource.rb:21:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.13.1/lib/hammer_cli/apipie/command.rb:51:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.13.2/lib/hammer_cli_foreman/commands.rb:168:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.13.1/lib/hammer_cli/apipie/command.rb:34:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.13.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.13.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.13.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.13.1/bin/hammer:143:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Related issues 1 (0 open1 closed)

Copied from Foreman - Bug #24348: hammer host create returns ISE when LibVirt compute-resource is not in correct organizationClosedActions
Actions

Also available in: Atom PDF