DRAC get_bios_config() vendor passthru causes AttributeError exception

Bug #1637671 reported by Richard G. Pioso
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Richard G. Pioso
Ubuntu Cloud Archive
Fix Released
Undecided
Unassigned
Newton
Triaged
Medium
Unassigned
ironic (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Seen in stable/newton.

The DRAC driver's (pxe_drac) get_bios_config() vendor passthru method raises an AttributeError exception. It no longer returns the current BIOS configuration. This is a regression from stable/mitaka.

Triage found that get_bios_config() mistakenly treats the value returned by python-dracclient's list_bios_settings() as containing named tuples. When it calls the namedtuple _asdict() method, an AttributeError exception is raised.

It shows up in the ironic-conductor.log as:

2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base [req-45370baa-7511-4901-9784-da5a90af4f8b - - - - -] vendor_passthru failed with method get_bios_config
2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base Traceback (most recent call last):
2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base File "/usr/lib/python2.7/site-packages/ironic/drivers/base.py", line 692, in passthru_handler
2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base return func(*args, **kwargs)
2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base File "/usr/lib/python2.7/site-packages/ironic/drivers/modules/drac/vendor_passthru.py", line 61, in get_bios_config
2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base bios_attrs[name] = bios_attr._asdict()
2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base AttributeError: 'BIOSStringAttribute' object has no attribute '_asdict'
2016-10-27 16:04:13.147 1573 ERROR ironic.drivers.base
2016-10-27 16:04:13.153 1573 DEBUG ironic.conductor.task_manager [req-45370baa-7511-4901-9784-da5a90af4f8b - - - - -] Successfully released exclusive lock for calling vendor passthru on node c54ad36d-5e2e-4593-9033-9996621803bb (lock was held 8.09 sec) release_resources /usr/lib/python2.7/site-packages/ironic/conductor/task_manager.py:331
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server [req-45370baa-7511-4901-9784-da5a90af4f8b - - - - -] Exception during message handling
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 150, in dispatch
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 121, in _do_dispatch
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/ironic_lib/metrics.py", line 61, in wrapped
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server result = f(*args, **kwargs)
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 199, in inner
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server return func(*args, **kwargs)
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/ironic/conductor/manager.py", line 271, in vendor_passthru
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server ret = vendor_func(task, **info)
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/ironic/drivers/base.py", line 699, in passthru_handler
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server raise exception.VendorPassthruException(message=e)
2016-10-27 16:04:13.153 1573 ERROR oslo_messaging.rpc.server VendorPassthruException: 'BIOSStringAttribute' object has no attribute '_asdict'

Changed in ironic:
status: New → In Progress
assignee: nobody → Richard G. Pioso (richard.pioso)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/391571

Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → Medium
tags: added: drac
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/391571
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=6d6cf18f3171f42af1567c65240a7a6a759377c2
Submitter: Jenkins
Branch: master

commit 6d6cf18f3171f42af1567c65240a7a6a759377c2
Author: Richard Pioso <email address hidden>
Date: Fri Oct 28 20:11:18 2016 -0400

    DRAC get_bios_config() passthru causes exception

    The DRAC driver's (pxe_drac) get_bios_config() vendor passthru method
    raises an AttributeError exception. It no longer returns the current
    BIOS configuration. This is a regression from stable/mitaka.

    Triage found that get_bios_config() mistakenly treats the value returned
    by python-dracclient's list_bios_settings() as containing named tuples.
    When it calls the namedtuple _asdict() method, an AttributeError
    exception is raised.

    Revert get_bios_config()'s handling of the return value to use __dict__.
    Remove the comment that is not consistent with the implementation.

    Also revert the unit test case for a successful call to use mock to
    create the return value. Use mock.NonCallableMock with an empty
    specification (spec) to catch this type of bug in the future.

    Change-Id: I94afaa72a1ef25efc1b622e29e3a92a5d27f1892
    Closes-Bug: #1637671

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/392548

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (stable/newton)

Reviewed: https://review.openstack.org/392548
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=9889ab2c1a549d0bd91d969f8af09e1df8279681
Submitter: Jenkins
Branch: stable/newton

commit 9889ab2c1a549d0bd91d969f8af09e1df8279681
Author: Richard Pioso <email address hidden>
Date: Fri Oct 28 20:11:18 2016 -0400

    DRAC get_bios_config() passthru causes exception

    The DRAC driver's (pxe_drac) get_bios_config() vendor passthru method
    raises an AttributeError exception. It no longer returns the current
    BIOS configuration. This is a regression from stable/mitaka.

    Triage found that get_bios_config() mistakenly treats the value returned
    by python-dracclient's list_bios_settings() as containing named tuples.
    When it calls the namedtuple _asdict() method, an AttributeError
    exception is raised.

    Revert get_bios_config()'s handling of the return value to use __dict__.
    Remove the comment that is not consistent with the implementation.

    Also revert the unit test case for a successful call to use mock to
    create the return value. Use mock.NonCallableMock with an empty
    specification (spec) to catch this type of bug in the future.

    Change-Id: I94afaa72a1ef25efc1b622e29e3a92a5d27f1892
    Closes-Bug: #1637671
    (cherry picked from commit 6d6cf18f3171f42af1567c65240a7a6a759377c2)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 6.2.2

This issue was fixed in the openstack/ironic 6.2.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 7.0.0

This issue was fixed in the openstack/ironic 7.0.0 release.

Revision history for this message
George Shuklin (george-shuklin) wrote :

Hello Ubuntu guys.

It's already more than 4 months since Ironic 6.2.2 has been released. xenial-updates/newton/main still uses 1:6.2.1-0ubuntu1, and it still has that bug.

Are you really provide updates for cloud-archive for xenial, or not?

Revision history for this message
James Page (james-page) wrote :

Hi George

I'd be happy to provide and update to ironic 6.2.2 however the ubuntu-openstack team don't have any capability to test ironic updates; if you'd be happy to handle the SRU testing requirements to ensure we don't hit any regressions then we can take a look at an update.

Cheers

James

Changed in ironic (Ubuntu):
status: New → Fix Released
Changed in cloud-archive:
status: New → Fix Released
Revision history for this message
James Page (james-page) wrote :

(for future reference this is normally the case for an openstack package that resides in Ubuntu universe - once a package has been promoted to Ubuntu main, then the ubuntu-openstack team will have put in place the deployment and testing procedures to handled this type of update as part of business as usual).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.