Bug 1546109 - RHOS- "Error: undefined method `name' for nil:NilClass" on service->Requests page when reconfiguring instance
Summary: RHOS- "Error: undefined method `name' for nil:NilClass" on service->Requests...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Marek Aufart
QA Contact: Niyaz Akhtar Ansari
URL:
Whiteboard:
Depends On:
Blocks: 1531304 1547511
TreeView+ depends on / blocked
 
Reported: 2018-02-16 10:47 UTC by Niyaz Akhtar Ansari
Modified: 2019-02-11 14:00 UTC (History)
10 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1547511 (view as bug list)
Environment:
Last Closed: 2019-02-11 14:00:57 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
error (76.07 KB, image/png)
2018-02-16 10:47 UTC, Niyaz Akhtar Ansari
no flags Details

Description Niyaz Akhtar Ansari 2018-02-16 10:47:18 UTC
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:

Comment 2 Sudhir Mallamprabhakara 2018-02-16 14:35:47 UTC
Can you provide the logs pls??

Comment 4 Adam Grare 2018-02-16 14:44:14 UTC
Marek can you take a look?

Comment 5 Adam Grare 2018-02-16 16:30:07 UTC
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.

Comment 8 Adam Grare 2018-02-16 19:59:40 UTC
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

Comment 9 Ladislav Smola 2018-02-16 20:05:03 UTC
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

Comment 10 Adam Grare 2018-02-16 20:10:44 UTC
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.

Comment 12 Marek Aufart 2018-02-19 12:52:54 UTC
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

Comment 15 Gilles Dubreuil 2018-06-20 05:46:21 UTC
Removing needinfo flag since this has been addressed in comment#233

Comment 16 Jad Haj Yahya 2018-07-02 12:44:20 UTC
Verified on 5.10.0.2


Note You need to log in before you can comment on or make changes to this bug.