Handle unprovisioned Ironic nodes in fencing parameter generator.

We now ignore nodes that are defined in Ironic, but which have not been
used as part of an overcloud deployment, rather than crashing.

Change-Id: I1d4d9b510895cfae3b7914d6d6d6778ba1bdc180
Closes-Bug: #1671881
This commit is contained in:
Chris Jones
2017-03-10 17:06:26 +00:00
parent a5445f1a18
commit c4b04bbd6a

View File

@@ -254,6 +254,11 @@ class GenerateFencingParametersAction(base.TripleOAction):
mac_addr = node["mac"][0]
node_data["host_mac"] = mac_addr
# If the MAC isn't in the hostmap, this node hasn't been
# provisioned, so no fencing parameters are necessary
if mac_addr not in hostmap:
continue
# Build up fencing parameters based on which Ironic driver this
# node is using
if node["pm_type"] == "pxe_ssh":