Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openstack - Flavor <flavor id> could not be found #12440

Closed
cankarm opened this issue Nov 4, 2016 · 25 comments
Closed

Openstack - Flavor <flavor id> could not be found #12440

cankarm opened this issue Nov 4, 2016 · 25 comments
Assignees
Labels

Comments

@cankarm
Copy link

cankarm commented Nov 4, 2016

Problem: Refresh Provider does not work after the flavor in Openstack is removed/changed.

The appliance release affected: http://releases.manageiq.org/manageiq-openstack-euwe-1-rc1.qc2

Description: If you change the flavour in Openstack (i.e. accessibility,etc), the ID of the flavor changes. ManageIQ is still expecting to find the old non-existant flavor. Here is the error code from ems.log:

 [----] E, [2016-11-04T15:57:49.939212 #7736:73913c] ERROR -- : <Fog> excon.error     #<Excon::Error::NotFound: Expected([200, 203]) <=> Actual(404 Not Found)
excon.error.response
  :body          => "{\"itemNotFound\": {\"message\": \"Flavor 7d8afb11-5815-4ee0-9df7-4d63a9d8dc88 could not be found.\", \"code\": 404}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"               => "109"
    "Content-Type"                 => "application/json; charset=UTF-8"
    "Date"                         => "Fri, 04 Nov 2016 14:57:49 GMT"
    "Vary"                         => "X-OpenStack-Nova-API-Version"
    "X-Compute-Request-Id"         => "req-480dbd51-482d-48ef-96a7-a167158caddc"
    "X-Openstack-Nova-Api-Version" => "2.1"
  }
  :host          => "10.30.1.9"
  :local_address => "10.32.5.3"
  :local_port    => 46902
  :path          => "/v2.1/48f04d6b0ee14115b8c457bcd3da47e4/flavors/7d8afb11-5815-4ee0-9df7-4d63a9d8dc88/os-flavor-access.json"
  :port          => 8774
  :reason_phrase => "Not Found"
  :remote_ip     => "10.30.1.9"
  :status        => 404
  :status_line   => "HTTP/1.1 404 Not Found\r\n"
>

