stx-tools: yum fails in Docker with misleading error messages

Bug #1908088 reported by Davlet Panech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Davlet Panech

Bug Description

Brief Description
-----------------
"yum install" in Dockerfile used by tb.sh sometimes fails with misleading error messages.

Severity
--------
Minor

Steps to Reproduce
------------------
./tb.sh create

It doesn't happen every time. In fact, I can't reproduce it with "tb.sh" specifically, but our automated build system uses the same docker file, which sometimes fails with "HTTPS 302" error.
I think the "HTTPS 302" error is displayed in place of the actual error that happens after the redirect, ie. the initial request returns 302, but the secondary HTTPS request returns something like status 501. Yet yum displays status 302 in this case. 302 means "redirection", which shouldn't fail at all.

Expected Behavior
------------------
"docker build" or "tb.sh create" succeeds.

Actual Behavior
----------------
yum install fails with "HTTPS Error 302 - Found"

Reproducibility
---------------
Intermittent

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

Branch/Pull Time/Commit
-----------------------
N/A

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

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

docker build ...
...
Step 15/49 : RUN groupadd -g 751 cgts && echo "mock:x:751:root" >> /etc/group && echo "mockbuild:x:9001:" >> /etc/group && yum install -y anaconda anaconda-runtime autoconf-archive autogen automake bc bind bind-utils bison cpanminus createrepo createrepo_c deltarpm docker-client expat-devel flex isomd5sum gcc gettext git libguestfs-tools libtool libxml2 lighttpd lighttpd-fastcgi lighttpd-mod_geoip net-tools mkisofs http://mirror.starlingx.cengn.ca/mirror/centos/epel/dl.fedoraproject.org/pub/epel/7/x86_64/Packages/m/mock-1.4.16-1.el7.noarch.rpm http://mirror.starlingx.cengn.ca/mirror/centos/epel/dl.fedoraproject.org/pub/epel/7/x86_64/Packages/m/mock-core-configs-31.6-1.el7.noarch.rpm mongodb mongodb-server pax perl-CPAN python-deltarpm python-pep8 python-pip python-psutil python2-psutil python36-psutil python3-devel python-sphinx python-subunit python-testrepository python-tox python-yaml python2-ruamel-yaml postgresql qemu-kvm quilt rpm-build rpm-sign rpm-python squashfs-tools sudo systemd syslinux udisks2 vim-enhanced wget
...
Dependencies Resolved

================================================================================
 Package Arch Version Repository Size
================================================================================
Installing:
 PyYAML x86_64 3.10-11.el7 centos-os 153 k
 anaconda x86_64 21.48.22.158-1.el7.centos
                                                            centos-os 201 k
...
Install 55 Packages (+625 Dependent packages)

Total size: 569 M
Total download size: 568 M
Installed size: 1.7 G
Downloading packages:
No Presto metadata available for centos-os
http://vault.centos.org/centos/7.8.2003/os/x86_64/Packages/alsa-lib-1.1.8-1.el7.x86_64.rpm: [Errno 14] HTTPS Error 302 - Found
Trying other mirror.
http://vault.centos.org/centos/7.8.2003/os/x86_64/Packages/anaconda-widgets-21.48.22.158-1.el7.centos.x86_64.rpm: [Errno 14] HTTPS Error 302 - Found
Trying other mirror.
http://vault.centos.org/centos/7.8.2003/os/x86_64/Packages/at-spi2-core-2.28.0-1.el7.x86_64.rpm: [Errno 14] HTTPS Error 302 - Found
Trying other mirror.
http://vault.centos.org/centos/7.8.2003/os/x86_64/Packages/attr-2.4.46-13.el7.x86_64.rpm: [Errno 14] HTTPS Error 302 - Found
Trying other mirror.


Test Activity
-------------
Build

Workaround
----------
retry the build

Davlet Panech (dpanech)
Changed in starlingx:
assignee: nobody → Davlet Panech (dpanech)
status: New → In Progress
Revision history for this message
Davlet Panech (dpanech) wrote :

Fix merged to starlingx/tools - master:

https://review.opendev.org/c/starlingx/tools/+/766966

