Liberty release of deploy drivers break compat with out-of-tree power drivers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Fix Released
|
High
|
Jim Rollenhagen |
Bug Description
The liberty release of the PXE and Agent deploy drivers were refactored to separate the BootInterface from the DeployInterface. While work was done in the ConductorManager class to retain backwards compatibility with previous drivers that did not include the new BootInterface, both the PXE and Agent deploy driver implementations ARE NOT backwards compatible.
I discovered this when attempting to use the "AMTTool" driver that I use in demos. After rebasing on Liberty, node validation and deploy fail with the following error:
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.062 16570 ERROR oslo_messaging.
2015-10-05 16:40:39.066 16570 ERROR oslo_messaging.
A quick work around was to instantiate the driver.boot interface in my driver's base class:
def __init__(self):
self.power = amttool.AMTPower()
+ self.boot = pxe.PXEBoot()
This is also posted here:
https:/
I don't consider this to be a good fix, however, since it requires updating out of tree drivers. A proper fix, which allows out of tree drivers to continue to work as-is should be implemented and then backported to Liberty.
Changed in ironic: | |
assignee: | Devananda van der Veen (devananda) → Jim Rollenhagen (jim-rollenhagen) |
status: | Triaged → In Progress |
Changed in ironic: | |
assignee: | Jim Rollenhagen (jim-rollenhagen) → Devananda van der Veen (devananda) |
Changed in ironic: | |
assignee: | Devananda van der Veen (devananda) → Jim Rollenhagen (jim-rollenhagen) |
Changed in ironic: | |
status: | Fix Committed → Fix Released |
status: | Fix Released → Fix Committed |
Changed in ironic: | |
status: | Fix Committed → Fix Released |
Quick follow up with a slightly contrived experiment. If I deploy a node using the above fix, and then roll back the fix and attempt to delete the instance, I get a different traceback. This is a different, but also backwards- incompatible, code path:
2015-10-05 16:34:04.583 15864 ERROR ironic. conductor. manager [-] Error in tear_down of node 98e7f8ae- 92cf-4449- 916d-c0ad42278e 7c: 'NoneType' object has no attribute 'clean_up_ramdisk' conductor. manager Traceback (most recent call last): conductor. manager File "/usr/local/ lib/python2. 7/dist- packages/ ironic/ conductor/ manager. py", line 798, in _do_node_tear_down conductor. manager task.driver. deploy. clean_up( task) conductor. manager File "/usr/local/ lib/python2. 7/dist- packages/ ironic/ drivers/ modules/ agent.py" , line 281, in clean_up conductor. manager task.driver. boot.clean_ up_ramdisk( task) conductor. manager AttributeError: 'NoneType' object has no attribute 'clean_up_ramdisk' conductor. manager lib/python2. 7/dist- packages/ eventlet/ hubs/hub. py", line 457, in fire_timers lib/python2. 7/dist- packages/ eventlet/ hubs/timer. py", line 58, in __call__ lib/python2. 7/dist- packages/ eventlet/ greenthread. py", line 214, in main lib/python2. 7/dist- packages/ ironic/ conductor/ manager. py", line 806, in _do_node_tear_down process_ event(' error') lib/python2. 7/dist- packages/ oslo_utils/ excutils. py", line 195, in __exit__ reraise( self.type_ , self.value, self.tb) lib/python2. 7/dist- packages/ ironic/ conductor/ manager. py", line 798, in _do_node_tear_down driver. deploy. clean_up( task) lib/python2. 7/dist- packages/ ironic/ drivers/ modules/ agent.py" , line 281, in clean_up driver. boot.clean_ up_ramdisk( task)
2015-10-05 16:34:04.583 15864 ERROR ironic.
2015-10-05 16:34:04.583 15864 ERROR ironic.
2015-10-05 16:34:04.583 15864 ERROR ironic.
2015-10-05 16:34:04.583 15864 ERROR ironic.
2015-10-05 16:34:04.583 15864 ERROR ironic.
2015-10-05 16:34:04.583 15864 ERROR ironic.
2015-10-05 16:34:04.583 15864 ERROR ironic.
Traceback (most recent call last):
File "/usr/local/
timer()
File "/usr/local/
cb(*args, **kw)
File "/usr/local/
result = function(*args, **kwargs)
File "/usr/local/
task.
File "/usr/local/
six.
File "/usr/local/
task.
File "/usr/local/
task.
AttributeError: 'NoneType' object has no attribute 'clean_up_ramdisk'