Bug 1460683 - OpenStack cloud provider refresh error: Flavor <flavor id> could not be found
OpenStack cloud provider refresh error: Flavor <flavor id> could not be found
Status: VERIFIED
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.7.0
Unspecified Unspecified
high Severity high
: GA
: 5.9.0
Assigned To: Sam Lucidi
Ola Pavlenko
openstack
: TestOnly, ZStream
: 1455947 (view as bug list)
Depends On:
Blocks: 1480288 1476279 1479978
  Show dependency treegraph
 
Reported: 2017-06-12 08:03 EDT by Deepak
Modified: 2018-02-15 09:17 EST (History)
13 users (show)

See Also:
Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1476279 1479978 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: Bug
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack


Attachments (Terms of Use)

  None (edit)
Description Deepak 2017-06-12 08:03:58 EDT
Description of problem:

I am getting below error on OpenStack cloud provider refresh: 
evm.log

[----] E, [2017-06-07T17:35:37.267687 #12225:7d913c] ERROR -- : <Fog> excon.error     #<Excon::Error::NotFound: Expected([200, 203]) <=> Actual(404 Not Found)
excon.error.response
  :body          => "{\"itemNotFound\": {\"message\": \"Flavor 96f1a662-b440-4b60-bf94-ffab1d83a649 could not be found.\", \"code\": 404}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"               => "109"
    "Content-Type"                 => "application/json; charset=UTF-8"
    "Date"                         => "Wed, 07 Jun 2017 12:03:32 GMT"
    "Vary"                         => "X-OpenStack-Nova-API-Version"
    "X-Compute-Request-Id"         => "req-d6f696da-f27e-45f8-a112-9dc39cc006bc"
    "X-Openstack-Nova-Api-Version" => "2.1"
  }
  :host          => "xxx.xxx.rdu2.cee.redhat.com"
  :local_address => "xx.xx.xx.xxx"
  :local_port    => 38552
  :path          => "/v2.1/f3262680df7349c988459a950c18a1d0/flavors/96f1a662-b440-4b60-bf94-ffab1d83a649/os-flavor-access.json"
  :port          => 13774
  :reason_phrase => "Not Found"
  :remote_ip     => "xx.xx.xx.xxx"
  :status        => 404
  :status_line   => "HTTP/1.1 404 Not Found\r\n"
>

