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

Bug #1643882 reported by Julie Pichon on 2016-11-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
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.

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) on 2016-11-23
Changed in tripleo:
status: New → Triaged
importance: Undecided → High
Changed in tripleo:
assignee: nobody → Florian Fuchs (flo-fuchs)

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

Changed in tripleo:
status: Triaged → In Progress

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

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

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

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  Edit
Everyone can see this information.

Other bug subscribers