|
[[32m INFO[0m [34m2016-02-23 10:53:35[0m [36mInit[0m] Initialization of Hammer CLI (0.5.1) has started...
|
|
[DEBUG [34m2016-02-23 10:53:35[0m [36mInit[0m] Running at ruby 1.9.3-p484
|
|
[[32m INFO[0m [34m2016-02-23 10:53:35[0m [36mInit[0m] Configuration from the file /etc/hammer/cli_config.yml has been loaded
|
|
[[32m INFO[0m [34m2016-02-23 10:53:35[0m [36mInit[0m] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
|
|
[[32m INFO[0m [34m2016-02-23 10:53:35[0m [36mInit[0m] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded
|
|
[DEBUG [34m2016-02-23 10:53:35[0m [36mConnection[0m] Registered: foreman
|
|
[DEBUG [34m2016-02-23 10:53:35[0m [36mAPI[0m] Global headers: {
|
|
:content_type => "application/json",
|
|
:accept => "application/json;version=2",
|
|
"Accept-Language" => "en"
|
|
}
|
|
[[32m INFO[0m [34m2016-02-23 10:53:35[0m [36mModules[0m] Extension module hammer_cli_foreman (0.5.1) loaded
|
|
[DEBUG [34m2016-02-23 10:53:35[0m [36mInit[0m] Using locale 'en'
|
|
[DEBUG [34m2016-02-23 10:53:35[0m [36mInit[0m] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/locale'
|
|
[DEBUG [34m2016-02-23 10:53:35[0m [36mInit[0m] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/locale'
|
|
[[32m INFO[0m [34m2016-02-23 10:53:35[0m [36mHammerCLI::MainCommand[0m] Called with options: {"option_debug"=>true, "option_username"=>"admin", "option_password"=>"***"}
|
|
[[32m INFO[0m [34m2016-02-23 10:53:36[0m [36mHammerCLIForeman::Host[0m] Called with options: {}
|
|
[[32m INFO[0m [34m2016-02-23 10:53:36[0m [36mHammerCLIForeman::Host::CreateCommand[0m] Called with options: {"option_managed"=>true, "option_build"=>true, "option_enabled"=>true, "option_overwrite"=>true, "option_compute_attributes"=>{"cpus"=>"4", "memory"=>"12884901888", "start"=>"1", "image_id"=>"/var/lib/libvirt/images/win7-appnode.qcow2"}, "option_volume_list"=>[{"pool_name"=>"virt-images", "capacity"=>"150G", "format_type"=>"qcow2", "allocation"=>"0G"}], "option_interface_list"=>[{"primary"=>"true", "provision"=>"true", "compute_type"=>"bridge", "compute_bridge"=>"br0", "compute_model"=>"virtio", "ip"=>"172.17.31.10"}], "option_provision_method"=>"image", "option_environment_id"=>1, "option_architecture_id"=>1, "option_domain_id"=>1, "option_operatingsystem_id"=>2, "option_subnet_id"=>1, "option_compute_resource_id"=>1, "option_hostgroup_id"=>3, "option_name"=>"r80dm", "option_puppet_proxy_id"=>1, "option_puppet_ca_proxy_id"=>1}
|
|
[[32m INFO[0m [34m2016-02-23 10:53:36[0m [36mAPI[0m] POST /api/hosts
|
|
[DEBUG [34m2016-02-23 10:53:36[0m [36mAPI[0m] Params: {
|
|
"host" => {
|
|
"name" => "r80dm",
|
|
"environment_id" => 1,
|
|
"architecture_id" => 1,
|
|
"domain_id" => 1,
|
|
"puppet_proxy_id" => 1,
|
|
"operatingsystem_id" => 2,
|
|
"subnet_id" => 1,
|
|
"compute_resource_id" => 1,
|
|
"hostgroup_id" => 3,
|
|
"puppet_ca_proxy_id" => 1,
|
|
"build" => true,
|
|
"enabled" => true,
|
|
"provision_method" => "image",
|
|
"managed" => true,
|
|
"compute_attributes" => {
|
|
"cpus" => "4",
|
|
"memory" => "12884901888",
|
|
"start" => "1",
|
|
"image_id" => "/var/lib/libvirt/images/win7-appnode.qcow2",
|
|
"volumes_attributes" => {
|
|
"0" => {
|
|
"pool_name" => "virt-images",
|
|
"capacity" => "150G",
|
|
"format_type" => "qcow2",
|
|
"allocation" => "0G"
|
|
}
|
|
}
|
|
},
|
|
"overwrite" => true,
|
|
"host_parameters_attributes" => {},
|
|
"interfaces_attributes" => {
|
|
"0" => {
|
|
"primary" => "true",
|
|
"provision" => "true",
|
|
"ip" => "172.17.31.10",
|
|
"compute_attributes" => {
|
|
"type" => "bridge",
|
|
"bridge" => "br0",
|
|
"model" => "virtio"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
[DEBUG [34m2016-02-23 10:53:36[0m [36mAPI[0m] Headers: {}
|
|
[DEBUG [34m2016-02-23 10:53:36[0m [36mAPI[0m] 500 Internal Server Error
|
|
{
|
|
"error" => {
|
|
"message" => "Invalid MAC "
|
|
}
|
|
}
|
|
[[31mERROR[0m [34m2016-02-23 10:53:36[0m [36mException[0m] Invalid MAC
|
|
Could not create the host:
|
|
Invalid MAC
|
|
[[31mERROR[0m [34m2016-02-23 10:53:36[0m [36mException[0m]
|
|
|
|
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/rest-client-1.6.7/lib/restclient/request.rb:230: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/ruby193/root/usr/share/ruby/net/http.rb:746: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.14/lib/apipie_bindings/api.rb:286:in `call_client'
|
|
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:217:in `http_call'
|
|
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:163:in `call'
|
|
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/resource.rb:14:in `call'
|
|
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/apipie/command.rb:43:in `send_request'
|
|
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:189:in `send_request'
|
|
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/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/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/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/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/bin/hammer:125:in `<top (required)>'
|
|
/usr/bin/hammer:23:in `load'
|
|
/usr/bin/hammer:23:in `<main>'
|
|
|
|
|
|
% Total % Received % Xferd Average Speed Time Time Time Current
|
|
Dload Upload Total Spent Left Speed
|
|
100 2890 0 2111 100 779 4 1 0:12:59 0:08:28 0:04:31 314
|
|
|
|
|
|
{"ip":"172.17.31.10","environment_id":1,"environment_name":"production","last_report":null,"mac":"52:54:00:4d:bf:79","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":1,"domain_name":"localdomain","architecture_id":1,"architecture_name":"x86_64","operatingsystem_id":2,"operatingsystem_name":"windows 6.1","subnet_id":1,"subnet_name":"deployment","sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"build":true,"comment":null,"disk":null,"installed_at":null,"model_id":null,"model_name":null,"hostgroup_id":3,"hostgroup_name":"ApplicationNode","owner_id":3,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":1,"managed":true,"use_image":null,"image_file":"","uuid":"032b52df-0f5c-4018-843b-b9f1096678b1","compute_resource_id":1,"compute_resource_name":"z440dm","compute_profile_id":null,"compute_profile_name":null,"capabilities":["build","image"],"provision_method":"image","puppet_proxy_id":1,"certname":"r80dm.localdomain","image_id":2,"image_name":"Win7AppNode","created_at":"2016-02-23T09:53:52Z","updated_at":"2016-02-23T09:53:52Z","last_compile":null,"global_status":0,"global_status_label":"Warning","puppet_status":0,"configuration_status":0,"configuration_status_label":"No reports","build_status":1,"build_status_label":"Pending installation","name":"r80dm.localdomain","id":7,"parameters":[],"interfaces":[{"id":14,"name":"r80dm.localdomain","ip":"172.17.31.10","mac":"52:54:00:4d:bf:79","identifier":null,"primary":true,"provision":true,"type":"interface"}],"puppetclasses":[],"config_groups":[],"all_parameters":[{}],"all_puppetclasses":[{}]}
|