podman machine rm not locking correctly #20950
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
machine
stale-issue
podman machine uses a lockfile to synchronize access for the VM.
However if we look at the podman machine rm logic it does lock in this function but only to get the current file paths. Then it returns the paths in a function that is returned. The cli remove code then waits for the user to confirm the removal before deleting the files.
This means the actually removal of the files is not locked and it could lead to another machine command run in parallel and then having files removed while being used.
This problems seem to effect all providers.
podman/pkg/machine/qemu/machine.go
Lines 1011 to 1051 in 0a9914f
The text was updated successfully, but these errors were encountered: