From fd53a3ee111a3312a2bd1d5d6eb57c752bcdd611 Mon Sep 17 00:00:00 2001 From: mbussolotto Date: Wed, 17 Apr 2024 15:15:59 +0200 Subject: [PATCH] podman-mount* flag should be used only on server installation --- mgradm/cmd/migrate/podman/podman.go | 2 +- mgradm/cmd/upgrade/podman/podman.go | 2 +- mgrpxy/cmd/install/podman/podman.go | 2 +- shared/podman/utils.go | 8 ++++++-- uyuni-tools.changes.mbussolotto.path_volume_flag | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 uyuni-tools.changes.mbussolotto.path_volume_flag diff --git a/mgradm/cmd/migrate/podman/podman.go b/mgradm/cmd/migrate/podman/podman.go index de506e6b8..20c1ecd8c 100644 --- a/mgradm/cmd/migrate/podman/podman.go +++ b/mgradm/cmd/migrate/podman/podman.go @@ -41,7 +41,7 @@ NOTE: migrating to a remote podman is not supported yet! } shared.AddMigrateFlags(migrateCmd) - podman_utils.AddPodmanInstallFlag(migrateCmd) + podman_utils.AddPodmanArgFlag(migrateCmd) return migrateCmd } diff --git a/mgradm/cmd/upgrade/podman/podman.go b/mgradm/cmd/upgrade/podman/podman.go index 14ee2e042..a5c92cdcb 100644 --- a/mgradm/cmd/upgrade/podman/podman.go +++ b/mgradm/cmd/upgrade/podman/podman.go @@ -53,7 +53,7 @@ func NewCommand(globalFlags *types.GlobalFlags) *cobra.Command { upgradeCmd.AddCommand(listCmd) shared.AddUpgradeFlags(upgradeCmd) - podman.AddPodmanInstallFlag(upgradeCmd) + podman.AddPodmanArgFlag(upgradeCmd) return upgradeCmd } diff --git a/mgrpxy/cmd/install/podman/podman.go b/mgrpxy/cmd/install/podman/podman.go index fd55e7ab1..ddba27e40 100644 --- a/mgrpxy/cmd/install/podman/podman.go +++ b/mgrpxy/cmd/install/podman/podman.go @@ -40,7 +40,7 @@ NOTE: for now installing on a remote podman is not supported! } utils.AddInstallFlags(podmanCmd) - podman.AddPodmanInstallFlag(podmanCmd) + podman.AddPodmanArgFlag(podmanCmd) return podmanCmd } diff --git a/shared/podman/utils.go b/shared/podman/utils.go index e72e83d44..4cb07d00d 100644 --- a/shared/podman/utils.go +++ b/shared/podman/utils.go @@ -42,10 +42,14 @@ type PodmanMountFlags struct { Spacewalk string } -// AddPodmanInstallFlag add the podman arguments to a command. -func AddPodmanInstallFlag(cmd *cobra.Command) { +// AddPodmanArgFlag add the podman arguments to a command. +func AddPodmanArgFlag(cmd *cobra.Command) { cmd.Flags().StringSlice("podman-arg", []string{}, L("Extra arguments to pass to podman")) +} +// AddPodmanInstallFlag add the podman install arguments to a command. +func AddPodmanInstallFlag(cmd *cobra.Command) { + AddPodmanArgFlag(cmd) cmd.Flags().String("podman-mount-cache", "", L("Path to custom /var/cache volume")) cmd.Flags().String("podman-mount-postgresql", "", L("Path to custom /var/lib/pgsql volume")) cmd.Flags().String("podman-mount-spacewalk", "", L("Path to custom /var/spacewalk volume")) diff --git a/uyuni-tools.changes.mbussolotto.path_volume_flag b/uyuni-tools.changes.mbussolotto.path_volume_flag new file mode 100644 index 000000000..ef50709c0 --- /dev/null +++ b/uyuni-tools.changes.mbussolotto.path_volume_flag @@ -0,0 +1 @@ +- podman-mount* flag should be used only on server installation