Removing deleted instances form nova database, is it safe

asked 2014-06-10 04:18:30 -0500

radclif gravatar image

I have been load testing a new openstack cluster by creating lagre numbers of instances running tests then deleteing them. When I check the the nova.instances table I see that all deleted intances are still present. The deleted instances are all maked as deleted which is fine but I would like to know if its possible to deleted them from the database records with out causing a problem. I presume they are kept in the instances table for auditing or reference but I have no need for this and would like to keep the table size down.

Just need to know if its safe to manually delete them and if there is a seeting to automatically remove instances from the table when they are deleted

Thanks

edit retag flag offensive close merge delete

Comments

I did similar testing in devstack. After terminating instances, I cleared DB, restarted service and all were fine without any issues.

SGPJ gravatar imageSGPJ ( 2014-06-10 04:42:02 -0500 )edit

Thanks Shankar, could you show the sql you used to achive this I am having trouble with forgin key constaints in the block_device_mapping table

radclif gravatar imageradclif ( 2014-06-10 05:04:37 -0500 )edit