When a instance with cinder volume is failed to be scheduled to a host, its status becomes error.
Now I delete it successfully, but in block_device_mapping table of nova database, the volume information of the instance is still kept, and not deleted:
MariaDB [nova]> select * from instances where deleted=0;
Empty set (0.00 sec)
When a instance with cinder volume is failed to be scheduled to a host, its status becomes error. mapping table of nova database, the volume information of the instance is still kept, and not deleted:
Now I delete it successfully, but in block_device_
MariaDB [nova]> select * from instances where deleted=0;
Empty set (0.00 sec)
MariaDB [nova]> select * from block_device_ mapping where deleted=0; ------- ------- -+----- ------- +------ ------+ ----+-- ------- ----+-- ------- ------- ------- +------ ------- +------ -----+- ------- -----+- ------- ---+--- ------- ------- +------ ------- ------- ------- ------- ----+-- ------- +------ ------- +------ ------- -----+- ------- ------+ ------- ------+ ------- ---+--- ------- --+---- ------- ------- ------- ------- ------+ on_termination | snapshot_id | volume_id | volume_size | no_device | connection_info | instance_uuid | deleted | source_type | destination_type | guest_format | device_type | disk_bus | boot_index | image_id | ------- ------- -+----- ------- +------ ------+ ----+-- ------- ----+-- ------- ------- ------- +------ ------- +------ -----+- ------- -----+- ------- ---+--- ------- ------- +------ ------- ------- ------- ------- ----+-- ------- +------ ------- +------ ------- -----+- ------- ------+ ------- ------+ ------- ---+--- ------- --+---- ------- ------- ------- ------- ------+ f843-48d0- 9214-409fe1ba23 61 | 0 | image | local | NULL | disk | NULL | 0 | f5f2fe87- 18fe-4d3a- 9b8b-a58a5e60e5 ed | acbf-4561- bf97-5a2b9d27f1 60 | 0 | image | local | NULL | disk | NULL | 0 | f5f2fe87- 18fe-4d3a- 9b8b-a58a5e60e5 ed | 8151-4598- a517-33c65816e6 40 | 0 | image | local | NULL | disk | NULL | 0 | f5f2fe87- 18fe-4d3a- 9b8b-a58a5e60e5 ed | ------- ------- -+----- ------- +------ ------+ ----+-- ------- ----+-- ------- ------- ------- +------ ------- +------ -----+- ------- -----+- ------- ---+--- ------- ------- +------ ------- ------- ------- ------- ----+-- ------- +------ ------- +------ ------- -----+- ------- ------+ ------- ------+ ------- ---+--- ------- --+---- ------- ------- ------- ------- ------+
+------
| created_at | updated_at | deleted_at | id | device_name | delete_
+------
| 2015-01-07 00:52:03 | NULL | NULL | 14 | NULL | 1 | NULL | NULL | NULL | NULL | NULL | 9bf64061-
| 2015-01-07 07:50:10 | NULL | NULL | 15 | NULL | 1 | NULL | NULL | NULL | NULL | NULL | d47983c7-
| 2015-01-07 07:52:28 | NULL | NULL | 16 | NULL | 1 | NULL | NULL | NULL | NULL | NULL | ddffc047-
+------
3 rows in set (0.00 sec)
MariaDB [nova]>