From 5837c690aca8bcceb24fabbefaf0ef6ab8939cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Mon, 26 Oct 2026 16:51:14 +0100 Subject: [PATCH] Bypass stalled Azure APT mirror downloads Remove `azure.archive.ubuntu.com` from the runner mirror list before APT operations to avoid stalled downloads reported upstream [1]. Preserve the remaining mirrors and skip runners without `/etc/apt/apt-mirrors.txt`. Enable the workaround by default, add the opt-out input `enable_workaround_azure_mirror`, and document its behavior in `README.md`. [1] https://github.com/actions/runner-images/issues/14823 --- README.md | 13 +++++++++++++ action.yaml | 15 +++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/README.md b/README.md index 25977ec..e94e275 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,19 @@ # devstack-actions Github actions which will install OpenStack with devstack. +## Azure APT mirror workaround + +By default, the action removes `azure.archive.ubuntu.com` entries from +`/etc/apt/apt-mirrors.txt` before its first APT operation to avoid stalled +package downloads. Other mirrors and their priorities are preserved. If the +mirror-list file does not exist, the workaround is skipped. APT sources that +reference the Azure mirror directly are not changed. + +Set `enable_workaround_azure_mirror: 'false'` in the step's `with:` block to +disable the workaround. + +## Usage + Example of Github Action step: With defaults: diff --git a/action.yaml b/action.yaml index fd30b6b..b0dd244 100644 --- a/action.yaml +++ b/action.yaml @@ -13,6 +13,9 @@ inputs: log_dir: description: 'Directory for logs' default: '/tmp/devstack-logs' + enable_workaround_azure_mirror: + description: 'Enable or disable workaround for stalled Azure APT mirror downloads' + default: 'true' enable_workaround_docker_io: description: 'Enable or disable workaround for docker.io' default: 'true' @@ -25,6 +28,18 @@ runs: - name: Install python pip run: python3 -m pip install --upgrade pip shell: bash + - name: Workaround for Azure APT mirror + if: ${{ inputs.enable_workaround_azure_mirror == 'true' }} + run: | + # Slow Azure mirror downloads can exhaust the job timeout. + # See https://github.com/actions/runner-images/issues/14823 + if [[ -f /etc/apt/apt-mirrors.txt ]]; then + sudo sed -i '/azure\.archive\.ubuntu\.com/d' /etc/apt/apt-mirrors.txt + cat /etc/apt/apt-mirrors.txt + else + echo "No APT mirror list found; skipping Azure mirror workaround." + fi + shell: bash - name: Update APT cache run: sudo apt-get update shell: bash