Merry Christmas-A tribute to Google-a tribute to Linux-tribute to StackOverflow-a tribute to OpenStack-never retreat

Source: Internet
Author: User

Openstack can not delete instance from dashboard
Up vote1 down vote favorite

There is instances in Openstack Havana. I think these instances is zombies instance. Dashboard displays when Terminate Success info I click Terminate Instance . But the instance still exists in dashboard and its status is Running . I have already kill all program on qemu-kvm server.

In Mysql, database nova remains a lot of data. I don ' t know where to start to delete these data. Could someone give me some advice?? Thanks a lot.

OpenStack
Share| Improve this question asked Mar 5 at 10:25 Changzhi
3072

Add a Comment
2 Answersactiveoldest votes
Up vote2 down vote accepted

I did this and the icehouse release of OpenStack, maybe you can map this to the Havana release:

  1. Log into the database (your should see in > mysql your console)
  2. Select the Nova database:

    use nova;

  3. Mark the rows in table instances as deleted (that ' s a "soft-delete")

    update instances set deleted_at = updated_at, deleted = id, power_state = 0, vm_state = "deleted", terminated_at = updated_at, root_device_name = NULL, task_state = NULL where deleted = 0;

    <--that ' deletes ' all your instances! Use show columns from instances; if you want to choose another column (s) for yourwhere-clause.

  4. Update the cache in table instance_info_chaches appropriately

    update instance_info_caches set deleted_at = updated_at, deleted = id where deleted = 0;

  5. Update the fixed_ips table:

    update fixed_ips set instance_id = NULL, allocated = 0, virtual_interface_id = NULL where deleted = 0;

Note: If the column deleted contains a value notequal to zeroand then this seems to be the the-to-say this R OW is supposedto be deleted. When I delete a instance via API, OpenStack seems to choose theID as value for deleted.

Source: http://www.databaseskill.com/4605135/

Merry Christmas-A tribute to Google-a tribute to Linux-tribute to StackOverflow-a tribute to OpenStack-never retreat

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.