Comment 5 for bug 1912682

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

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

commit b1119360cb90b186ea6e3c030c96dd924eaa9c08
Author: Davlet Panech <email address hidden>
Date: Wed Jan 27 19:06:41 2021 -0500

    Dockerfile: fail in "yum install" on missing packages

    By default "yum install" ignores packages that can't be downloaded and
    return 0 to the shell.

    In a Dockerfile such falsely successful commands are cached by
    "docker build", so that the next time we run "docker build" the
    "yum install" is not even attempted:

      # this "succeeds" and gets cached during the first "docker build",
      # even if the URL returns an error (eg DNS error or HTTP 404).
      # During a second "docker build" this bringis back the FS layer
      # from the cache and doesn't attempt to re-download the package
      # from that URL
      RUN yum install python3 http://some/url.rpm
      ...

    This patch avoids the problem in case CENGN mirror is down.

    Closes-Bug: 1912682
    Signed-off-by: Davlet Panech <email address hidden>
    (cherry picked from commit 511859ef18129b3ac830c9f609f0324996e7c432)
    Change-Id: Ia4abcce3e2bc697e01aa194ebbf3146959f827e6