From ddf0d607c0b0063e1b04aa8e79a81e5811759495 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Thu, 5 Oct 2017 22:57:26 -0700 Subject: Fix mis-formatted log messages Fix errors in log messages. These were detected by a patch that catches these types of errors. Submitting these fixes first as the patch to detect the errors will likely take more time to get merged. Conflicts: ironic/dhcp/neutron.py ironic/drivers/modules/irmc/boot.py ironic/drivers/modules/oneview/deploy_utils.py Closes-Bug: #1722597 Change-Id: Ibe451f9cd97971cb83366fdc6f7f5c31d2af4793 (cherry picked from commit df5da4ce7a32e64e34a489b741bd911f9c55ea34) --- ironic/dhcp/neutron.py | 2 +- ironic/tests/unit/conductor/test_task_manager.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ironic/dhcp/neutron.py b/ironic/dhcp/neutron.py index a335cea7b..f86081833 100644 --- a/ironic/dhcp/neutron.py +++ b/ironic/dhcp/neutron.py @@ -204,7 +204,7 @@ class NeutronDHCPApi(base.BaseDHCP): if isinstance(p_obj, objects.Port): obj_name = 'port' LOG.warning(_LW("No VIFs found for node %(node)s when attempting " - "to get IP address for %(obj_name)s: %(obj_id)."), + "to get IP address for %(obj_name)s: %(obj_id)s."), {'node': task.node.uuid, 'obj_name': obj_name, 'obj_id': p_obj.uuid}) raise exception.FailedToGetIPAddressOnPort(port_id=p_obj.uuid) diff --git a/ironic/tests/unit/conductor/test_task_manager.py b/ironic/tests/unit/conductor/test_task_manager.py index fff06e191..2e2b39e73 100644 --- a/ironic/tests/unit/conductor/test_task_manager.py +++ b/ironic/tests/unit/conductor/test_task_manager.py @@ -729,6 +729,7 @@ class TaskManagerStateModelTestCases(tests_base.TestCase): t.shared = True t._purpose = 'purpose' t._debug_timer = mock.Mock() + t._debug_timer.elapsed.return_value = 3.14 t.release_resources(t) self.assertIsNone(t.node) -- cgit v1.2.1