Skip to content

.cirrus.yml: simplify for centos, retry yum#3153

Merged
thaJeztah merged 2 commits intoopencontainers:masterfrom
kolyshkin:cirrus-robust
Aug 17, 2021
Merged

.cirrus.yml: simplify for centos, retry yum#3153
thaJeztah merged 2 commits intoopencontainers:masterfrom
kolyshkin:cirrus-robust

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented Aug 12, 2021

The reason for this PR is CI fails on yum sometimes (seen twice today, last time at #3151 (comment)).

  1. Remove redundant yum commands.
  2. Add a sleep+retry on fail loop to yum.

See individual commits for details.

@kolyshkin
Copy link
Copy Markdown
Contributor Author

kolyshkin commented Aug 12, 2021

Ahhh

Error: Unable to find a match: glibc-static

Seems that powertools repo is not enabled 👎🏻

GCP images description at [1] claims that:

 - For CentOS 8 and CentOS Stream 8, the PowerTools repository is
   enabled.
 - For CentOS 7, EPEL is enabled.

Apparently,
 - we do not need epel for centos-stream-8;
 - powertools is not enabled on centos-stream-8 despite [1].

Anyway, the less yum commands the better, as we have seen those fail
sometimes due to occasional networking problems etc.

[1] https://cloud.google.com/compute/docs/images/os-details#centos
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin changed the title [WIP] .cirrus.yml: simplify centos [WIP] .cirrus.yml: simplify for centos Aug 12, 2021
@kolyshkin kolyshkin marked this pull request as ready for review August 12, 2021 07:48
@kolyshkin kolyshkin changed the title [WIP] .cirrus.yml: simplify for centos .cirrus.yml: simplify for centos, retry yum Aug 12, 2021
@kolyshkin
Copy link
Copy Markdown
Contributor Author

OK, works as intended, hope to bring down flakes.

Comment thread .cirrus.yml
# Work around dnf mirror failures by retrying a few times.
for i in $(seq 0 2); do
sleep $i
yum install -y -q gcc git iptables jq glibc-static libseccomp-devel make criu && break
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make sure to fail here when yum failed on i==2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the script is run with set -e, it will fail if yum fails on the last iteration. In case -e is not set, well, we have to add it to all scripts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's run with set -e. Yes we need to check exit code after for 🤦🏻

Thanks for catching this! Fixed, PTAL.

Add a sleep + retry loop in case yum install has failed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin requested a review from thaJeztah August 16, 2021 23:22
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit ca4433f into opencontainers:master Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants