diff --git a/ironic/conductor/manager.py b/ironic/conductor/manager.py index fd63ce6314..85924db553 100644 --- a/ironic/conductor/manager.py +++ b/ironic/conductor/manager.py @@ -2136,7 +2136,7 @@ class ConductorManager(base_manager.BaseConductorManager): node = task.node if not getattr(task.driver, 'raid', None): raise exception.UnsupportedDriverExtension( - driver=task.driver, extension='raid') + driver=task.node.driver, extension='raid') # Operator may try to unset node.target_raid_config. So, try to # validate only if it is not empty. if target_raid_config: diff --git a/ironic/tests/unit/conductor/test_manager.py b/ironic/tests/unit/conductor/test_manager.py index 2ee4ebc3d3..2a966e14dc 100644 --- a/ironic/tests/unit/conductor/test_manager.py +++ b/ironic/tests/unit/conductor/test_manager.py @@ -27,6 +27,7 @@ import oslo_messaging as messaging from oslo_utils import uuidutils from oslo_versionedobjects import base as ovo_base from oslo_versionedobjects import fields +import six from ironic.common import boot_devices from ironic.common import driver_factory @@ -3519,6 +3520,7 @@ class RaidTestCases(mgr_utils.ServiceSetUpMixin, tests_db_base.DbTestCase): self.node.refresh() self.assertEqual({}, self.node.target_raid_config) self.assertEqual(exception.UnsupportedDriverExtension, exc.exc_info[0]) + self.assertIn('fake', six.text_type(exc.exc_info[1])) def test_set_target_raid_config_invalid_parameter_value(self): # Missing raid_level in the below raid config.