From 8eb7eff89992c5fc160ff7cdb03e798ff1fc4694 Mon Sep 17 00:00:00 2001 From: Jake Correnti Date: Tue, 3 Sep 2024 13:33:50 -0400 Subject: [PATCH] Add disclaimer to `podman machine info` manpage. Adds a note in the `podman machine info` manpage that clarifies that `defaultmachine` in the `podman machine info` output does not suggest that a user can set a default podman machine via system connections. Additionally adds a Podman 6.0 TODO comment to change the name of the field to `ActiveMachineConnection` to better describe its purpose. [NO NEW TESTS NEEDED] Signed-off-by: Jake Correnti --- docs/source/markdown/podman-machine-info.1.md | 6 ++++++ pkg/domain/entities/machine.go | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/source/markdown/podman-machine-info.1.md b/docs/source/markdown/podman-machine-info.1.md index 2cc85e100f..320afc7733 100644 --- a/docs/source/markdown/podman-machine-info.1.md +++ b/docs/source/markdown/podman-machine-info.1.md @@ -11,6 +11,12 @@ podman\-machine\-info - Display machine host info Display information pertaining to the machine host. Rootless only, as all `podman machine` commands can be only be used with rootless Podman. +*Note*: The `DefaultMachine` field in the `Host` output does not suggest that +one can set a default podman machine via system connections. This value represents +the current active system connection associated with a podman machine. Regardless +of the default system connection, the default podman machine will always be +`podman-machine-default`. + ## OPTIONS #### **--format**, **-f**=*format* diff --git a/pkg/domain/entities/machine.go b/pkg/domain/entities/machine.go index 74c025db5d..c6db89d3c1 100644 --- a/pkg/domain/entities/machine.go +++ b/pkg/domain/entities/machine.go @@ -28,8 +28,14 @@ type MachineInfo struct { // MachineHostInfo contains info on the machine host type MachineHostInfo struct { - Arch string `json:"Arch"` - CurrentMachine string `json:"CurrentMachine"` + Arch string `json:"Arch"` + CurrentMachine string `json:"CurrentMachine"` + // TODO(6.0): Change `DefaultName` to `ActiveMachineConnection` to fix address + // confusion as shown in https://github.com/containers/podman/issues/23353. + // The name `DefaultMachine` can cause confusion with the user in thinking that + // they can set a default podman machine via system connections. However, + // regardless of which system connection is default, the default podman machine + // will always be podman-machine-default. DefaultMachine string `json:"DefaultMachine"` EventsDir string `json:"EventsDir"` MachineConfigDir string `json:"MachineConfigDir"`