Created attachment 1396965 [details] error Description of problem: instance reconfigure failing with error "Error: undefined method `name' for nil:NilClass". I am able to reconfigure or change the Flavor on same instance in previous 5.9.0.20 build.It works fine in 5.9.0.20. Version-Release number of selected component (if applicable): Version 5.9.0.21.20180214154720_6f2109d How reproducible: 100% Steps to Reproduce: 1.Add RHOS provider 2.Reconfigure Instance 3.Go to service->Requests page Actual results: Can't reconfigure instance in rhos provider It show error "Error: undefined method `name' for nil:NilClass" Expected results: No Error Additional info:
Can you provide the logs pls??
Marek can you take a look?
Niyaz can you give us some more information about when this happened? Were you adding/removing a cloud volume? Does this happen for all instances or just one? We really need at least the traceback from the error or better the full logs.
It looks like it is trying to get the name of the VM's cloud_tenant but the cloud_tenant is nil. https://github.com/ManageIQ/manageiq-providers-openstack/blob/gaprindashvili/app/models/manageiq/providers/openstack/cloud_manager/vm/resize.rb#L59 There was an error retrieving the tenants on a targeted refresh done for that reconfigure task: [----] W, [2018-02-16T14:10:32.735010 #50249:92b134] WARN -- : Q-task_id([vm_cloud_reconfigure_task_11]) MIQ(ManageIQ::Providers::Openstack::Inventory::Collector::TargetCollection#safe_call) Not Found response code returned in provider: 10.8.196.59. Message=Expected([200, 204]) <=> Actual(404 Not Found) excon.error.response :body => "{\"error\": {\"message\": \"The resource could not be found.\", \"code\": 404, \"title\": \"Not Found\"}}" :cookies => [ ] :headers => { "Connection" => "close" "Content-Length" => "93" "Content-Type" => "application/json" "Date" => "Fri, 16 Feb 2018 19:10:32 GMT" "Server" => "Apache/2.4.6 (Red Hat Enterprise Linux)" "Vary" => "X-Auth-Token" "x-openstack-request-id" => "req-afd6e37e-b450-4cd8-a65f-e137b1842754" } :host => "10.8.196.59" :local_address => "10.8.196.112" :local_port => 39024 :path => "/v2.0//v3/tenants" :port => 5000 :reason_phrase => "Not Found" :remote_ip => "10.8.196.59" :status => 404 :status_line => "HTTP/1.1 404 Not Found\r\n" The path (/v2.0//v3/tenants) looks incorrect
Gilles: this seems to be connected to the fog-openstack issue https://github.com/fog/fog-openstack/issues/361 If we are not able to refresh the tenants, then it fails later in the code calling vm.cloud_tenant.name
Niyaz I see the same reconfiguration errors on both your 5.9.0.20 and 5.9.0.21 appliances so this isn't a regression between those two versions.
Hm, so only targeted refresh is not able to get the tenant in full refresh we call https://github.com/aufi/manageiq-providers-openstack/blob/34de6c3b00023c1a725ffcf34a6dd87e84f45a91/lib/manageiq/providers/openstack/legacy/openstack_handle/identity_delegate.rb#L25 in targeted we call https://github.com/aufi/manageiq-providers-openstack/blob/34de6c3b00023c1a725ffcf34a6dd87e84f45a91/lib/manageiq/providers/openstack/legacy/openstack_handle/identity_delegate.rb#L150 brought by https://github.com/ManageIQ/manageiq-providers-openstack/pull/213
Thanks Adam for the PR #232! VCRs were reloaded in #233 #232 https://github.com/ManageIQ/manageiq-providers-openstack/pull/232 #233 https://github.com/ManageIQ/manageiq-providers-openstack/pull/233
Removing needinfo flag since this has been addressed in comment#233
Verified on 5.10.0.2