After apply label to image, labels keep on SystemController and cannot be removed

Bug #1890299 reported by Difu Hu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Teresa Ho

Bug Description

Brief Description
-----------------
after apply label to image, the label keeps on SystemController and cannot be removed
The labels on SystemController then can be applied to image, even if no label is on subclouds.
(removing label from subcloud doesn't make label get removed from SystemController.
Label is still there even image is deleted.)
only "system --os-region-name SystemController device-image-remove" can get the label removed on SystemController.

Severity
--------
Major

Steps to Reproduce
------------------
apply label to image: system --os-region-name SystemController device-image-apply 4868ef33-bbe3-44a0-8d8b-a0454a726bfa subcloud=abc
system --os-region-name SystemController device-image-delete 4868ef33-bbe3-44a0-8d8b-a0454a726bfa

Expected Behavior
------------------
not sure

Actual Behavior
----------------
subcloud=abc appears on SystemController, and cannot be removed later

Reproducibility
---------------
permanent

System Configuration
--------------------
Lab-name: DC-3

Branch/Pull Time/Commit
-----------------------
2020-07-31_20-00-00

Last Pass
---------
N/A

Timestamp/Logs
--------------
[sysadmin@controller-0 ~(keystone_admin)]$ system device-label-list
+----------+--------+-----------+-------------+
| hostname | PCI | label key | label value |
| | device | | |
| | name | | |
+----------+--------+-----------+-------------+
| | | subcloud | abc |

Label is still there even image is deleted.
system --os-region-name SystemController device-image-delete 4868ef33-bbe3-44a0-8d8b-a0454a726bfa

Test Activity
-------------
Functional Testing

Difu Hu (difuhu)
summary: - after apply label to image, labels keep on controller and cannot be
- removed
+ after apply label to image, labels keep on SystemController and cannot
+ be removed
description: updated
Difu Hu (difuhu)
description: updated
description: updated
Difu Hu (difuhu)
description: updated
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as stx.5.0 - issue related to DC FPGA Orchestration feature

tags: added: stx.5.0 stx.distcloud stx.fpga
Revision history for this message
Chris Friesen (cbf123) wrote :

Per Difu, " system --os-region-name SystemController device-image-remove" will remove the label on SystemController.

But deleting the device image doesn't delete the label.

Ghada Khalil (gkhalil)
summary: - after apply label to image, labels keep on SystemController and cannot
+ After apply label to image, labels keep on SystemController and cannot
be removed
Difu Hu (difuhu)
description: updated
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Teresa Ho (teresaho)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/744906
Committed: https://git.openstack.org/cgit/starlingx/config/commit/?id=c8e814320f545191959015a5631b7526fc862ec6
Submitter: Zuul
Branch: master

commit c8e814320f545191959015a5631b7526fc862ec6
Author: Teresa Ho <email address hidden>
Date: Wed Aug 5 09:04:19 2020 -0400

    Fix label usage in device image commands

    When an image is deleted, the device labels that are used to apply
    the image and are not associated with any physical hardware are not removed.
    The commit removes the device label if it is the last image associated
    with the label and it is not associated with physical hardware.

    The device image apply with multiple labels of the same device
    for root-key image was incorrectly blocked. This update corrects
    the validation of this case.

    Closes-Bug: 1890299
    Closes-Bug: 1890324
    Closes-Bug: 1890340

    Change-Id: Iaa34b9fe57678d6283a4cce4a30d7df4673ec996
    Signed-off-by: Teresa Ho <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Difu Hu (difuhu) wrote :

Verified on build 2020-08-06_20-00-00.

tags: removed: stx.retestneeded
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.