downloader: unexpected error if the repomgr.stx_mirror_strategy=upstream

Bug #2044987 reported by Jackie Huang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Jackie Huang

Bug Description

Brief Description
-----------------
Setting repomgr.stx_mirror_strategy to "upstream", then the downloader failed with:
NameError: name 'urstx_mirror' is not defined

Severity
--------
Minor

Steps to Reproduce
------------------
(1)
stx config --add repomgr.stx_mirror_strategy upstream
stx config --upgrade

(2) Check stx.conf
grep stx_mirror_strategy stx.conf

(3) Run download in builder pod
downloader

Expected Behavior
------------------
downloader run successfully

Actual Behavior
----------------
Traceback (most recent call last):
  File "/localdisk/designer/jhuang0/prj-stx-deb/cgcs-root/build-tools/stx/downloader", line 740, in <module>
    binary_dl.start()
  File "/localdisk/designer/jhuang0/prj-stx-deb/cgcs-root/build-tools/stx/downloader", line 557, in start
    self.download_list_files(repo, self.layer_binaries[layer])
  File "/localdisk/designer/jhuang0/prj-stx-deb/cgcs-root/build-tools/stx/downloader", line 407, in download_list_files
    self.download_list(repo, pkg_data)
  File "/localdisk/designer/jhuang0/prj-stx-deb/cgcs-root/build-tools/stx/downloader", line 464, in download_list
    ret = self.download(debnames[0], debnames[1], url)
  File "/localdisk/designer/jhuang0/prj-stx-deb/cgcs-root/build-tools/stx/downloader", line 279, in download
    (dl_url, alt_dl_url) = utils.get_download_url(url, STX_MIRROR_STRATEGY)
  File "/localdisk/designer/jhuang0/prj-stx-deb/cgcs-root/build-tools/stx/utils.py", line 199, in get_download_url
    rt_url = urstx_mirror
NameError: name 'urstx_mirror' is not defined

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

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
master/2023-11-28

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

Timestamp/Logs
--------------
N/A

Test Activity
-------------
N/A

Workaround
----------
N/A

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

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

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

Reviewed: https://review.opendev.org/c/starlingx/root/+/903132
Committed: https://opendev.org/starlingx/root/commit/d9705916d19a91d52926fb67eebbae1237d7cc15
Submitter: "Zuul (22348)"
Branch: master

commit d9705916d19a91d52926fb67eebbae1237d7cc15
Author: Jackie Huang <email address hidden>
Date: Fri Dec 8 15:42:04 2023 +0800

    iutils.py: fix typo for upstream url

    'urstx_mirror' doesn't exist and was introduced
    in previous commit.

    Closes-bug: 2044987

    Change-Id: I020acd6c8fb0c0aab0911542f8f1af4d27be9b2c
    Signed-off-by: Jackie Huang <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.9.0
Changed in starlingx:
assignee: nobody → Jackie Huang (jackie-huang)
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.