Node assignment from the UI won't work with custom roles

Bug #1643882 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Florian Fuchs

Bug Description

I was looking at how node are counted for each role in the UI. This is done as part of the tripleo.parameters.update_role action, which calls to set_count_and_flavor_params in https://github.com/openstack/tripleo-common/blob/master/tripleo_common/utils/parameters.py .

However the role list is hardcoded in PARAMS, and we don't provide a fallback if the role name isn't part of that list.

https://github.com/openstack/tripleo-common/blob/30d023/tripleo_common/utils/parameters.py#L19
https://github.com/openstack/tripleo-common/blob/30d023/tripleo_common/utils/parameters.py#L70

I'm not marking this as Confirmed yet because I haven't had a chance to test with custom roles directly yet.

Revision history for this message
Jiri Tomasek (jtomasek) wrote :

I can confirm that when assigning node to the custom role via GUI, the tag_nodes workflow fails on
tripleo.parameters.update_role action and fails to set Count and Flavor parameters for that Role.

[1] https://github.com/openstack/tripleo-common/blob/30d023702a66c42f00b82854e8d25dfec403bd6f/workbooks/baremetal.yaml#L446

Julie Pichon (jpichon)
Changed in tripleo:
status: New → Triaged
importance: Undecided → High
Changed in tripleo:
assignee: nobody → Florian Fuchs (flo-fuchs)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

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

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/402085
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=10ee43e413a04cdb359ff9125c4f0f99ab4d5383
Submitter: Jenkins
Branch: master

commit 10ee43e413a04cdb359ff9125c4f0f99ab4d5383
Author: Florian Fuchs <email address hidden>
Date: Thu Nov 24 15:50:04 2016 +0100

    Fix parameter update for custom roles

    When updating parameters for roles, a fixed set of parameters based
    on the standard roles (Compute, Control, Ceph-Storage, ...) was used to
    name the count and flavor params. This didn't account for custom roles.

    This patch changes this to derive the parameter names based on
    convention, so updating count/flavor params for custom roles doesn't
    break.

    Change-Id: Iee172782ed8faa1eb077f43132083e5c6af67250
    Closes-Bug: #1643882

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/newton)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/newton)

Reviewed: https://review.openstack.org/402725
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=0b91362f0f23961de16f40929beb85132d1f70a6
Submitter: Jenkins
Branch: stable/newton

commit 0b91362f0f23961de16f40929beb85132d1f70a6
Author: Florian Fuchs <email address hidden>
Date: Fri Nov 25 15:58:57 2016 +0100

    Fix parameter update for custom roles

    When updating parameters for roles, a fixed set of parameters based
    on the standard roles (Compute, Control, Ceph-Storage, ...) was used to
    name the count and flavor params. This didn't account for custom roles.

    This patch changes this to derive the parameter names based on
    convention, so updating count/flavor params for custom roles doesn't
    break.

    Change-Id: Iee172782ed8faa1eb077f43132083e5c6af67250
    Closes-Bug: #1643882
    (cherry picked from commit 10ee43e413a04cdb359ff9125c4f0f99ab4d5383)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 5.6.0

This issue was fixed in the openstack/tripleo-common 5.6.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 5.4.1

This issue was fixed in the openstack/tripleo-common 5.4.1 release.

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.