← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1722451] [NEW] A record in 'instance_mappings' table is not deleted when the instance is deleted

 

Public bug reported:

Description
===========
If an VM instance is deleted, the record in the 'instance_mappings' should be deleted.
But it remains after the VM instance is deleted.

Steps to reproduce
==================

1. Create a VM instance

stack@devstack-master:/opt/devstack$ nova boot --flavor 1 --image d2721412-9cf0-4829-aa07-47e9a4e1c9c6 server1
(snipped...)
stack@devstack-master:/opt/devstack$ nova list
+--------------------------------------+---------+--------+------------+-------------+--------------------------------+
| ID                                   | Name    | Status | Task State | Power State | Networks                       |
+--------------------------------------+---------+--------+------------+-------------+--------------------------------+
| 7ae8452f-1769-47e9-8ecc-aac377996ace | server1 | ACTIVE | -          | Running     | public=2001:db8::8, 10.0.2.194 |
+--------------------------------------+---------+--------+------------+-------------+--------------------------------+

2. Delete a VM instance

stack@devstack-master:/opt/devstack$ nova delete server1
Request to delete server server1 has been accepted.
stack@devstack-master:/opt/devstack$ nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+

mysql> select * from instance_mappings;
+---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
| created_at          | updated_at          | id | instance_uuid                        | cell_id | project_id                       |
+---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
| 2017-10-10 05:09:32 | 2017-10-10 05:09:33 |  1 | 7ae8452f-1769-47e9-8ecc-aac377996ace |       2 | c6aab021715848abb227581956be6f1d |
+---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
1 row in set (0.00 sec)

Expected result
===============
The record in the 'instance_mappings' is deleted after the VM instance is deleted. 

Actual result
=============
The record in the 'instance_mappings' remains (is not deleted) after the VM instance is deleted. 

Environment
===========
Ubuntu 16.04.2 LTS
nova master (commit 650c9f3f0825e9622e96da0723f224a895a3d173)

** Affects: nova
     Importance: Undecided
     Assignee: Takashi NATSUME (natsume-takashi)
         Status: In Progress


** Tags: cells

** Changed in: nova
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1722451

Title:
  A record in 'instance_mappings' table is not deleted when the instance
  is deleted

Status in OpenStack Compute (nova):
  In Progress

Bug description:
  Description
  ===========
  If an VM instance is deleted, the record in the 'instance_mappings' should be deleted.
  But it remains after the VM instance is deleted.

  Steps to reproduce
  ==================

  1. Create a VM instance

  stack@devstack-master:/opt/devstack$ nova boot --flavor 1 --image d2721412-9cf0-4829-aa07-47e9a4e1c9c6 server1
  (snipped...)
  stack@devstack-master:/opt/devstack$ nova list
  +--------------------------------------+---------+--------+------------+-------------+--------------------------------+
  | ID                                   | Name    | Status | Task State | Power State | Networks                       |
  +--------------------------------------+---------+--------+------------+-------------+--------------------------------+
  | 7ae8452f-1769-47e9-8ecc-aac377996ace | server1 | ACTIVE | -          | Running     | public=2001:db8::8, 10.0.2.194 |
  +--------------------------------------+---------+--------+------------+-------------+--------------------------------+

  2. Delete a VM instance

  stack@devstack-master:/opt/devstack$ nova delete server1
  Request to delete server server1 has been accepted.
  stack@devstack-master:/opt/devstack$ nova list
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  mysql> select * from instance_mappings;
  +---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
  | created_at          | updated_at          | id | instance_uuid                        | cell_id | project_id                       |
  +---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
  | 2017-10-10 05:09:32 | 2017-10-10 05:09:33 |  1 | 7ae8452f-1769-47e9-8ecc-aac377996ace |       2 | c6aab021715848abb227581956be6f1d |
  +---------------------+---------------------+----+--------------------------------------+---------+----------------------------------+
  1 row in set (0.00 sec)

  Expected result
  ===============
  The record in the 'instance_mappings' is deleted after the VM instance is deleted. 

  Actual result
  =============
  The record in the 'instance_mappings' remains (is not deleted) after the VM instance is deleted. 

  Environment
  ===========
  Ubuntu 16.04.2 LTS
  nova master (commit 650c9f3f0825e9622e96da0723f224a895a3d173)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1722451/+subscriptions