diff options
author | Jim Rollenhagen <jim@jimrollenhagen.com> | 2018-07-02 20:44:32 +0000 |
---|---|---|
committer | Jim Rollenhagen <jim@jimrollenhagen.com> | 2018-07-23 20:51:31 +0000 |
commit | 26fd55f7da2860d7fa71c8bbeabde72e0a74049a (patch) | |
tree | 4758924266ce0b228aac8c5eb497b595f2861260 /ironic/drivers/modules/inspector.py | |
parent | 3b7e7fb3fcb24726b94d1bf1c44dc710fde0e996 (diff) | |
download | ironic-26fd55f7da2860d7fa71c8bbeabde72e0a74049a.tar.gz |
Use conductor group for hash ring calculations
This changes the calculation for keys in the hash ring manager to be of
the form "<conductor_group>:<driver>", instead of just driver. This is
used when the RPC version pin is 1.47 or greater (1.47 was created to
handle this).
When finding an RPC topic, we use the conductor group marked on the node
as part of this calculation. However, this becomes a problem when we
don't have a node that we're looking up a topic for. In this case we
look for a conductor in any group which has the driver loaded, and use a
temporary hash ring that does not use conductor groups to find a
conductor.
This also begins the API work, as the API must be aware of the new hash
ring calculation. However, exposing the conductor_group field and adding
a microversion is left for a future patch.
Story: 2001795
Task: 22641
Change-Id: Iaf71348666b683518fc6ce4769112459d98938f2
Diffstat (limited to 'ironic/drivers/modules/inspector.py')
-rw-r--r-- | ironic/drivers/modules/inspector.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ironic/drivers/modules/inspector.py b/ironic/drivers/modules/inspector.py index b543333fb..00749bd2c 100644 --- a/ironic/drivers/modules/inspector.py +++ b/ironic/drivers/modules/inspector.py @@ -131,7 +131,7 @@ class Inspector(base.InspectInterface): filters = {'provision_state': states.INSPECTWAIT} node_iter = manager.iter_nodes(filters=filters) - for node_uuid, driver in node_iter: + for node_uuid, driver, conductor_group in node_iter: try: lock_purpose = 'checking hardware inspection status' with task_manager.acquire(context, node_uuid, |