Skip to content

Commit

Permalink
Merge pull request #503 from cbosdo/2024-10-ports-preparation
Browse files Browse the repository at this point in the history
Reverts to allow forward porting from 2024.10
  • Loading branch information
deneb-alpha authored Nov 19, 2024
2 parents 3f471dc + 114f207 commit d5dbed5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
7 changes: 1 addition & 6 deletions mgradm/cmd/install/podman/podman.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package podman

import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/uyuni-project/uyuni-tools/mgradm/cmd/install/shared"
. "github.com/uyuni-project/uyuni-tools/shared/l10n"
"github.com/uyuni-project/uyuni-tools/shared/podman"
Expand All @@ -32,11 +31,7 @@ NOTE: installing on a remote podman is not supported yet!
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
var flags podmanInstallFlags
flagsUpdater := func(v *viper.Viper) {
flags.InstallFlags.Coco.IsChanged = v.IsSet("coco.replicas")
flags.InstallFlags.HubXmlrpc.IsChanged = v.IsSet("hubxmlrpc.replicas")
}
return utils.CommandHelper(globalFlags, cmd, args, &flags, flagsUpdater, run)
return utils.CommandHelper(globalFlags, cmd, args, &flags, installForPodman)

Check failure on line 34 in mgradm/cmd/install/podman/podman.go

View workflow job for this annotation

GitHub Actions / lint

not enough arguments in call to utils.CommandHelper
},
}

Expand Down
4 changes: 2 additions & 2 deletions mgradm/cmd/install/podman/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ func installForPodman(

if flags.Coco.Replicas > 0 {
if err := coco.SetupCocoContainer(
systemd, authFile, flags.Image.Registry, flags.Coco, flags.Image,
flags.DB.Name, flags.DB.Port, flags.DB.User, flags.DB.Password,
authFile, flags.Image.Registry, flags.Coco, flags.Image,
flags.Db.Name, flags.Db.Port, flags.Db.User, flags.Db.Password,

Check failure on line 133 in mgradm/cmd/install/podman/utils.go

View workflow job for this annotation

GitHub Actions / lint

flags.Db undefined (type *podmanInstallFlags has no field or method Db) (typecheck)
); err != nil {
return err
}
Expand Down
6 changes: 2 additions & 4 deletions mgradm/cmd/uninstall/podman.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ func uninstallForPodman(

podman.DeleteNetwork(!flags.Force)

err := systemd.ReloadDaemon(!flags.Force)
err := podman.ReloadDaemon(!flags.Force)

Check failure on line 72 in mgradm/cmd/uninstall/podman.go

View workflow job for this annotation

GitHub Actions / lint

undefined: podman.ReloadDaemon) (typecheck)

if !flags.Force {
log.Warn().Msg(
L("Nothing has been uninstalled, run with --force and --purge-volumes to actually uninstall and clear data"),
)
log.Warn().Msg(L("Nothing has been uninstalled, run with --force and --purge-volumes to actually uninstall and clear data"))
} else if !flags.Purge.Volumes {
log.Warn().Msg(L("Data have been kept, use podman volume commands to clear the volumes"))
}
Expand Down
9 changes: 2 additions & 7 deletions mgradm/shared/coco/coco.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ func Upgrade(
dbUser string,
dbPassword string,
) error {
if cocoFlags.Image.Name == "" {
// Don't touch the coco service in ptf if not already present.
return nil
}

if err := writeCocoServiceFiles(
systemd, authFile, registry, cocoFlags, baseImage, dbName, dbPort, dbUser, dbPassword,
authFile, registry, cocoFlags, baseImage, dbName, dbPort, dbUser, dbPassword,

Check failure on line 32 in mgradm/shared/coco/coco.go

View workflow job for this annotation

GitHub Actions / lint

not enough arguments in call to writeCocoServiceFiles

Check failure on line 32 in mgradm/shared/coco/coco.go

View workflow job for this annotation

GitHub Actions / lint

not enough arguments in call to writeCocoServiceFiles
); err != nil {
return err
}
Expand Down Expand Up @@ -128,7 +123,7 @@ func SetupCocoContainer(
dbPassword string,
) error {
if err := writeCocoServiceFiles(
systemd, authFile, registry, coco, baseImage, dbName, dbPort, dbUser, dbPassword,
authFile, registry, coco, baseImage, dbName, dbPort, dbUser, dbPassword,

Check failure on line 126 in mgradm/shared/coco/coco.go

View workflow job for this annotation

GitHub Actions / lint

not enough arguments in call to writeCocoServiceFiles

Check failure on line 126 in mgradm/shared/coco/coco.go

View workflow job for this annotation

GitHub Actions / lint

not enough arguments in call to writeCocoServiceFiles
); err != nil {
return err
}
Expand Down

0 comments on commit d5dbed5

Please sign in to comment.