ironic/ironic/drivers/modules/ucs
Ruby Loo 9e87cebc12 Fix handling of 'timeout' parameter to power methods
The PowerInterface methods set_power_state() and reboot() were enhanced
to take a 'timeout' parameter [1]. To handle Interfaces that didn't
support timeout, conductor.utils.node_power_action() used
reflection.get_signature() to determine whether or not the node's
PowerInterface's methods could handle a timeout parameter.

It turns out that there was a bug with the
ironic_lib.metrics.timer decorator [2], such that
reflection.get_signature() did not return the method parameters. This
means that for PowerInterfaces that had this decorator, the conductor
would incorrectly think that 'timeout' was not supported, even if it
were supported.

Instead of trying to decide whether a PowerInterface supports 'timeout',
the conductor now assumes that it does. This patch changes all in-tree
PowerInterfaces so that they accept a 'timeout' parameter for reboot()
and set_power_state().

For any out-of-tree implementations that don't accept a 'timeout'
parameter, a TypeError exception will be raised.

[1] f15d5b9a37
[2] https://bugs.launchpad.net/ironic/+bug/1746730

Closes-Bug: #1746849
Change-Id: Iae28e94c34d4d69593644d0e5f4542558db9bb79
2018-02-06 08:33:45 -05:00
..
__init__.py Add pxe_ucs and agent_ucs drivers to manage Cisco UCS servers 2015-06-10 19:16:04 +05:30
helper.py Remove translation of log messages from ironic/drivers/modules/ucs 2017-04-25 19:03:20 +07:00
management.py Remove translation of log messages from ironic/drivers/modules/ucs 2017-04-25 19:03:20 +07:00
power.py Fix handling of 'timeout' parameter to power methods 2018-02-06 08:33:45 -05:00