Unable to add compute host to aggregate if no ironic nodes present

Bug #1686744 reported by Dan Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Smith

Bug Description

After the cell-ification of the aggregates API, it is not possible to add a compute to an aggregate if that compute does not expose any ComputeNode objects. This can happen if the hash ring does not allocate any ironic nodes to one of the computes (i.e. more services than ironic nodes) or if there are not yet any nodes present in ironic. You get the following message:

 openstack aggregate add host baremetal-hosts overcloud-controller-0.localdomain

 Result:
 Host 'overcloud-controller-0.localdomain' is not mapped to any cell (HTTP 404) (Request-ID: req-
 42525c1d-c419-4ea4-bb7c-7caa1d57a613)

This is confusing because the service is exposed in service-list and should be a candidate for adding to an aggregate.

Tags: cells
Dan Smith (danms)
Changed in nova:
assignee: nobody → Dan Smith (danms)
importance: Undecided → Medium
status: New → Confirmed
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/460616

Changed in nova:
status: Confirmed → In Progress
Matt Riedemann (mriedem)
tags: added: cells
Changed in nova:
assignee: Dan Smith (danms) → Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Dan Smith (danms)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 62878ef5a6c9f6a2c727c91397830387425c4d37
Author: Dan Smith <email address hidden>
Date: Thu Apr 27 07:55:40 2017 -0700

    re-Allow adding computes with no ComputeNodes to aggregates

    After the cellification of the Aggregates API, we introduced a requirement
    that the service must have a HostMapping record, so that we know which
    cell the service is in. This is normally fine, but for weird drivers such
    as ironic, there may be valid cases (i.e. during setup) where no ironic
    nodes are present, thus one or more services may not have any compute node
    records, and thus cannot be added to aggregates.

    This adds a cell scan, only if necessary, to find the desired service so
    that the operation may proceed as it did before. To do this, we refactor
    the _find_service() helper to a more generic utility and use that if we
    don't find a HostMapping during the add operation.

    Change-Id: Idc97126d63684e7d638b974d7226ff210c744404
    Closes-Bug: #1686744

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

This issue was fixed in the openstack/nova 16.0.0.0b2 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.