Bug 1217916 - Refresh Power States Fails for OpenStack - No Cinder
Summary: Refresh Power States Fails for OpenStack - No Cinder
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.5.0
Assignee: Greg Blomquist
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On:
Blocks: 1258839
TreeView+ depends on / blocked
 
Reported: 2015-05-02 21:49 UTC by Ken Evensen
Modified: 2015-12-08 13:07 UTC (History)
6 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1258839 (view as bug list)
Environment:
Last Closed: 2015-12-08 13:07:03 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Ken Evensen 2015-05-02 21:49:52 UTC
Description of problem: In an environment with an OpenStack provider, if Cinder is not installed, refreshing the power states and relationships for the provider fails.


Version-Release number of selected component (if applicable): cfme-rhos-5.3-69.x86_64.qcow2 and previous


How reproducible: very


Steps to Reproduce:
1. Add an OpenStack provider
2. Navigate to Clouds --> Provider
3. Click check box next to desired provider
4. Configuration --> Refresh Relationships and Power States

Actual results:
1. Through the web ui, nothing appears to happen

Expected results:
1. The provider is populated with expected info (instances, flavors, etc.)

Additional info:  Here is the relevant section from my evm.log.

[----] E, [2015-05-02T21:15:53.685516 #2634:90f808] ERROR -- : MIQ(MiqQueue.deliver)    Message id: [10000000000217], Error: [undefined method `volumes_for_accessible_tenants' for #<OpenstackHandle::ComputeDelegate:0x000000066087d0>]
[----] E, [2015-05-02T21:15:53.825724 #2634:90f808] ERROR -- : [NoMethodError]: undefined method `volumes_for_accessible_tenants' for #<OpenstackHandle::ComputeDelega
te:0x000000066087d0>  Method:[rescue in deliver]
[----] E, [2015-05-02T21:15:53.825801 #2634:90f808] ERROR -- : /var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:89:in `volumes'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:104:in `get_availability_zones'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:39:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack.rb:11:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/openstack_refresher.rb:18:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/openstack_refresher.rb:7:in `each'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/openstack_refresher.rb:7:in `refresh'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/base_refresher.rb:8:in `refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:76:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:75:in `each'
/var/www/miq/vmdb/app/models/ems_refresh.rb:75:in `refresh'
/var/www/miq/vmdb/app/models/miq_queue.rb:361:in `block in deliver'
/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:357:in `deliver'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work'
/var/www/miq/vmdb/lib/workers/worker_base.rb:317:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:135:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:123:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:5:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `eval'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

Comment 3 Greg Blomquist 2015-05-05 19:13:19 UTC
Looking at the stack trace, this one is a bit sneakier than I first thought.  We attempt to read the availability zones assigned to each instance and each volume when getting the list of availability zones.

We already have a check in place to ignore volumes if the Cinder service isn't running, but we missed this check when looking for availability zones.

This is a quick fix.

Comment 4 Greg Blomquist 2015-05-05 19:26:24 UTC
https://github.com/ManageIQ/manageiq/pull/2845

Comment 6 CFME Bot 2015-08-05 01:11:36 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2284d185f41ecd3cc00e1e675d9c2e33c546817a

commit 2284d185f41ecd3cc00e1e675d9c2e33c546817a
Author:     Greg Blomquist <gblomqui>
AuthorDate: Tue May 5 15:13:29 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Sun Jul 19 22:14:01 2015 -0400

    Do not get volumes when cinder isn't available
    
    The openstack inventory parser already has logic in place to avoid getting
    volumes from Cinder if the cinder service is not running.  However, this check
    if bypassed when trying to get the list of Availability Zones.
    
    When the openstack inventory parser tries to get the list of Availability Zones,
    it checks what Availability Zones are assigned to instances as well as which are
    assigned to volumes.  This check for Availability Zones assigned to volumes does
    not take into account the fact that cinder might not be running.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1217916

 app/models/ems_refresh/parsers/openstack.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 7 CFME Bot 2015-09-28 19:08:19 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=c90c96fdc0418edf99cca6dd7772cfacbbac6050

commit c90c96fdc0418edf99cca6dd7772cfacbbac6050
Author:     Greg Blomquist <gblomqui>
AuthorDate: Mon Aug 31 18:04:13 2015 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Tue Sep 1 10:08:57 2015 -0400

    Do not get volumes when cinder isn't available
    
    The openstack inventory parser already has logic in place to avoid getting
    volumes from Cinder if the cinder service is not running.  However, this check
    if bypassed when trying to get the list of Availability Zones.
    
    When the openstack inventory parser tries to get the list of Availability Zones,
    it checks what Availability Zones are assigned to instances as well as which are
    assigned to volumes.  This check for Availability Zones assigned to volumes does
    not take into account the fact that cinder might not be running.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1258839
    https://bugzilla.redhat.com/show_bug.cgi?id=1217916

 vmdb/app/models/ems_refresh/parsers/openstack.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 8 CFME Bot 2015-09-28 19:08:49 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=545aba438035f14f739608af953d744a344485b0

commit 545aba438035f14f739608af953d744a344485b0
Merge: da6ae33 c90c96f
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Sep 28 15:07:16 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Sep 28 15:07:16 2015 -0400

    Merge branch 'bz1258839-refresh-fails-with-no-cinder' into '5.4.z'
    
    Do not get volumes when cinder isn't available
    
    The openstack inventory parser already has logic in place to avoid getting volumes from Cinder if the cinder service is not running.  However, this check if bypassed when trying to get the list of Availability Zones.
    
    When the openstack inventory parser tries to get the list of Availability Zones, it checks what Availability Zones are assigned to instances as well as which are assigned to volumes.  This check for Availability Zones assigned to volumes does not take into account the fact that cinder might not be running.
    
    Upstream: https://github.com/ManageIQ/manageiq/pull/2845
    
    Backport notes: this code was re-rooted and namespaced ... I just manually applied the changes because the changes were so trivial
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1258839
    https://bugzilla.redhat.com/show_bug.cgi?id=1217916
    
    See merge request !241

 vmdb/app/models/ems_refresh/parsers/openstack.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 9 Nandini Chandra 2015-11-11 03:59:50 UTC
Verified in 5.5.0.9

Comment 11 errata-xmlrpc 2015-12-08 13:07:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


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