Skip to content

Conversation

@baude
Copy link
Member

@baude baude commented Oct 15, 2025

For Podman 6, we still have providers and will continue to have a default provider for each platform. But where a platform has multiple providers, we want users to be able to cross provider boudnaries imposed in Podman 4/5. The key change is to look up virtual machines by name, as before, but to then also iterate all possible providers. As of this PR, init will still only create with the default provider, but a subsequent PR will introdouce an provider override.

I also removed the "--all-providers" command line option on podman machine ls because it no longer makes sense.

Does this PR introduce a user-facing change?


- Most podman machine commands will work by machine name regardless of provider.
- the `--all-provider` option for `machine list` is removed

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 15, 2025
@baude baude added 6.0 Breaking changes for Podman 6.0 No New Tests Allow PR to proceed without adding regression tests labels Oct 15, 2025
@baude baude removed the No New Tests Allow PR to proceed without adding regression tests label Oct 16, 2025
@Luap99 Luap99 marked this pull request as draft October 16, 2025 13:19
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2025
For Podman 6, we still have providers and will continue to have a default provider for each platform.  But where a platform has multiple providers, we want users to be able to cross provider boudnaries imposed in Podman 4/5.  The key change is to look up virtual machines by name, as before, but to then also iterate all possible providers.  As of this PR, init will still only create with the default provider, but a subsequent PR will introdouce an provider override.

I also removed the "--all-providers" command line option on `podman
machine ls` because it no longer makes sense. And I marked the all
provider list test to be skipped.

Signed-off-by: Brent Baude <bbaude@redhat.com>
@baude baude marked this pull request as ready for review October 22, 2025 19:46
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 22, 2025
Copy link
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jakecorrenti jakecorrenti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall code looks good, just a nit and a question

return nil, nil, &machineDefine.ErrVMDoesNotExist{Name: name}
}

func VMExistsOnHyperVisor(name string) (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm misunderstanding, but doesn't this function and the VMExists function above do the exact same thing just slightly different?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VMExistsOnHyperVisor checks with a providers actual hypervisor to see if a VM exists. The VMExists you refer to only checks the providers' local filesystem for machines. Perhaps VMExists could be renamed to MachineExists to clarify in the future ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, that makes more sense. I think the names are fine, honestly, I just misinterpreted what I was reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.0 Breaking changes for Podman 6.0 approved Indicates a PR has been approved by an approver from all required OWNERS files. machine release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants