check value for k8s node label

Bug #1940042 reported by Daniel Safta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Daniel Safta

Bug Description

Brief Description
-----------------
In SX system, after openstack-compute-node=disabled label added, topology manager does not work. It has only cpu manager policy arg, but no topology manager related args.
Once openstack-compute-node=disabled label is removed, things are back to normal.

Severity
--------
Major

Steps to Reproduce
------------------
system host-label-assign 1 openstack-compute-node=disabled

Expected Behavior
------------------
args like TopologyManager=true' and cpu-manager-policy should be set.

Actual Behavior
----------------

Reproducibility
---------------
Reproducible

System Configuration
--------------------
1sx

Branch/Pull Time/Commit
-----------------------
master

Last Pass
---------
Did this test scenario pass previously? If so, please indicate the load/pull time info of the last pass.
Use this section to also indicate if this is a new test scenario.

Timestamp/Logs
--------------

Test Activity
-------------

Workaround
----------

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/config/+/804828

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/804526
Committed: https://opendev.org/starlingx/config/commit/b3fcf880e9d39bac3dd7503fb92a531b88ced4ff
Submitter: "Zuul (22348)"
Branch: master

commit b3fcf880e9d39bac3dd7503fb92a531b88ced4ff
Author: Daniel Safta <email address hidden>
Date: Fri Aug 13 10:23:18 2021 +0000

    Updated hieradata with label value

    platform::kubernetes::params::host_labels
    in hieradata contains all the labels assigned
    for a node but does not contain the values
    for that keys.

    Some label values are needed in the kubernetes
    puppet code, e.g :
    ('openstack-compute-node' in $host_labels) will
    not check if the key openstack-compute-node has
    the value enabled or disabled.

    This commit fixes the bug by also providing access
    to the values in the hieradata.

    Partial-bug: 1940042
    Change-Id: Iefbcb1cde7db27250d9a3629472810d20f208248
    Signed-off-by: Daniel Safta <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-puppet (master)

Reviewed: https://review.opendev.org/c/starlingx/stx-puppet/+/804528
Committed: https://opendev.org/starlingx/stx-puppet/commit/45480fc82d642a5f9a30a5b327ea50b8f1b887bd
Submitter: "Zuul (22348)"
Branch: master

commit 45480fc82d642a5f9a30a5b327ea50b8f1b887bd
Author: Daniel Safta <email address hidden>
Date: Fri Aug 13 14:23:41 2021 +0000

    check value of kubernetes host labels

    Before this commit the logic was just based on
    checking that a key exists in the hieradata
    (e.g. openstack-compute-node) but its value was
    not available there, so the value can not be
    checked to see if it is enabled or disabled.

    Another commit added support for the values of
    the labels in the hieradata and this commmit
    addresses the changes required in the puppet
    code to make checks based on both key and
    its value.

    Closes-bug: 1940042
    Change-Id: Iefbcb1cde7db27250d9a3629472810d20f202048
    Signed-off-by: Daniel Safta <email address hidden>
    Depends-on: https://review.opendev.org/c/starlingx/config/+/804526

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/804828
Committed: https://opendev.org/starlingx/config/commit/7beece677bd9dc74e247b8deef1d39a002dd02f7
Submitter: "Zuul (22348)"
Branch: master

commit 7beece677bd9dc74e247b8deef1d39a002dd02f7
Author: Daniel Safta <email address hidden>
Date: Tue Aug 17 07:00:16 2021 +0000

    removed key entry from hieradata

    https://review.opendev.org/c/starlingx/config/+/804526
    introduced access to both key and key=value in hieradata.

    Key is no longer necessary in the hieradata and the new
    format key=value is now the default format.

    Partial-bug: 1940042
    Depends-on: https://review.opendev.org/c/starlingx/stx-puppet/+/804528
    Change-Id: I8a42886a215337860477e9f942918e684e5b0660
    Signed-off-by: Daniel Safta <email address hidden>

Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Daniel Safta (dsafta)
importance: Undecided → Medium
tags: added: stx.6.0 stx.containers
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.