build-tools: docker image tagging script fails due to rate limit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Davlet Panech |
Bug Description
Brief Description
-----------------
The tagging script for docker images has started to fail recently. This doesn't affect daily builds, but prevents us from creating new docker image tags, other than manually.
The script is:
It makes docker REST API calls to determine whether each tag exists, in quick succession. It uses docker's public un-authenticated API for that. It seems that recently docker added a rate limit to that API, so that one can only make a certain number of API calls per second. So the script starts to fail after the first few images and wrongly attempts to push tags that already exist in docker hub.
Most likely we need to update the script to read docker credentials from $HOME/.
Severity
--------
Major
Steps to Reproduce
------------------
Run the script in dry-run mode:
./retag-images.sh --dryrun image-tags.yaml
Expected Behavior
------------------
It should output lines similar to:
Image tag exists: docker.
for each image in the .yaml file
Actual Behavior
----------------
It outputs "Image tag exists ..." for the first few images, then attempts to push the rest of them. Apparently the "Does tag exist?" API call returns false due to a rate limit.
Reproducibility
---------------
Reproducible
System Configuration
-------
N/A
Branch/Pull Time/Commit
-------
master/2023-01-25
Last Pass
---------
Unknown
Timestamp/Logs
--------------
N/A
Test Activity
-------------
N/A
Workaround
----------
Tag and push the image manually using raw docker commands.
tags: | added: stx.build stx.tools |
Changed in starlingx: | |
assignee: | nobody → Davlet Panech (dpanech) |
importance: | Undecided → Low |
tags: | added: stx.9.0 |
Fix proposed to branch: master /review. opendev. org/c/starlingx /root/+ /882485
Review: https:/