From 91a190da14c6647fb0e4c988671959e20df33f00 Mon Sep 17 00:00:00 2001 From: Ronelle Landy Date: Thu, 2 Feb 2017 09:24:44 -0500 Subject: [PATCH] Update introspection command to introspect only manageable nodes With the Newton and later releases, it is possible to introspect only nodes in the manageable state rather than run bulk introspection that would work on all imported nodes. Change-Id: Ic36dea3f93e84ab49731996a69a9d3c28f973e86 --- .../templates/overcloud-prep-images.sh.j2 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/roles/overcloud-prep-images/templates/overcloud-prep-images.sh.j2 b/roles/overcloud-prep-images/templates/overcloud-prep-images.sh.j2 index 8d55bd6e7..4d096f17c 100644 --- a/roles/overcloud-prep-images/templates/overcloud-prep-images.sh.j2 +++ b/roles/overcloud-prep-images/templates/overcloud-prep-images.sh.j2 @@ -90,7 +90,22 @@ sudo mistral-db-manage populate ## * Introspect hardware attributes of nodes. ## :: -openstack baremetal introspection bulk start + {% if release == 'mitaka' %} + + openstack baremetal introspection bulk start + + {% else %} + + # Note: Unlike the legacy bulk command, overcloud node + # introspect will only run on nodes in the 'manageable' + # provisioning state. + for node in $(openstack baremetal node list --fields uuid -f value) ; do + openstack baremetal node manage $node ; + done + openstack overcloud node introspect --all-manageable + openstack overcloud node provide --all-manageable + + {% endif %} {% endif %}