linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: linux-integrity@vger.kernel.org
Cc: Petr Vorel <pvorel@suse.cz>, Mimi Zohar <zohar@linux.vnet.ibm.com>
Subject: [PATCH 1/1] travis: Add Docker Hub pull rate limit workaround
Date: Thu, 15 Apr 2021 14:56:30 +0200	[thread overview]
Message-ID: <20210415125630.9672-1-pvorel@suse.cz> (raw)

Use mirror.gcr.io mirror for Docker to workaround pull rate limit in
docker registry to avoid common error:
anyrequests: You have reached your pull rate limit.

This still sometimes use docker registry, which can leads to occasional
failures, but less often.

Correct solution would be to migrate to Github Actions.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi Mimi,

this expects to be applied after my 2 previous fixes ("travis: Fix
openSUSE Tumbleweed" and "tests/install-swtpm.sh: Add tar option
--no-same-owner"):
https://patchwork.kernel.org/project/linux-integrity/list/?series=467745&state=*

Tested:
https://travis-ci.org/github/pevik/ima-evm-utils/builds/767149815

Kind regards,
Petr

 .travis.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index ac6b2a5..e96e52a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -84,6 +84,17 @@ before_install:
             sudo curl -L https://github.com/opencontainers/runc/releases/download/v1.0.0-rc93/runc.amd64 -o /usr/bin/runc
             sudo chmod +x /usr/bin/runc
         fi
+
+    # Docker Hub pull rate limit workaround for docker
+    - >
+        if [ "$CONTAINER" = "docker" ]; then
+            conf="/etc/docker/daemon.json"
+            tmp=$(mktemp)
+            sudo jq '."registry-mirrors" += ["https://mirror.gcr.io"]' $conf > $tmp
+            sudo mv $tmp $conf
+            sudo systemctl daemon-reload
+            sudo systemctl restart docker
+        fi
     - $CONTAINER info
 
     - DIR="/usr/src/ima-evm-utils"
-- 
2.31.1


                 reply	other threads:[~2021-04-15 12:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210415125630.9672-1-pvorel@suse.cz \
    --to=pvorel@suse.cz \
    --cc=linux-integrity@vger.kernel.org \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).