Files
Paul Holzinger e82d196269 pkg/machine: make checkExclusiveActiveVM race free
We need to take another lock to prevent concurrent starts from different
machines.

I manually tested it by starting three VM in parallel with:
podman machine start & podman machine start test1 & podman machine start test2

I also added a CI test that seems to work as expected (failed with the
old binary, worked with the new)

Before this patch I was able to start more than VM, with this patch it
now only starts one of them and the other ones will fail to start with
a proper error.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-14 11:13:08 +01:00
..
2024-02-19 15:23:56 -05:00
2023-02-11 18:23:24 +01:00
2024-02-15 21:05:17 -06:00
2024-03-06 19:41:11 +09:00
2024-02-15 21:05:17 -06:00
2024-02-07 09:19:16 -06:00

Working README for running the machine tests

Note: you must not have any machines defined before running tests

Linux

QEMU

make localmachine

Microsoft Windows

HyperV

  1. Open a powershell as admin
  2. $env:CONTAINERS_MACHINE_PROVIDER="hyperv"
  3. ./winmake localmachine

Note: To run specific test files, add the test files to the end of the winmake command:

./winmake localmachine "basic_test.go start_test.go"

WSL

  1. Open a powershell as a regular user
  2. Build and copy win-sshproxy into bin/
  3. ./winmake localmachine

Note: To run specific test files, add the test files to the end of the winmake command:

./winmake localmachine "basic_test.go start_test.go"

MacOS

Apple Hypervisor

  1. make podman-remote
  2. make localmachine (Add FOCUS_FILE=basic_test.go to only run basic test)