Changed in starlingx:
status: In Progress → Fix Committed
Ghada Khalil (gkhalil)
tags: added: stx.build
Changed in starlingx:
importance: Undecided → Low
status: Fix Committed → Opinion
status: Opinion → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tools (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/tools/+/786143

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tools (f/centos8)

Reviewed: https://review.opendev.org/c/starlingx/tools/+/786143
Committed: https://opendev.org/starlingx/tools/commit/4846c4c5dcb23881844d31db121e3587f416c27a
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 4846c4c5dcb23881844d31db121e3587f416c27a
Author: Davlet Panech <email address hidden>
Date: Mon Dec 14 10:01:45 2020 -0500

    Update CentOS vault URL to HTTPS

    CentOS vault HTTP url redirects to HTTPS, but yum displays misleading
    error messages when the secondary HTTPS request fails.
    Use HTTPS directly.

    Closes-Bug: 1908088
    Signed-off-by: Davlet Panech <email address hidden>
    (cherry picked from commit 1f3f3e08bc8fa33cf34541f408df4975c787367b)
    Change-Id: I97242d3ab1dc727028b0aa7a05dad288f0b7cd5c

tags: added: in-f-centos8
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tools (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/tools/+/792229

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tools (f/centos8)

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/tools/+/792229
Reason: Updated merge coming

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tools (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/tools/+/793627

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tools (f/centos8)
Download full text (30.4 KiB)

Reviewed: https://review.opendev.org/c/starlingx/tools/+/793627
Committed: https://opendev.org/starlingx/tools/commit/d701c6f896dfe440566cc942e3dd71be1f19ae5d
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 7b5f3a45e663866a3c0ca3ca86eb3c92bc7f0210
Author: Scott Little <email address hidden>
Date: Wed May 5 09:56:33 2021 -0400

    fix bad flockflock url pt 2

    A stray '}' character found it's way into my prior update
    titled 'fix bad flockflock url' after testing. The result was
    the following error

    sed: -e expression #1, char 15: unexpected `}'

    This removes the unwanted '}', restoring the prior update
    to its intended form.

    Closes-bug: 1926987
    Signed-off-by: Scott Little <email address hidden>
    Change-Id: I48f4721ccaf121679916b01747243deedf5836cd

commit ac05493480f6df6f31d071d29380c1b4f35b70a9
Author: Scott Little <email address hidden>
Date: Tue May 4 12:42:36 2021 -0400

    fix git-review within docker build environment

    'tb create' fails to create a build environment since
    upstream git-review was updated of Apr 26.

    Fix is to install/update pbr ahead of git-review.

    Also, to reduce the likelyhood of this recurring, lock
    down specific versions of the pypi supplied tools we
    know to work.

    Closes-bug: 1927137
    Signed-off-by: Scott Little <email address hidden>
    Change-Id: Ib9fe6fd33de4d637f254ac421cc0427ee6131b65

commit b96ebc83d859a4a7802a462504817ecec6182a7b
Author: Scott Little <email address hidden>
Date: Mon May 3 13:16:53 2021 -0400

    fix bad flockflock url

    download_mirror.sh fails due to a bad path containing
    ‘stx-tools/centos-mirror-tools/config/centos/flockflock’

    The path is constructed, and the trigger is when an EOL is missing
    from a centos_build_layer.cfg file, causing 'cat' to merge the last
    line of the offending file with the first line of the next file.

    Switch 'cat' to 'grep', which will always ensure an EOL is present.
    Along the way, we can filter out empty lines and comments.

    Closes-bug: 1926987
    Signed-off-by: Scott Little <email address hidden>
    Change-Id: I2404b3415f0f3e2f395c2bcb7a527aa01a488f61

commit 4c3ee114bcbff710c2049626044dd1ddc756cbd9
Author: Joe Slater <email address hidden>
Date: Tue Apr 27 18:50:53 2021 -0400

    screen: fix CVE-2021-26937 segfault

    Advance to screen-4.1.0-0.27.20120314git3c2946.el7_9.x86_64.rpm.

    Closes-bug: 1926372
    Change-Id: I41834e7b1e16153b0632751f59f7ac9f503389da
    Signed-off-by: Joe Slater <email address hidden>

commit e31e0dda7a4c09143d41cd518ab97ea6112d7fb5
Author: Li Zhou <email address hidden>
Date: Tue Apr 13 04:53:50 2021 -0400

    systemd: Upgrade to version 219-78.el7_9.3

    Refer the lst entries to the new version.

    Partial-Bug: #1924691
    Signed-off-by: Li Zhou <email address hidden>
    Change-Id: I557eff6a47f341cc67de02fd59024b28bb6cac84

commit 26db2859dd3a5c060c337b886fd16c4d2d9f93af
Author: Scott Little <email address hidden>
Date: Mon Apr 12 11:21:31 2021 -0400

    Replace basearch references in y...

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.