[----] E, [2016-11-04T15:57:49.939454 #7736:73913c] ERROR -- : MIQ(ManageIQ::Providers::Openstack::CloudManager::Refresher#refresh) EMS: [My Cloud], id: [3] Refresh failed
[----] E, [2016-11-04T15:57:49.939594 #7736:73913c] ERROR -- : [Fog::Compute::OpenStack::NotFound]: Expected([200, 203]) <=> Actual(404 Not Found)
excon.error.response
  :body          => "{\"itemNotFound\": {\"message\": \"Flavor 7d8afb11-5815-4ee0-9df7-4d63a9d8dc88 could not be found.\", \"code\": 404}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"               => "109"
    "Content-Type"                 => "application/json; charset=UTF-8"
    "Date"                         => "Fri, 04 Nov 2016 14:57:49 GMT"
    "Vary"                         => "X-OpenStack-Nova-API-Version"
    "X-Compute-Request-Id"         => "req-480dbd51-482d-48ef-96a7-a167158caddc"
    "X-Openstack-Nova-Api-Version" => "2.1"
  }
  :host          => "10.30.1.9"
  :local_address => "10.32.5.3"
  :local_port    => 46902
  :path          => "/v2.1/48f04d6b0ee14115b8c457bcd3da47e4/flavors/7d8afb11-5815-4ee0-9df7-4d63a9d8dc88/os-flavor-access.json"
  :port          => 8774
  :reason_phrase => "Not Found"
  :remote_ip     => "10.30.1.9"
  :status        => 404
  :status_line   => "HTTP/1.1 404 Not Found\r\n"
  Method:[rescue in block in refresh]
[----] E, [2016-11-04T15:57:49.939710 #7736:73913c] ERROR -- : /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/middlewares/expects.rb:7:in `response_call'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/middlewares/response_parser.rb:9:in `response_call'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/connection.rb:388:in `response'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/excon-0.54.0/lib/excon/connection.rb:252:in `request'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/fog-core-1.43.0/lib/fog/core/connection.rb:81:in `request'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/fog-openstack-0.1.15/lib/fog/openstack/core.rb:81:in `request'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/fog-openstack-0.1.15/lib/fog/compute/openstack/requests/list_tenants_with_flavor_access.rb:6:in `list_tenants_with_flavor_access'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/delegate.rb:83:in `method_missing'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/flavors.rb:48:in `block in flavor_tenants'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:24:in `safe_call'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:45:in `safe_list'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/flavors.rb:48:in `flavor_tenants'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/flavors.rb:35:in `parse_flavor'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/flavors.rb:11:in `block in get_private_flavor'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:15:in `process_collection_item'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `block (2 levels) in process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:24:in `safe_call'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `block in process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `each'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/flavors.rb:11:in `get_private_flavor'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/refresh_parser.rb:292:in `parse_server'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/refresh_parser.rb:148:in `block in get_servers'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:15:in `process_collection_item'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `block (2 levels) in process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:24:in `safe_call'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `block in process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `each'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/refresh_parser_common/helper_methods.rb:9:in `process_collection'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/refresh_parser.rb:148:in `get_servers'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/refresh_parser.rb:69:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/refresh_parser.rb:13:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/refresher.rb:6:in `parse_legacy_inventory'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:122:in `block in parse_targeted_inventory'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:122:in `parse_targeted_inventory'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:87:in `block in refresh_targets_for_ems'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:86:in `refresh_targets_for_ems'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:24:in `block (2 levels) in refresh'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:24:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:14:in `each'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:14:in `refresh'
/var/www/miq/vmdb/app/models/manageiq/providers/base_manager/refresher.rb:10:in `refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:91:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:90:in `each'
/var/www/miq/vmdb/app/models/ems_refresh.rb:90:in `refresh'
/var/www/miq/vmdb/app/models/miq_queue.rb:347:in `block in deliver'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:33:in `catch'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:33:in `catch'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:106:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:343:in `deliver'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:106:in `deliver_queue_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:134:in `deliver_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:152:in `block in do_work'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `loop'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `do_work'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:334:in `block in do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:153:in `run'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:128:in `start'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:21:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:343:in `block in start'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/var/www/miq/vmdb/app/models/miq_worker.rb:341:in `start'
/var/www/miq/vmdb/app/models/miq_worker.rb:270:in `start_worker'
/var/www/miq/vmdb/app/models/mixins/per_ems_worker_mixin.rb:68:in `start_worker_for_ems'
/var/www/miq/vmdb/app/models/mixins/per_ems_worker_mixin.rb:46:in `block in sync_workers'
/var/www/miq/vmdb/app/models/mixins/per_ems_worker_mixin.rb:45:in `each'
/var/www/miq/vmdb/app/models/mixins/per_ems_worker_mixin.rb:45:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:52:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `each'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:22:in `monitor_workers'
/var/www/miq/vmdb/app/models/miq_server.rb:345:in `block in monitor'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/app/models/miq_server.rb:345:in `monitor'
/var/www/miq/vmdb/app/models/miq_server.rb:367:in `block (2 levels) in monitor_loop'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/app/models/miq_server.rb:367:in `block in monitor_loop'
/var/www/miq/vmdb/app/models/miq_server.rb:366:in `loop'
/var/www/miq/vmdb/app/models/miq_server.rb:366:in `monitor_loop'
/var/www/miq/vmdb/app/models/miq_server.rb:249:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:65:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:92:in `start'
/var/www/miq/vmdb/lib/workers/bin/evm_server.rb:4:in `<main>'
[----] E, [2016-11-04T15:57:49.939792 #7736:73913c] ERROR -- : MIQ(ManageIQ::Providers::Openstack::CloudManager::Refresher#refresh) EMS: [My Cloud], id: [3] Unable to perform refresh for the following targets:
[----] E, [2016-11-04T15:57:49.939900 #7736:73913c] ERROR -- : MIQ(ManageIQ::Providers::Openstack::CloudManager::Refresher#refresh)  --- ManageIQ::Providers::Openstack::CloudManager [My Cloud] id [3]
[----] I, [2016-11-04T15:57:49.987472 #7736:73913c]  INFO -- : MIQ(ManageIQ::Providers::Openstack::CloudManager::Refresher#refresh) Refreshing all targets...Complete
[----] E, [2016-11-04T15:57
@deepakhajare
Copy link

I am also having save issue, Could any one please help

@tzumainn
Copy link
Contributor

This should be fixed as of: ManageIQ/manageiq-providers-openstack#1 - are you using the latest code?

@deepakhajare
Copy link

Hello tzumainn,
As per your suggestion, I have done changes on CFME version {cfme-appliance-5.7.0.17-1.el7cf.x86_64} environments and found issue still persist.

later that I tried with cloudform4.5 (cfme-appliance-5.8.0.17-1.el7cf.x86_64) and there the newly recommended changed already persist.
After the validation successful, in last fresh section getting
"Error - 4 Minutes Ago
Expected([200, 203]) <=> Actual(404 Not Found) excon.error.response :body => "{"itemNotFound": {"messag..."

evm.log
[----] I, [2017-06-06T18:15:23.499386 #14291:f1a20c] INFO -- : Querying OpenStack for events newer than ...
[----] E, [2017-06-06T18:15:24.487990 #14194:da3130] ERROR -- : 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" => "Tue, 06 Jun 2017 12:45:24 GMT"
"Vary" => "X-OpenStack-Nova-API-Version"
"X-Compute-Request-Id" => "req-18d0f720-4fec-46f1-8b42-edf2fa82d25d"
"X-Openstack-Nova-Api-Version" => "2.1"
}
:host => "control.stack.rdu2.cee.redhat.com"
:local_address => "10.65.177.134"
:local_port => 45758
:path => "/v2.1/f3262680df7349c988459a950c18a1d0/flavors/96f1a662-b440-4b60-bf94-ffab1d83a649/os-flavor-access.json"
:port => 13774
:reason_phrase => "Not Found"
:remote_ip => "10.10.84.2"
:status => 404
:status_line => "HTTP/1.1 404 Not Found\r\n"

[----] E, [2017-06-06T18:15:24.489266 #14194:da3130] ERROR -- : MIQ(ManageIQ::Providers::Openstack::CloudManager::Refresher#refresh) EMS: [RDU2], id: [58000000000007] Refresh failed
[----] E, [2017-06-06T18:15:24.489808 #14194:da3130] 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" => "Tue, 06 Jun 2017 12:45:24 GMT"
"Vary" => "X-OpenStack-Nova-API-Version"
"X-Compute-Request-Id" => "req-18d0f720-4fec-46f1-8b42-edf2fa82d25d"
"X-Openstack-Nova-Api-Version" => "2.1"
}
:host => "control.stack.rdu2.cee.redhat.com"
:local_address => "10.65.177.134"
:local_port => 45758
:path => "/v2.1/f3262680df7349c988459a950c18a1d0/flavors/96f1a662-b440-4b60-bf94-ffab1d83a649/os-flavor-access.json"
:port => 13774
:reason_phrase => "Not Found"
:remote_ip => "10.10.84.2"
:status => 404
:status_line => "HTTP/1.1 404 Not Found\r\n"
Method:[rescue in block in refresh]
[----] E, [2017-06-06T18:15:24.490091 #14194:da3130] ERROR -- : /opt/rh/cfme-gemset/gems/excon-0.55.0/lib/excon/middlewares/expects.rb:7:in response_call' /opt/rh/cfme-gemset/gems/excon-0.55.0/lib/excon/middlewares/response_parser.rb:9:in response_call'
/opt/rh/cfme-gemset/gems/excon-0.55.0/lib/excon/connection.rb:388:in response' /opt/rh/cfme-gemset/gems/excon-0.55.0/lib/excon/connection.rb:252:in request'
/opt/rh/cfme-gemset/gems/fog-core-1.44.3/lib/fog/core/connection.rb:81:in `request'

Note: the flavor is not there and not attched to any instaces.

Your help really appraciate

@tzumainn
Copy link
Contributor

tzumainn commented Jun 6, 2017

That's really odd! The failure happens when trying to reach this URL:

/v2.1/f3262680df7349c988459a950c18a1d0/flavors/96f1a662-b440-4b60-bf94-ffab1d83a649/os-flavor-access.json

Which looks like it's looking for something flavor-related in relation to a cloud object with ID f3262680df7349c988459a950c18a1d0

Is there a way to identify what f3262680df7349c988459a950c18a1d0 might be - looking through instance lists, project lists, etc?

@psachin
Copy link

psachin commented Jun 6, 2017

@tzumainn

We have admin project with id f3262680df7349c988459a950c18a1d0, it has (deleted)flavor with id 96f1a662-b440-4b60-bf94-ffab1d83a649

MariaDB [keystone]> select name,enabled,id, domain_id,is_domain,description from project where id='f3262680df7349c988459a950c18a1d0';
+-------+---------+----------------------------------+-----------+-----------+--------------+
| name  | enabled | id                               | domain_id | is_domain | description  |
+-------+---------+----------------------------------+-----------+-----------+--------------+
| admin |       1 | f3262680df7349c988459a950c18a1d0 | default   |         0 | admin tenant |
+-------+---------+----------------------------------+-----------+-----------+--------------+
1 row in set (0.00 sec)


MariaDB [nova]> select name,deleted,flavorid from instance_types where flavorid='96f1a662-b440-4b60-bf94-ffab1d83a649';
+-------------------+---------+--------------------------------------+
| name              | deleted | flavorid                             |
+-------------------+---------+--------------------------------------+
| ocp.node |     439 | 96f1a662-b440-4b60-bf94-ffab1d83a649 |
+-------------------+---------+--------------------------------------+
1 row in set (0.00 sec)

@psachin
Copy link

psachin commented Jun 6, 2017

@deepakhajare ^^

@tzumainn
Copy link
Contributor

tzumainn commented Jun 6, 2017

Ah - in retrospect I should have looked at the stack trace a bit more carefully, as it points to the line with the exact issue:

https://github.com/ManageIQ/manageiq-providers-openstack/blame/master/app/models/manageiq/providers/openstack/refresh_parser_common/flavors.rb#L48

Short-term fix would probably be to delete the flavor from the ManageIQ database; that should get things working right away. We'll work on a permanent bug fix.

@tzumainn
Copy link
Contributor

tzumainn commented Jun 6, 2017

@psachin Sorry, one more question - can you check if a flavor with that ID exists in the database?

@deepakhajare
Copy link

deepakhajare commented Jun 6, 2017

@tzumainn flavor with id not present in the database, its shows deleted.

MariaDB [nova]> select name,deleted,flavorid,name,deleted_at,updated_at,created_at from instance_types where flavorid='96f1a662-b440-4b60-bf94-ffab1d83a649';
+-------------------+---------+--------------------------------------+-------------------+---------------------+---------------------+---------------------+
| name | deleted | flavorid | name | deleted_at | updated_at | created_at |
+-------------------+---------+--------------------------------------+-------------------+---------------------+---------------------+---------------------+
| quicklab.ocp.node | 439 | 96f1a662-b440-4b60-bf94-ffab1d83a649 | ocp.node | 2017-05-01 14:01:56 | 2017-05-01 14:01:56 | 2017-04-27 15:49:01 |
+-------------------+---------+--------------------------------------+-------------------+---------------------+---------------------+---------------------+
1 row in set (0.01 sec)

MariaDB [nova]>

Is the bug/RFE opened for same or do you want me to open new RFE?

@tzumainn
Copy link
Contributor

tzumainn commented Jun 6, 2017

Ah, I see. So technically the flavor is present (and the right sort of OpenStack API call can return it); but it's essentially not-present for any tenant, leading to this error.

The solution would probably be to filter out flavors wit the deleted flag.

Could you open up a bug report for this?

@mansam
Copy link
Contributor

mansam commented Jun 6, 2017

I've not been able to reproduce this error on Euwe, Fine, or the latest master. Any other information you can provide about your environment to help me reproduce the problem would be a great help.

@deepakhajare
Copy link

@mansam
can you please point me to specific information which you are looking for?

In my case, OpenStack refresh failed in initial refresh cycle with the above-mentioned image. As I said that flavor was deleted from osp and also not available in db.

Note: there are many flavors deleted from osp but having issue with some only like id 96f1a662-b440-4b60-bf94-ffab1d83a649

cfme-flavor

@shaneboulden
Copy link
Contributor

Hey guys, I'm seeing the same issue for Euwe-1.

I've hit the "Flavour could not be found" with a 404, which is breaking the OSP provider refresh (Keystone v3, with domains). I created a flavour, provisioned an instance from the flavour, and deleted the flavour.

I also deleted the flavour from the ManageIQ DB, and still seeing the error.

Any ideas?

@psachin
Copy link

psachin commented Jun 7, 2017

@tzumainn

Sorry, one more question - can you check if a flavor with that ID exists in the database?

flavor96f1a662-b440-4b60-bf94-ffab1d83a649 is deleted with deletion flag 439. As you see table 'instance_types' also keep track of deleted flavors.

The solution would probably be to filter out flavors wit the deleted flag.

My initial guess was deletion flag was boolean. But I agree, any flavor which is marked with non-zero is deleted flavor.

@mansam
Copy link
Contributor

mansam commented Jun 7, 2017

@deepakhajare Did I understand correctly from your above post that you had the problem even with cfme-appliance-5.8.0.17-1.el7cf.x86_64?

@deepakhajare
Copy link

deepakhajare commented Jun 7, 2017 via email

@mansam
Copy link
Contributor

mansam commented Jun 7, 2017

When you tried with appliance-5.8.0.17-1.el7cf.x86_64, was it a fresh database?

@psachin
Copy link

psachin commented Jun 8, 2017

@mansam

I work with @deepakhajare. Yes it was fresh database.

@tzumainn
Copy link
Contributor

tzumainn commented Jun 8, 2017

We're having difficulties reproducing this error in our environments. Would it be possible to try a direct change to the code in your environment? Specifically, to catch an error on this line:

https://github.com/ManageIQ/manageiq-providers-openstack/blob/master/app/models/manageiq/providers/openstack/refresh_parser_common/flavors.rb#L48

And just return [] if there's an error?

@mansam
Copy link
Contributor

mansam commented Jun 8, 2017

I'd just add that you will also want to include L49 in the same rescue block you use to catch the error on L48 while testing this.

@vivobg
Copy link

vivobg commented Jul 17, 2017

Replacing lines 48-49 with

begin
    unparsed_tenants = safe_list { @connection.list_tenants_with_flavor_access(flavor.id) }
    flavor_access = unparsed_tenants.data[:body]["flavor_access"]
rescue
    return []
end

worked for me.

@mansam
Copy link
Contributor

mansam commented Jul 18, 2017

Thanks for the feedback, @vivobg. Hi @deepakhajare and
psachin, did you have any luck with that work around?

@psachin
Copy link

psachin commented Jul 19, 2017

@mansam nope.

As @vivobg confirmed that the workaround worked for him, should be have a RH BZ open?

@miq-bot miq-bot added the stale label Jan 29, 2018
@JPrause
Copy link
Member

JPrause commented Jan 23, 2019

@cankarm is this still a valid issue. If not can you close.
If there's no update by next week, I'll be closing this issue.

@cankarm
Copy link
Author

cankarm commented Jan 23, 2019

I haven't tried this for along time. I'm closing. Thanks for noticing @JPrause .

@cankarm cankarm closed this as completed Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants