summaryrefslogtreecommitdiff
path: root/ironic/tests
diff options
context:
space:
mode:
authorDmitry Tantsur <dtantsur@protonmail.com>2020-09-25 17:34:01 +0200
committerDmitry Tantsur <dtantsur@protonmail.com>2020-09-25 17:34:58 +0200
commitbc628ac6efa99781e547075e99a2d72b4afc867b (patch)
treec7db4f9dea9713db02d0723cf6b3842cb5b0c4b8 /ironic/tests
parent484dcd5b60ae71d4647d31b87628f48bf947d05c (diff)
downloadironic-bc628ac6efa99781e547075e99a2d72b4afc867b.tar.gz
Route conductor notification RPC to the same conductor
RPC continue_node_{deploy,clean} are called from a conductor handling the node, so they don't have to go through the hash ring. This avoids situation when take over happens in the middle of a deploy/clean step processing, breaking it. Eventually, we should stop using RPC for that at all, but that will be a much more invasive change. Story: #2008200 Task: #40984 Change-Id: I76293f8ec30d5957b99bdbce5b70e87e8378d135
Diffstat (limited to 'ironic/tests')
-rw-r--r--ironic/tests/unit/conductor/test_utils.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/ironic/tests/unit/conductor/test_utils.py b/ironic/tests/unit/conductor/test_utils.py
index 9f917142f..2b1ea74cc 100644
--- a/ironic/tests/unit/conductor/test_utils.py
+++ b/ironic/tests/unit/conductor/test_utils.py
@@ -1728,15 +1728,14 @@ class MiscTestCase(db_base.DbTestCase):
@mock.patch.object(rpcapi.ConductorAPI, 'continue_node_deploy',
autospec=True)
- @mock.patch.object(rpcapi.ConductorAPI, 'get_topic_for', autospec=True)
- def test_notify_conductor_resume_operation(self, mock_topic,
- mock_rpc_call):
- mock_topic.return_value = 'topic'
+ def test_notify_conductor_resume_operation(self, mock_rpc_call):
+ self.config(host='fake-host')
with task_manager.acquire(
self.context, self.node.uuid, shared=False) as task:
conductor_utils.notify_conductor_resume_operation(task, 'deploy')
mock_rpc_call.assert_called_once_with(
- mock.ANY, task.context, self.node.uuid, topic='topic')
+ mock.ANY, task.context, self.node.uuid,
+ topic='ironic.conductor_manager.fake-host')
@mock.patch.object(conductor_utils, 'notify_conductor_resume_operation',
autospec=True)