Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 15 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down