DC Horizon: Error to create orchestration strategy - Dictionary keys changed during iteration

Bug #1999069 reported by Enzo Candotti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Enzo Candotti

Bug Description

Brief Description
DC Horizon: Error to create orchestration strategy - Dictionary keys changed during iteration

Severity

<Critical: System/Feature is not usable after the defect>

Steps to Reproduce

Create any orchestration strategy for subclouds via Horizon

Expected Behavior

orchestration strategy should be created successfully

Actual Behavior

It fails to create any strategy type

Reproducibility

100% reproducible

System Configuration

DC

Branch/Pull Time/Commit
SW_VERSION="22.12"

Last Pass
new test scenario.

Timestamp/Logs
^[[F2022-11-09 17:42:48,412 107940 WARNING horizon.exceptions Recoverable error: dictionary keys changed during iteration
2022-11-09 17:42:48,413 107940 INFO horizon.operation_log [admin 37fa7295d7c5443c972912b72e433e46] [admin 4b130beddfe84c078164f6cae4f0d49e] [POST /dc_admin/dc_orchestration/createcloudstrategy/ 200] parameters:[{"csrfmiddlewaretoken": "biyGEamuK9TWjBO36ahgw8nFpedBT74LesuKp2urYKuSPD9JyjInVcWc0TqDng4E", "type": "patch", "to_version": "1.24.4", "target": "subcloud_group", "cloud_name": "default", "subcloud_group": "Default", "stop_on_failure": "on", "subcloud_apply_type": "parallel", "max_parallel_subclouds": "20"}] message:[error: Strategy creation failed: "dictionary keys changed during iteration".…dictionary keys changed during iteration]

Alarms

N/A

Test Activity

Feature Testing

Workaround

N/A

Changed in starlingx:
assignee: nobody → Enzo Candotti (ecandotti)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gui (master)

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

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

Reviewed: https://review.opendev.org/c/starlingx/gui/+/866872
Committed: https://opendev.org/starlingx/gui/commit/40679dc464bf39ecdc8419f055a240ac7ec31f07
Submitter: "Zuul (22348)"
Branch: master

commit 40679dc464bf39ecdc8419f055a240ac7ec31f07
Author: Enzo Candotti <email address hidden>
Date: Wed Dec 7 12:09:14 2022 -0300

    Fix 'dictionary changed size during iteration'

    The Python "RuntimeError: dictionary changed size during iteration"
    has been seen on some points, e.g. when creating a strategy.
    It occurs when the size of a dictionary is changed during iterating
    over it.

    To fix this error is needed to add a '.copy()' method to create a
    shallow copy of the dictionary.

    Test Plan:

    PASS: Apply these changes and create a strategy. Verify the strategy
    is being created successfully. Same test has been done for other
    sections.

    Closes-Bug: 1999069

    Signed-off-by: Enzo Candotti <email address hidden>
    Change-Id: I3f6dc0e27547d6439a2d14e9ba8ee6dd4f68e8be

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.8.0 stx.gui
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.