metalsmith/metalsmith_ansible
Steve Baker 6c5e68a443 Do a precise node lookup for unprovision
A hostname or name is passed to the unprovision call, and the node is
looked up by allocation name (hostname), falling back to node name.

This can result in the wrong node being unprovisioned in the following
scenario:
* node and hostname naming scheme are identical
* node and hostname names are mixed because allocation placement
  doesn't take the node name into account
* a node has already been unprovisioned by hostname (allocation)
  lookup
* unprovision is performed a second time, this time matching the
  hostname with a different node's name
* the wrong node is unprovisioned

The unprovision_node method can also take a node object instead of a
string identifier, so this change does a precise node lookup before
calling it. This means only hostnames are used for allocation lookups,
and node names for node lookups.

Change-Id: I9507f8d30c871ae62a250148789393695d59183a
Resolves: rhbz#2092444
2022-07-12 08:55:39 +00:00
..
ansible_plugins/modules Do a precise node lookup for unprovision 2022-07-12 08:55:39 +00:00
roles/metalsmith_deployment Follow-up to metalsmith_instances config_drive 2020-12-08 14:34:21 +13:00