There is no way to delete a cell mapping except via DB directly

Bug #1656691 reported by Matt Riedemann
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann

Bug Description

We currently provide a few ways to create cell mappings for cells v2 in nova-manage but we don't have a way to delete a cell mapping in case there are some created erroneously.

We should provide a nova-manage cell_v2 delete_cell command which allows deleting an empty cell mapping, it would take a cell uuid argument. If the cell is not found by uuid we should return an error. If the cell has mapped hosts or instances then it's not empty and we should return an error.

Later iterations of the command might allow a --force option to delete the host/instance mappings so that those could be moved to another cell, but that would require some more thought.

Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/420449

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/420450

Changed in nova:
status: Confirmed → In Progress
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/420451

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

Reviewed: https://review.openstack.org/420449
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8677aca6542f7cf45ca1b3673dede84d264192aa
Submitter: Jenkins
Branch: master

commit 8677aca6542f7cf45ca1b3673dede84d264192aa
Author: Matt Riedemann <email address hidden>
Date: Sun Jan 15 15:28:01 2017 -0500

    Create HostMappingList object

    This creates the HostMappingList object which will provide
    a way to list HostMappings by a given CellMapping.id. This
    is going to be used later in a "nova-manage cell_v2 delete_cell"
    command.

    Change-Id: I58e0c5565013d8ef9753a9566841e83573a85afd
    Related-Bug: #1656691

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/420450
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=90cd8acf9112df2ce14d9d059d221bb38e7d6097
Submitter: Jenkins
Branch: master

commit 90cd8acf9112df2ce14d9d059d221bb38e7d6097
Author: Matt Riedemann <email address hidden>
Date: Sun Jan 15 15:55:15 2017 -0500

    Add InstanceMappingList.get_by_cell_id

    This adds the InstanceMappingList.get_by_cell_id method which will
    provide a way to list InstanceMappings by a given CellMapping.id. This
    is going to be used later in a "nova-manage cell_v2 delete_cell"
    command.

    Change-Id: I98a22161b28f2de32760c578713be27766e6809e
    Related-Bug: #1656691

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

Reviewed: https://review.openstack.org/420451
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3e04a32df4d06f79a11423c9c0a7780d065187b1
Submitter: Jenkins
Branch: master

commit 3e04a32df4d06f79a11423c9c0a7780d065187b1
Author: Matt Riedemann <email address hidden>
Date: Sun Jan 15 16:29:33 2017 -0500

    Add nova-manage cell_v2 delete_cell command

    This provides a way to delete empty cell mappings which
    otherwise would have to be done directly in the database.

    Change-Id: I541b072638b5d50985145391e76f610417fdcaa6
    Closes-Bug: #1656691

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

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

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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