[----] E, [2017-06-07T17:35:37.267918 #12225:7d913c] ERROR -- : MIQ(ManageIQ::Providers::Openstack::CloudManager::Refresher#refresh) EMS: [RDU2-OSP9-PROD], id: [99000000000058] Refresh failed
[----] E, [2017-06-07T17:35:37.268039 #12225:7d913c] ERROR -- : [Fog::Compute::OpenStack::NotFound]: Expected([200, 203]) <=> Actual(404 Not Found)
excon.error.response
  :body          => "{\"itemNotFound\": {\"message\": \"Flavor 96f1a662-b440-4b60-bf94-ffab1d83a649 could not be found.\", \"code\": 404}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"               => "109"
    "Content-Type"                 => "application/json; charset=UTF-8"
    "Date"                         => "Wed, 07 Jun 2017 12:03:32 GMT"
    "Vary"                         => "X-OpenStack-Nova-API-Version"
    "X-Compute-Request-Id"         => "req-d6f696da-f27e-45f8-a112-9dc39cc006bc"
    "X-Openstack-Nova-Api-Version" => "2.1"
  }
  :host          => "xxx.xxx.rdu2.cee.redhat.com"
  :local_address => "xx.xx.xx.xxx"
  :local_port    => 38552
  :path          => "/v2.1/f3262680df7349c988459a950c18a1d0/flavors/96f1a662-b440-4b60-bf94-ffab1d83a649/os-flavor-access.json"
  :port          => 13774
  :reason_phrase => "Not Found"
  :remote_ip     => "xx.xx.xx.xxx"
  :status        => 404
  :status_line   => "HTTP/1.1 404 Not Found\r\n"
  Method:[rescue in block in refresh]
[----] E, [2017-06-07T17:35:37.268098 #12225:7d913c] ERROR -- : /opt/rh/cfme-gemset/gems/excon-0.54.0/lib/excon/middlewares/expects.rb:7:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.54.0/lib/excon/middlewares/response_parser.rb:9:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.54.0/lib/excon/connection.rb:388:in `response'

this looks because of deleted flavor on OpenStack and cfme is still trying to fatch data for that


Version-Release number of selected component (if applicable):

I have been tested this on latest appliance-5.8.0.17-1.el7cf.x86_64

How reproducible:

Steps to Reproduce:
1.Delete flavor from osp
2.Add osp in CFME 
3.During the cloud refresh, you will get above error.

Actual results:
Refresh fail

Expected results:
refresh successful

Additional info:
We have checked from OpenStack database the deleted flavor is not there and set to non-zero value.
 
Also discuss this issue on upstream but still no luck.
https://github.com/ManageIQ/manageiq/issues/12440
Comment 3 Dave Johnson 2017-07-13 23:00:42 EDT
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set it to Low/Low.
Comment 4 Deepak 2017-07-14 04:19:25 EDT
this is the blocker for us, due to the issue we couldn't get utilization of specific OpenStack setup.
Comment 5 Dave Johnson 2017-07-14 09:14:00 EDT
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set it to Low/Low.
Comment 6 Deepak 2017-07-18 06:13:26 EDT
this is the blocker for us, due to the issue we couldn't get utilization of specific OpenStack setup.
Comment 7 Sam Lucidi 2017-07-21 17:59:47 EDT
I have not been able to personally reproduce the circumstances of the reported bug, but I've put together a PR to fix the incorrect code that I believe is responsible for the problem. https://github.com/ManageIQ/manageiq-providers-openstack/pull/69
Comment 9 Tzu-Mainn Chen 2017-07-31 10:13:15 EDT
*** Bug 1455947 has been marked as a duplicate of this bug. ***
Comment 12 Reartes Guillermo 2018-02-15 09:17:27 EST
On, cfme-5.7.3.2-1

I do get:

[----] E, [2018-02-15T10:48:04.783364 #7448:b5912c] ERROR -- : <Fog> excon.error     #<Excon::Error::NotFound: Expected([200, 203]) <=> Actual(404 Not Found)
excon.error.response
  :body          => "{\"itemNotFound\": {\"message\": \"Flavor 8ca626dc-41da-40d7-a702-a4faca75c36d could not be found.\", \"code\": 404}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"               => "109"
    "Content-Type"                 => "application/json; charset=UTF-8"
    "Date"                         => "Thu, 15 Feb 2018 13:46:15 GMT"
    "Openstack-Api-Version"        => "compute 2.1"
    "Vary"                         => "OpenStack-API-Version, X-OpenStack-Nova-API-Version"
    "X-Compute-Request-Id"         => "req-c723a70c-628a-4872-a5e3-8fd26bcccd88"
    "X-Openstack-Nova-Api-Version" => "2.1"
  }
  :host          => "overcloud.XXXX.XX.XXXX"
  :local_address => "XXX.XXX.XXX.XXX"
  :local_port    => 51096
  :path          => "/v2.1/flavors/8ca626dc-41da-40d7-a702-a4faca75c36d.json"
  :port          => 13774
  :reason_phrase => "Not Found"
  :remote_ip     => "XXX.XXX.XXX.XXX"
  :status        => 404
  :status_line   => "HTTP/1.1 404 Not Found\r\n"
>

The flavors were indeed deleted from OSP.

I found this because i am geting a pratial or empty flavor list for some images when creating or modifying the catalog items.
At this point i am not sure if that the missing flavor would cause my issue.

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