Resetting Meta data of a RAX Rackspace Xen Server

At work we had some customers complaining of metadata not being removed on their servers.

nova --os-username username --os-password apigoeshere meta uuidgoeshere delete rax:reboot_window

It was pretty simple to do as a one liner right.

But imagine we have a list.txt full of 100 servers that need clearing for an individual customer, that would be a nightmare to do manually like above. so we can do it like:

for server in $(cat list.txt); do nova --os-username username --os-password apikeygoeshere meta $server delete rax:reboot_window; done

Now that is pretty cool. And saved me and my colleagues a lot of time.

2 thoughts on “Resetting Meta data of a RAX Rackspace Xen Server

  1. If you change the last ; to & it executes the loop in one go, so rather doing 1 server at a time, it would have done all 100 in 100 commands 🙂

    for server in $(cat list.txt); do blah delete $i & done

    – Aaron

Leave a Reply

Your email address will not be published. Required fields are marked *