Created
July 6, 2018 18:48
-
-
Save mbruzek/2e7bf57fe4d3ea43be7d3180066bffa7 to your computer and use it in GitHub Desktop.
The instructions to clean OpenShift nodes between deploys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ironic_id in $(ironic node-list | awk {'print $2'} | grep -v UUID | egrep -v '^$'); do | |
ironic node-set-provision-state $ironic_id manage; | |
done | |
# Check ironic node-list for managemable | |
for ironic_id in $(ironic node-list | awk {'print $2'} | grep -v UUID | egrep -v '^$'); do | |
openstack baremetal node clean $ironic_id --clean-steps '[{"interface": "deploy", "step": "erase_devices_metadata"}]'; | |
done | |
# watch ironic node list until all cleaned | |
for ironic_id in $(ironic node-list | awk {'print $2'} | grep -v UUID | egrep -v '^$'); do | |
ironic node-set-provision-state $ironic_id provide; | |
done | |
# Check all available |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment