码迷,mamicode.com
首页 > 系统相关 > 详细

圣诞快乐——向Google致敬——向linux致敬——向stackoverflow致敬——向openStack 致敬——永不退缩

时间:2014-12-25 08:44:07      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:

技术分享技术分享

There are 66 instances in Openstack Havana. I think these instances are zombies instance. Dashboard displays Terminate Success info when I click Terminate Instance. But the instance still exists on dashboard and its status is Running. I have already kill all qemu-kvm program on 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.

share|improve this question

I did this in the Icehouse release of OpenStack, maybe you can map this to the Havana release:

  1. log into the database (you should see > mysql in 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 your where-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 not equal to zero, then this seems to be the way to say this row is supposed to be deleted. When I delete an instance via API, OpenStack seems to choose the id as value for deleted.

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

圣诞快乐——向Google致敬——向linux致敬——向stackoverflow致敬——向openStack 致敬——永不退缩

标签:

原文地址:http://blog.csdn.net/yuyezhulan/article/details/42133141

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!