[ INFO 2017-06-13T10:54:16 Init] Initialization of Hammer CLI (0.10.2) has started... [DEBUG 2017-06-13T10:54:16 Init] Running at ruby 2.3.1-p112 [ INFO 2017-06-13T10:54:16 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2017-06-13T10:54:16 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2017-06-13T10:54:16 Init] Configuration from the file /home/user/.hammer/cli_config.yml has been loaded [ WARN 2017-06-13T10:54:17 Modules] Legacy configuration of modules detected. Check section about configuration in user manual [DEBUG 2017-06-13T10:54:17 SSLoptions] SSL options: { :verify_ssl => true } [DEBUG 2017-06-13T10:54:17 API] Global headers: { :content_type => "application/json", :accept => "application/json;version=2", "Accept-Language" => "en" } [DEBUG 2017-06-13T10:54:17 API] Follow redirects: never [DEBUG 2017-06-13T10:54:17 Connection] Registered: foreman [ INFO 2017-06-13T10:54:17 Modules] Extension module hammer_cli_foreman (0.10.0) loaded [ INFO 2017-06-13T10:54:17 Modules] Extension module hammer_cli_foreman (0.10.0) loaded [DEBUG 2017-06-13T10:54:17 Init] Using locale 'en' [DEBUG 2017-06-13T10:54:17 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/var/lib/gems/2.3.0/gems/hammer_cli-0.10.2/locale' [DEBUG 2017-06-13T10:54:17 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/locale' [ INFO 2017-06-13T10:54:17 HammerCLI::MainCommand] Called with options: {"option_debug"=>true, "option_username"=>"user", "option_password"=>"***"} [ INFO 2017-06-13T10:54:17 HammerCLIForeman::Host] Called with options: {} [ INFO 2017-06-13T10:54:17 HammerCLIForeman::Host::UpdateCommand] Called with options: {"option_volume_list"=>[], "option_interface_list"=>[], "option_environment_name"=>"production", "option_id"=>"127"} [ INFO 2017-06-13T10:54:17 API] Server: https://foreman.test.domain/ [ INFO 2017-06-13T10:54:17 API] GET /api/environments [DEBUG 2017-06-13T10:54:17 API] Params: { :search => "name = \"production\"" } [DEBUG 2017-06-13T10:54:17 API] Headers: { :params => { :search => "name = \"production\"" } } [DEBUG 2017-06-13T10:54:17 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [DEBUG 2017-06-13T10:54:17 API] Response: { "total" => 15, "subtotal" => 1, "page" => 1, "per_page" => 20, "search" => "name = \"production\"", "sort" => { "by" => nil, "order" => nil }, "results" => [ [0] { "created_at" => "2017-02-09T12:11:32.486Z", "updated_at" => "2017-02-09T12:11:32.486Z", "name" => "production", "id" => 6 } ] } [DEBUG 2017-06-13T10:54:17 API] Response headers: { :date => "Tue, 13 Jun 2017 08:54:17 GMT", :server => "Apache/2.4.18 (Ubuntu)", :cache_control => "max-age=0, private, must-revalidate", :strict_transport_security => "max-age=631152000; includeSubdomains", :x_permitted_cross_domain_policies => "none", :x_xss_protection => "1; mode=block", :x_request_id => "c729b73e-2d5f-437b-92b3-e4f499052316", :x_download_options => "noopen", :x_runtime => "0.277363", :foreman_version => "1.15.0", :foreman_api_version => "2", :apipie_checksum => "633f8174a4891c4574a5f4afbc4eeb90", :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'", :x_content_type_options => "nosniff", :x_frame_options => "sameorigin", :x_powered_by => "Phusion Passenger 5.0.27", :set_cookie => [ [0] "_session_id=4ac7250b986a3310044c43cd1fe437fe; path=/; secure; HttpOnly" ], :etag => "W/\"de94e7ca42c6d48b06446e83bed9f481-gzip\"", :status => "200 OK", :vary => "Accept-Encoding", :content_encoding => "gzip", :content_length => "184", :connection => "close", :content_type => "application/json; charset=utf-8" } [ INFO 2017-06-13T10:54:17 API] Server: https://foreman.test.domain/ [ INFO 2017-06-13T10:54:17 API] PUT /api/hosts/127 [DEBUG 2017-06-13T10:54:17 API] Params: { "host" => { "environment_id" => 6, "compute_attributes" => { "volumes_attributes" => {} }, "host_parameters_attributes" => {}, "interfaces_attributes" => {} } } [DEBUG 2017-06-13T10:54:17 API] Headers: {} [DEBUG 2017-06-13T10:54:17 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [ERROR 2017-06-13T10:54:18 API] 422 Unprocessable Entity [DEBUG 2017-06-13T10:54:18 API] { "error" => { "id" => 127, "errors" => { "base" => [ [0] "Failed to update a compute vmware (VMware) instance oobtest-gvz-1-test-01.test.test.domain: undefined method `[]' for nil:NilClass" ] }, "full_messages" => [ [0] "Failed to update a compute vmware (VMware) instance oobtest-gvz-1-test-01.test.test.domain: undefined method `[]' for nil:NilClass" ] } } [ERROR 2017-06-13T10:54:18 Exception] Failed to update a compute vmware (VMware) instance oobtest-gvz-1-test-01.test.test.domain: undefined method `[]' for nil:NilClass Could not update the host: Failed to update a compute vmware (VMware) instance oobtest-gvz-1-test-01.test.test.domain: undefined method `[]' for nil:NilClass