tools: Dockerfile: yum install silently ignores errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Davlet Panech |
Bug Description
Brief Description
-----------------
tb.sh sometimes silently ignores "yum install" errors in its Dockerfile; the symptoms are different depending on which package(s) failed to install. This is caused by a (mis-)feature of rpm/yum: when installing multiple packages in one transaction, it reports success if at least one package installed successfully.
In particular, it occasionally fails to install packages from CENGN mirrors, if that site is down.
Severity
--------
Minor
Steps to Reproduce
------------------
Run "tb.sh create"
Expected Behavior
------------------
tb.sh succeeds
Actual Behavior
----------------
Depending on which packages failed to install:
- tb.sh seemingly succeeds, but some packages are missing in the container
- tb.sh fails with seemingly unrelated errors stemming from subsequent commands in Dockerfile
Reproducibility
---------------
Intermittent
System Configuration
-------
N/A
Branch/Pull Time/Commit
-------
Branch: master
Date: 2021-01-21 13:00:00 -0500
Last Pass
---------
N/A
Timestamp/Logs
--------------
The following docker step seemingly succeeds (but not really)
...
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://
...
followed by this error:
Step 31/49 : RUN useradd -s /sbin/nologin -u 9001 -g 9001 mockbuild && rmdir /var/lib/mock && ln -s /localdisk/
---> Running in a5bbe1a983a4
rmdir: failed to remove '/var/lib/mock': No such file or directory
Test Activity
-------------
Build
Workaround
----------
Retry the build
CVE References
- 2016-10739
- 2017-6519
- 2018-10360
- 2018-1116
- 2018-1122
- 2018-12404
- 2018-1312
- 2018-13139
- 2018-14348
- 2018-14498
- 2018-15473
- 2018-17199
- 2018-18384
- 2018-19519
- 2018-4700
- 2018-5741
- 2018-5742
- 2018-5743
- 2018-8905
- 2019-0220
- 2019-10160
- 2019-10218
- 2019-11068
- 2019-11745
- 2019-12735
- 2019-13232
- 2019-13734
- 2019-16056
- 2019-17006
- 2019-3813
- 2019-3880
- 2019-5482
- 2019-6477
- 2019-9636
- 2019-9924
- 2019-9948
- 2020-0549
- 2020-10772
- 2020-10878
- 2020-12049
- 2020-12663
- 2020-5208
- 2020-6851
- 2020-8112
- 2020-8617
- 2021-26937
tags: |
added: stx.build removed: build |
Changed in starlingx: | |
status: | Fix Committed → Fix Released |
minor - This tracks better build return errors if the mirror is down.