openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #13706
A collection of utilities for cleaning up the database
Since I've been regularly breaking things over the past few weeks I've
gotten tired of manually clearing things out of the Nova database.
I've written a small collection of tools to make this task easier:
https://code.seas.harvard.edu/openstack/stackutil
This is Python code which you should be able to easy_install. It
requires (and easy_install will install) "cliff", a framework for
command-line applications.
At the moment, it can:
- Free ip addresses that have not been correctly released.
- Delete instances stuck in the BUILD or ERROR states that won't go
away when you use "nova delete".
- Delete volumes stuck in the "attaching" or "creating" state.
- Delete disabled services.
The last one is there because I couldn't figure out how to disable
services (for example, when I remove a compute node).
The code uses nova.flag.FLAG to read your nova configuration file,
extract sql_connection, and then uses
sqlalchemy.engine.create_engine() to create a database connection from
that URL.
WARNING: This code is a terrible hack and using it could possible
corrupt your database and make your OpenStack environment fall over
hard. On the other hand, if you're in the early stages of testing
this may save you some grief.
--
Lars Kellogg-Stedman <lars@xxxxxxxxxxxxxxxx> |
Senior Technologist | http://ac.seas.harvard.edu/
Academic Computing | http://code.seas.harvard.edu/
Harvard School of Engineering and Applied Sciences |