Skip to content

Instantly share code, notes, and snippets.

@jtaleric
Last active October 18, 2016 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtaleric/fcca3811cd4d8f37336f9532e5b9c9ff to your computer and use it in GitHub Desktop.
Save jtaleric/fcca3811cd4d8f37336f9532e5b9c9ff to your computer and use it in GitHub Desktop.
clear
# set -x
BULK=20
for node in `ironic node-list | egrep "available|manage" | awk '{print $2}'`; do
if [ "$BULK" -gt "0" ] ; then
ironic node-show $node | grep mem | grep -q 1024
if [[ $? -eq 0 ]] ; then
ironic node-set-maintenance $node true
echo Starting Introspecton on: $node
openstack baremetal introspection start $node
((BULK--))
echo Running $BULK more introspections this batch
fi
else
echo Giving time for introspection to complete....
BULK=20
sleep 10m
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment