Comment 0 for bug 1408527

Revision history for this message
zhangwenjian (wenjian-zhang) wrote :

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)

MariaDB [nova]> select * from block_device_mapping where deleted=0;
+---------------------+------------+------------+----+-------------+-----------------------+-------------+-----------+-------------+-----------+-----------------+--------------------------------------+---------+-------------+------------------+--------------+-------------+----------+------------+--------------------------------------+
| created_at | updated_at | deleted_at | id | device_name | delete_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 |
+---------------------+------------+------------+----+-------------+-----------------------+-------------+-----------+-------------+-----------+-----------------+--------------------------------------+---------+-------------+------------------+--------------+-------------+----------+------------+--------------------------------------+
| 2015-01-07 00:52:03 | NULL | NULL | 14 | NULL | 1 | NULL | NULL | NULL | NULL | NULL | 9bf64061-f843-48d0-9214-409fe1ba2361 | 0 | image | local | NULL | disk | NULL | 0 | f5f2fe87-18fe-4d3a-9b8b-a58a5e60e5ed |
| 2015-01-07 07:50:10 | NULL | NULL | 15 | NULL | 1 | NULL | NULL | NULL | NULL | NULL | d47983c7-acbf-4561-bf97-5a2b9d27f160 | 0 | image | local | NULL | disk | NULL | 0 | f5f2fe87-18fe-4d3a-9b8b-a58a5e60e5ed |
| 2015-01-07 07:52:28 | NULL | NULL | 16 | NULL | 1 | NULL | NULL | NULL | NULL | NULL | ddffc047-8151-4598-a517-33c65816e640 | 0 | image | local | NULL | disk | NULL | 0 | f5f2fe87-18fe-4d3a-9b8b-a58a5e60e5ed |
+---------------------+------------+------------+----+-------------+-----------------------+-------------+-----------+-------------+-----------+-----------------+--------------------------------------+---------+-------------+------------------+--------------+-------------+----------+------------+--------------------------------------+
3 rows in set (0.00 sec)

MariaDB [nova]>