simple_cell_setup reports "exiting" when it is not

Bug #1821737 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Chris Dent

Bug Description

When running 'nova-manage simple_cell_setup ...' if hosts are already the _map_cell_and_hosts method prints a message of 'All hosts are already mapped to cell(s), exiting.' and then proceeds to map instances. It does not, in fact, exit.

This isn't the end of the world, but is somewhat confusing.

The easiest fix is probably to get rid of ', exiting'. Then in the multiple paths to the method, the printed message still makes sense and 'exiting' can be implicit.

Tags: cells
Revision history for this message
Chris Dent (cdent) wrote :

This true from master at least back to queens.

Revision history for this message
melanie witt (melwitt) wrote :

Looking at the code, I can see why this happens:

        cell_uuid = self._map_cell_and_hosts(transport_url)
        if cell_uuid is None:
            # There are no compute hosts which means no cell_mapping was
            # created. This should also mean that there are no instances.
            return 1
        self.map_instances(cell_uuid)

When it says 'exiting', it's exiting the _map_cell_and_hosts method, not the simple_cell_setup method. So it will go ahead and map_instances afterward.

Agreed the message should just be updated to remove confusion.

Changed in nova:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
melanie witt (melwitt) wrote :

To be clear, in the 'All hosts are already mapped to cell(s)' case, cell_mapping_uuid is returned from the _map_cell_and_hosts method, which will not cause simple_cell_setup to exit if it is not None.

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

Changed in nova:
assignee: nobody → Chris Dent (cdent)
status: Triaged → In Progress
Changed in nova:
assignee: Chris Dent (cdent) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Chris Dent (cdent)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/649340
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8ab3300d5d588f169b40ca7dbc6cd63370226066
Submitter: Zuul
Branch: master

commit 8ab3300d5d588f169b40ca7dbc6cd63370226066
Author: Chris Dent <email address hidden>
Date: Tue Apr 2 15:07:45 2019 +0100

    Don't report 'exiting' when mapping cells

    When running 'nova-manage simple_cell_setup...' if there are not hosts
    to map, but there remaining instances to map, an '..., exiting' message
    is produced. This is misleading because "exiting" implies a return of
    control to the user. That doesn't happen if there are many instances
    left to inspect or map.

    This change gets around that by getting rid of the exiting message
    in the case where instance mapping can still happen.

    Change-Id: I62b20a3676429b5cc756884275138566785b347e
    Closes-Bug: #1821737

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

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

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.