Actions
Bug #13422
closedcreating a host on a libvirt compute resource throws an invalid MAC error
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Orchestration
Target version:
-
Description
command used:
hammer -d host create --hostgroup=Default --compute-resource=libvirt --compute-profile="1-Small" --compute-attributes="start=true" --interface="primary=true,compute_type=network,compute_network=default,provision=true" --name="hammer"
Output from -d:
[ INFO 2016-01-28 08:46:25 Init] Initialization of Hammer CLI (0.5.1) has started...
[DEBUG 2016-01-28 08:46:25 Init] Running at ruby 1.9.3-p484
[ INFO 2016-01-28 08:46:25 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2016-01-28 08:46:25 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2016-01-28 08:46:25 Connection] Registered: foreman
[DEBUG 2016-01-28 08:46:25 API] Global headers: {
:content_type => "application/json",
:accept => "application/json;version=2",
"Accept-Language" => "en"
}
[ INFO 2016-01-28 08:46:25 Modules] Extension module hammer_cli_foreman (0.5.1) loaded
[DEBUG 2016-01-28 08:46:25 Init] Using locale 'en'
[DEBUG 2016-01-28 08:46:25 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/locale'
[DEBUG 2016-01-28 08:46:25 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/locale'
[ INFO 2016-01-28 08:46:25 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[ INFO 2016-01-28 08:46:25 HammerCLIForeman::Host] Called with options: {}
[ INFO 2016-01-28 08:46:25 HammerCLIForeman::Host::CreateCommand] Called with options: {"option_managed"=>true, "option_build"=>true, "option_enabled"=>true, "option_overwrite"=>true, "option_compute_attributes"=>{"start"=>"true"}, "option_volume_list"=>[], "option_interface_list"=>[{"primary"=>"true", "compute_type"=>"network", "compute_network"=>"default", "provision"=>"true"}], "option_compute_resource_name"=>"libvirt", "option_hostgroup_name"=>"Default", "option_compute_profile_name"=>"1-Small", "option_name"=>"hammer"}
[ INFO 2016-01-28 08:46:25 API] GET /api/compute_resources
[DEBUG 2016-01-28 08:46:25 API] Params: {
:search => "name = \"libvirt\""
}
[DEBUG 2016-01-28 08:46:25 API] Headers: {
:params => {
:search => "name = \"libvirt\""
}
}
[Foreman] Username: admin
[Foreman] Password for admin:
[DEBUG 2016-01-28 08:46:31 API] Response: {
"total" => 1,
"subtotal" => 1,
"page" => 1,
"per_page" => 20,
"search" => "name = \"libvirt\"",
"sort" => {
"by" => nil,
"order" => nil
},
"results" => [
[0] {
"description" => "",
"url" => "qemu+ssh://root@192.168.1.1/system",
"created_at" => "2016-01-27T00:23:21Z",
"updated_at" => "2016-01-27T00:23:21Z",
"id" => 1,
"name" => "libvirt",
"provider" => "Libvirt",
"provider_friendly_name" => "Libvirt",
"display_type" => "VNC",
"set_console_password" => true
}
]
}
[DEBUG 2016-01-28 08:46:31 API] Response headers: {
:date => "Wed, 27 Jan 2016 21:46:31 GMT",
:server => "Apache/2.4.7 (Ubuntu)",
:foreman_version => "1.10.1",
:foreman_api_version => "2",
:apipie_checksum => "23ce322a4d14cf8f8066bfe6f3d1e0ec",
:x_ua_compatible => "IE=Edge,chrome=1",
:cache_control => "must-revalidate, private, max-age=0",
:x_request_id => "b8ee81901d5a075240db51c85ea4525c",
:x_runtime => "0.036656",
:x_rack_cache => "miss",
:x_powered_by => "Phusion Passenger 4.0.37",
:set_cookie => [
[0] "_session_id=4328637385e9d686c0434928fd2b9817; path=/; secure; HttpOnly",
[1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT"
],
:etag => "\"0706fb7a3ecea33b5e3a2fc4b2f32df8\"",
:status => "200 OK",
:connection => "close",
:transfer_encoding => "chunked",
:content_type => "application/json; charset=utf-8"
}
[ INFO 2016-01-28 08:46:31 API] GET /api/hostgroups
[DEBUG 2016-01-28 08:46:31 API] Params: {
:search => "name = \"Default\""
}
[DEBUG 2016-01-28 08:46:31 API] Headers: {
:params => {
:search => "name = \"Default\""
}
}
[DEBUG 2016-01-28 08:46:31 API] Response: {
"total" => 2,
"subtotal" => 1,
"page" => 1,
"per_page" => 20,
"search" => "name = \"Default\"",
"sort" => {
"by" => nil,
"order" => nil
},
"results" => [
[0] {
"subnet_id" => 1,
"subnet_name" => "libvirt",
"operatingsystem_id" => 1,
"operatingsystem_name" => "Ubuntu 14.04.3 LTS",
"domain_id" => 1,
"domain_name" => "internal.devops.removed",
"environment_id" => 2,
"environment_name" => "proddevtest",
"compute_profile_id" => 1,
"compute_profile_name" => "1-Small",
"ancestry" => nil,
"puppet_proxy_id" => 1,
"puppet_ca_proxy_id" => 1,
"ptable_id" => 56,
"ptable_name" => "Preseed default",
"medium_id" => 6,
"medium_name" => "Ubuntu mirror",
"architecture_id" => 1,
"architecture_name" => "x86_64",
"realm_id" => nil,
"realm_name" => nil,
"created_at" => "2016-01-27T04:12:09Z",
"updated_at" => "2016-01-27T04:12:55Z",
"id" => 2,
"name" => "Default",
"title" => "Default"
}
]
}
[DEBUG 2016-01-28 08:46:31 API] Response headers: {
:date => "Wed, 27 Jan 2016 21:46:31 GMT",
:server => "Apache/2.4.7 (Ubuntu)",
:foreman_version => "1.10.1",
:foreman_api_version => "2",
:apipie_checksum => "23ce322a4d14cf8f8066bfe6f3d1e0ec",
:x_ua_compatible => "IE=Edge,chrome=1",
:cache_control => "must-revalidate, private, max-age=0",
:x_request_id => "ee366952711c0fde2f2d8debfc08e4f3",
:x_runtime => "0.038571",
:x_rack_cache => "miss",
:x_powered_by => "Phusion Passenger 4.0.37",
:set_cookie => [
[0] "_session_id=b005be9f3aea634a09627230810d6582; path=/; secure; HttpOnly",
[1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT"
],
:etag => "\"e345d42d5d960f7713a43ae3c11aec91\"",
:status => "200 OK",
:connection => "close",
:transfer_encoding => "chunked",
:content_type => "application/json; charset=utf-8"
}
[ INFO 2016-01-28 08:46:31 API] GET /api/compute_profiles
[DEBUG 2016-01-28 08:46:31 API] Params: {
:search => "name = \"1-Small\""
}
[DEBUG 2016-01-28 08:46:31 API] Headers: {
:params => {
:search => "name = \"1-Small\""
}
}
[DEBUG 2016-01-28 08:46:31 API] Response: {
"total" => 3,
"subtotal" => 1,
"page" => 1,
"per_page" => 20,
"search" => "name = \"1-Small\"",
"sort" => {
"by" => nil,
"order" => nil
},
"results" => [
[0] {
"created_at" => "2016-01-26T23:51:15Z",
"updated_at" => "2016-01-26T23:51:15Z",
"id" => 1,
"name" => "1-Small"
}
]
}
[DEBUG 2016-01-28 08:46:31 API] Response headers: {
:date => "Wed, 27 Jan 2016 21:46:31 GMT",
:server => "Apache/2.4.7 (Ubuntu)",
:foreman_version => "1.10.1",
:foreman_api_version => "2",
:apipie_checksum => "23ce322a4d14cf8f8066bfe6f3d1e0ec",
:x_ua_compatible => "IE=Edge,chrome=1",
:cache_control => "must-revalidate, private, max-age=0",
:x_request_id => "bd931a95fec9e866b84cddc98af81d2a",
:x_runtime => "0.027836",
:x_rack_cache => "miss",
:x_powered_by => "Phusion Passenger 4.0.37",
:set_cookie => [
[0] "_session_id=b02b6ae052e90924ee78a46bc681e5c8; path=/; secure; HttpOnly",
[1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT"
],
:etag => "\"51f759cd3fe314f91ec4781165dffc5f\"",
:status => "200 OK",
:connection => "close",
:transfer_encoding => "chunked",
:content_type => "application/json; charset=utf-8"
}
[ INFO 2016-01-28 08:46:31 API] POST /api/hosts
[DEBUG 2016-01-28 08:46:31 API] Params: {
"host" => {
"name" => "hammer",
"compute_resource_id" => 1,
"hostgroup_id" => 2,
"build" => true,
"enabled" => true,
"managed" => true,
"compute_profile_id" => 1,
"compute_attributes" => {
"start" => "true",
"volumes_attributes" => {}
},
"overwrite" => true,
"host_parameters_attributes" => {},
"interfaces_attributes" => {
"0" => {
"primary" => "true",
"provision" => "true",
"compute_attributes" => {
"type" => "network",
"network" => "default"
}
}
}
}
}
[DEBUG 2016-01-28 08:46:31 API] Headers: {}
[DEBUG 2016-01-28 08:46:33 API] 500 Internal Server Error
{
"error" => {
"message" => "Invalid MAC "
}
}
[ERROR 2016-01-28 08:46:33 Exception] Invalid MAC
Could not create the host:
Invalid MAC
[ERROR 2016-01-28 08:46:33 Exception]
RestClient::InternalServerError (500 Internal Server Error):
/usr/lib/ruby/vendor_ruby/restclient/abstract_response.rb:48:in `return!'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:230:in `process_result'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:178:in `block in transmit'
/usr/lib/ruby/1.9.1/net/http.rb:746:in `start'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:172:in `transmit'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:64:in `execute'
/usr/lib/ruby/vendor_ruby/restclient/request.rb:33:in `execute'
/usr/lib/ruby/vendor_ruby/restclient/resource.rb:67:in `post'
/usr/lib/ruby/vendor_ruby/apipie_bindings/api.rb:286:in `call_client'
/usr/lib/ruby/vendor_ruby/apipie_bindings/api.rb:217:in `http_call'
/usr/lib/ruby/vendor_ruby/apipie_bindings/api.rb:163:in `call'
/usr/lib/ruby/vendor_ruby/apipie_bindings/resource.rb:14:in `call'
/usr/lib/ruby/vendor_ruby/hammer_cli/apipie/command.rb:43:in `send_request'
/usr/lib/ruby/vendor_ruby/hammer_cli_foreman/commands.rb:189:in `send_request'
/usr/lib/ruby/vendor_ruby/hammer_cli/apipie/command.rb:34:in `execute'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:68:in `run'
/usr/lib/ruby/vendor_ruby/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:68:in `run'
/usr/lib/ruby/vendor_ruby/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:68:in `run'
/usr/lib/ruby/vendor_ruby/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/vendor_ruby/clamp/command.rb:133:in `run'
/usr/bin/hammer:125:in `<main>'
Actions