-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent multiple machines running on different providers on darwin #25139
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
the no-new-tests may be only temporary ... will decide when I remove the WIP label. |
7095a15
to
837dab0
Compare
/cherry-pick v5.4 |
@baude: once the present PR merges, I will cherry-pick it on top of In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
LGTM though a test would be lovely |
in looking at the tests, i see no easy way to do this without having a distinct possibility of really dorking up things. to me, the juice isnt worth the work, though if people really want ... |
The Kind() exported function is unused in our code; moreover, the function cannot be accurate because in the case of darwin, applehv and libkrun use the same config in the struct and therefore, we cannot identify the provider via that method. Signed-off-by: Brent Baude <[email protected]>
A function in the reset code does not return an error. Simply removing the error variable and check for the condition (which was always false or nil) Signed-off-by: Brent Baude <[email protected]>
As issue containers#25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name. This PR firstly prevents that use which is a forbidden use case. Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition. This bug fix is for darwin only. In the case of Windows, we probably need to answer the question I raised in containers#24067 first, which is whether we want to stop allowing WSL to run multiple machines. Fixes containers#25112 Signed-off-by: Brent Baude <[email protected]>
@baude could you change the tite to be a bit more descriptive please? There won't be a whole lot of context in three years about that issue number. |
LGTM |
Prevent two podman machines running on darwin
As issue #25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name. This PR firstly prevents that use which is a forbidden use case.
Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.
This bug fix is for darwin only. In the case of Windows, we probably need to answer the question I raised in #24067 first, which is whether we want to stop allowing WSL to run multiple machines.
Fixes #25112
Does this PR introduce a user-facing change?