Comment 3 for bug 2017916

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

Reviewed: https://review.opendev.org/c/starlingx/update/+/881741
Committed: https://opendev.org/starlingx/update/commit/4624457333733ed38012af8bf4abe446bddc1f04
Submitter: "Zuul (22348)"
Branch: master

commit 4624457333733ed38012af8bf4abe446bddc1f04
Author: Al Bailey <email address hidden>
Date: Thu Apr 27 14:58:05 2023 +0000

    Fix runtime patching error during upgrade

    During an upgrade, multiple patch directories may
    be detected, and the patch controller may attempt to
    iterate over those folders to determine the packages.

    The code that iterates over those folder can raise
     RuntimeError: dictionary changed size during iteration
    if the directory does not exist, but a package does.

    The fix is to iterate over the copy of the list.

    This issue only occurs in a duplex env, when the neighbor
    sync is being done. It will be encountered when a patch
    import is invoked after the older directory is removed.

    Test Plan:
       AIO-DX create multiple folders under /var/www/pages/feed
      and trigger a patch-import

    Closes-Bug: #2017916
    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: Ic78d30019bdaa93b9493bf57c7122f6de7cc6dab