Merge pull request #29086 from Luap99/machine-upgrade

fix podman machine os upgrade distro check
This commit is contained in:
Paul Holzinger
2026-07-02 17:18:00 +02:00
committed by GitHub
3 changed files with 8 additions and 2 deletions

View File

@@ -11,3 +11,7 @@ macos:
remote:
# we cannot use multiline regex so we check for serviceIsRemote in podman info
- 'serviceIsRemote:\strue'
machine:
# machine-os uses its own variant so use that to label issues with machine based on podman info
- 'variant:\spodman-machine-os'

View File

@@ -58,10 +58,10 @@ func guestOSManager() (pkgOS.Manager, error) {
return nil, fmt.Errorf("failed to read os-release file: %w", err)
}
switch {
case dist.Name == "fedora" && dist.Variant == "coreos":
case dist.Name == "fedora" && dist.Variant == "podman-machine-os":
return &pkgOS.OSTree{}, nil
default:
return nil, errors.New("unsupported OS")
return nil, fmt.Errorf("unsupported OS/Variant: %s/%s", dist.Name, dist.Variant)
}
}

View File

@@ -18,6 +18,8 @@ then the OS changes will be applied to `podman-machine-default`.
The machine must be started for this command to be run.
Note: This command is not supported with the WSL machine provider.
### UPGRADE LOGIC
The upgrade function compares the client version against the machine version using semantic versioning (major.minor