From 1506c36b4446f6ba1487a2d68e4b23cb3fca44cb Mon Sep 17 00:00:00 2001 From: Jim Rollenhagen Date: Wed, 7 Dec 2016 16:26:54 -0500 Subject: [PATCH] Update ironic driver get_available_nodes docstring This was out of date, it now returns a subset of Ironic nodes. Change-Id: I7e0bdd2578e1c32dbb0d607b1355be7be45501df --- nova/virt/ironic/driver.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/nova/virt/ironic/driver.py b/nova/virt/ironic/driver.py index 0d828ed6a8..dfcd067240 100644 --- a/nova/virt/ironic/driver.py +++ b/nova/virt/ironic/driver.py @@ -578,7 +578,20 @@ class IronicDriver(virt_driver.ComputeDriver): self.node_cache_time = time.time() def get_available_nodes(self, refresh=False): - """Returns the UUIDs of all nodes in the Ironic inventory. + """Returns the UUIDs of Ironic nodes managed by this compute service. + + We use consistent hashing to distribute Ironic nodes between all + available compute services. The subset of nodes managed by a given + compute service is determined by the following rules: + + * any node with an instance managed by the compute service + * any node that is mapped to the compute service on the hash ring + * no nodes with instances managed by another compute service + + The ring is rebalanced as nova-compute services are brought up and + down. Note that this rebalance does not happen at the same time for + all compute services, so a node may be managed by multiple compute + services for a small amount of time. :param refresh: Boolean value; If True run update first. Ignored by this driver. -- 2.39.5