Delete an OpenStack Zombie instance

Source: Internet
Author: User

OpenStack instance is recorded in the instances table in the Nova database, the simplest way is to delete the record.

1.Recycle floatIP

Unbind

Nova Remove-floating-ip Vm_name xx.xx.xx.xx

put IP Pool

Nova Floating-ip-delete xx.xx.xx.xx

2.Delete Instance Records2.1Force Delete

default MySQL The foreign Key association is turned on, and deleting the associated data directly will result in the following error

Cannot delete or update a parent ROW:A FOREIGN KEY constraint fails

can be closed by closing ( SET foreign_key_checks=0; ) to eliminate the error, after the deletion is turned on ( SET Foreign_key_checks=1; ).

Use Nova;

Select Id,display_name,uuid from instances;

Set foreign_key_checks=0;

Delete from instances where id= ' ... ';

Set Foreign_key_checks=1;

2.2.Associate Delete

The foreign Key association is not closed, and all relevant data is deleted before the instance record is deleted.

2.2.1Querying instance Information

Select Id,display_name,uuid from instances;

2.2.2Deletesecurity_group_instance_associationthe data in the table

Delete from security_group_instance_association where instance_uuid= ' ... ';

2.2.3Deleteinstance_info_cachesthe data in the table

Delete from instance_info_caches where id= ...;

2.2.4Deleteblock_device_mappingthe data in the table

Delete from block_device_mapping where instance_uuid= ' ... ';


2.2.5Deleteinstancesthe data in the table

Delete from where id= ' ... ';



This article is from the "Broken Million book" blog, please be sure to keep this source http://powanjuanshu.blog.51cto.com/9779836/1627715

Delete an OpenStack Zombie instance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.