'nova-manage cell_v2 delete_cell' fails even if all instances have been deleted in the cell

Bug #1725331 reported by Takashi Natsume
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Takashi Natsume

Bug Description

Description
===========

The following command fails with the following message even if all instances have been deleted in the cell.

Command:
nova-manage cell_v2 delete_cell --cell_uuid f166159e-9111-4c09-ac9a-74e016c6b1e2 --force

Message:
There are existing instances mapped to cell with uuid f166159e-9111-4c09-ac9a-74e016c6b1e2.

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

1. Create a server(instance)

openstack server create --flavor 1 --image 69ff03db-312a-406e-bb49-7303c206590f server1

2. Delete a server(instance)

openstack server delete server1

All instances have been deleted in the cell.

3. Delete a cell that the server(instance) existed.

nova-manage cell_v2 delete_cell --cell_uuid f166159e-9111-4c09-ac9a-74e016c6b1e2 --force

The command fails with the following message:
There are existing instances mapped to cell with uuid f166159e-9111-4c09-ac9a-74e016c6b1e2.

It is difficult to understand why the command fails even if all instances have been deleted in the cell.

Expected result
===============

If all instances have been deleted in the cell, the command succeeds with deleting instance mappings or show warning to delete the records in the instance_mappings table.

Actual result
=============

The command fails with the following message.

There are existing instances mapped to cell with uuid f166159e-9111-4c09-ac9a-74e016c6b1e2.

Environment
===========
nova master(commit 8d21d711000fff80eb367692b157d09b6532923f)
OS: Ubuntu 16.04.3 LTS

Tags: cells
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/513771

Changed in nova:
status: New → In Progress
Revision history for this message
Surya Seetharaman (tssurya) wrote :

Kindly refer to this : https://bugs.launchpad.net/nova/+bug/1724621 which is similar.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/513771
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=52e7e6e3e47c66b362d62d8e277e85f65714285a
Submitter: Zuul
Branch: master

commit 52e7e6e3e47c66b362d62d8e277e85f65714285a
Author: Takashi NATSUME <email address hidden>
Date: Fri Oct 20 23:13:28 2017 +0900

    Add a warning in 'nova-manage cell_v2 delete_cell'

    When deleting a cell, if there are instance mappings to the cell,
    the command fails with the following message.

    * There are existing instances mapped to cell with uuid UUID.

    But even if all instances have been deleted in the cell,
    the same message is shown.

    So in that case, add a warning that the instance mappings have to
    be deleted by 'nova-manage db archive_deleted_rows'
    before deleting the cell.

    Change-Id: I2a163fb50a7e71ce9f463bc9ddeffe2ea47d1588
    Closes-Bug: #1725331

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0b3

This issue was fixed in the openstack/nova 17.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.