Skip to content

Commit

Permalink
Fix Colima VM SSH hang issue by pinning QEMU to 9.0.2 (#40)
Browse files Browse the repository at this point in the history
It seems like the most recent version of QEMU is causing the SSH server inside the Colima VM to not start, which hangs all builds (see #37). I'm not exactly sure why and debugging the situation inside the action runners is kinda difficult.

With this PR I am pinning QEMU to 9.0.2, which seems to work on the runner image `macos-13`. 

Unfortunately I couldn't make it work on the runner image `macos-12`. As this is a very old macOS version, I'm dropping support for it. If one day things get fixed, I might readd it as supported.
  • Loading branch information
douglascamata authored Sep 19, 2024
1 parent ce0779f commit bdfe424
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
workflow_dispatch:
workflow_dispatch:
push:
branches:
- "main"
Expand All @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-13]
os: [macos-13]
name: A job to perform a self-test on this Github Action
steps:
# To use this repository's private action,
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ and this project adheres to [Semantic Versioning].

## [unreleased]

### Fixed

- Pin the version of QEMU to 9.0.2 to avoid an issue with version 9.1.0 that prevents the Colima VM from starting ([#40](https://github.com/douglascamata/setup-docker-macos-action/pull/40)).


### Removed

- Support for `macos-13` action runners has been removed as even with QEMU 9.0.2 the Colima VM fails to start. This might be readded in the future if the issue is fixed ([#40](https://github.com/douglascamata/setup-docker-macos-action/pull/40)).

## [v1-alpha.13] - 2024-03-18

### Fixed

- Added workaround for Python conflict in Github Action runner images ([#34](https://github.com/douglascamata/setup-docker-macos-action/pull/34))
- Added workaround for Python conflict in Github Action runner images ([#34](https://github.com/douglascamata/setup-docker-macos-action/pull/34)).

## [v1-alpha.12] - 2024-02-01

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ I intend this action to be kept as simple as possible:

# Currently supported public runner images

- `macos-12`
- `macos-13`

# ARM64 processors (M1, M2, M3 series) used on `macos-14` images are unsupported!
Expand Down
16 changes: 5 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,17 @@ runs:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
echo "::group::Installing QEMU, Docker client, and Docker Compose"
brew install docker docker-compose qemu 2>&1 | tee install.log
brew install docker docker-compose
# Installing QEMU 9.0.2 as a temporary workaround. Version 9.1.0 seems to be broken with Lima/Colima at the moment.
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/f1a9cf104a9a51779c7a532b658c490f69974839/Formula/q/qemu.rb
brew install qemu.rb 2>&1 | tee install.log
echo "::endgroup::"
shell: bash
- name: Configure Docker Compose plugin
run: |
mkdir -p ~/.docker/cli-plugins
ln -sfn "$(brew --prefix)/opt/docker-compose/bin/docker-compose" ~/.docker/cli-plugins/docker-compose
shell: bash
- name: Check QEMU version
if: inputs.upgrade-qemu != 'true'
run: |
if grep -q "qemu 8.1.0 is already installed" install.log
then
echo "Detected broken QEMU bottle installed by brew, removing and reinstalling."
brew reinstall qemu
fi
shell: bash
- name: Upgrade QEMU
if: inputs.upgrade-qemu == 'true'
env:
Expand All @@ -135,7 +129,7 @@ runs:
run: |
CPU_COUNT=$(sysctl -n hw.ncpu)
MEMORY=$(sysctl hw.memsize | awk '{print $2/1024/1024/1024}')
COLIMA_ARGS="--cpu $CPU_COUNT --memory $MEMORY"
COLIMA_ARGS="--cpu $CPU_COUNT --memory $MEMORY --arch x86_64"
if [ $COLIMA_NETWORK_ADDRESS == "true" ]
then
COLIMA_ARGS="$COLIMA_ARGS --network-address"
Expand Down

0 comments on commit bdfe424

Please sign in to comment.