nova-manage cell_v2 map_cell0 always returns a non-0 exit code

Bug #1656017 reported by Matt Riedemann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Peschman
Newton
New
Undecided
Unassigned

Bug Description

See the discussion in this review:

https://review.openstack.org/#/c/409890/1/nova/cmd/manage.py@1289

The map_cell0 CLI is really treated like a function and it's used by the simple_cell_setup command. If map_cell0 is used as a standalone command it always returns a non-0 exit code because it's returning a CellMapping object (or failing with a duplicate entry error if the cell0 mapping already exists).

We should split the main part of the map_cell0 function out into a private method and then treat map_cell0 as a normal CLI with integer exit codes (0 on success, >0 on failure) and print out whatever information is needed when mapping cell0, like the uuid for example.

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/420132

Changed in nova:
assignee: nobody → Dan Peschman (dpeschman)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit aa7b6ebbb254f00fcb548832941ca9dbd3996d9f
Author: Dan Peschman <email address hidden>
Date: Fri Jan 13 11:51:51 2017 -0700

    nova-manage cell_v2 map_cell0 exit 0

    This command used to always return 1 because it was returning a data
    structure used by another CLI function. Now it exits 0 if the cell0
    mapping was created succesfully or was already there.

    Closes-Bug: #1656017
    Change-Id: Ie66de8425bb8f65dc9eab9d0da809e94f6d72b1b

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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/484801

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/newton)

Change abandoned by Thomas Bechtold (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/484801
Reason: To late after Pike was released I guess. Sorry..

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.