diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-12-01 09:31:14 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-12-01 09:41:37 +0100 |
commit | 391248456970e736513428dbaed2b575675fb107 (patch) | |
tree | b796208d249110ca79ae8b8194a6cb81c38c5d39 /pkg | |
parent | 31bc3586be57f459bc30124ce6dbca98f98836e8 (diff) | |
download | podman-391248456970e736513428dbaed2b575675fb107.tar.gz podman-391248456970e736513428dbaed2b575675fb107.tar.bz2 podman-391248456970e736513428dbaed2b575675fb107.zip |
systemd: replace multi-user with default.target
Replace multi-user.target with default.target across the code base.
It seems like the multi-user one is not available for (rootless) users
on F35 anymore is causing issues in all kinds of ways, for instance,
enabling the podman.service or generated systemd units.
Backport of commit 9a10e2124bb11027fc71db4c495c116277b8b7e3.
Fixes: #12438
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/machine/ignition.go | 4 | ||||
-rw-r--r-- | pkg/systemd/generate/containers.go | 2 | ||||
-rw-r--r-- | pkg/systemd/generate/containers_test.go | 38 | ||||
-rw-r--r-- | pkg/systemd/generate/pods.go | 2 | ||||
-rw-r--r-- | pkg/systemd/generate/pods_test.go | 10 |
5 files changed, 28 insertions, 28 deletions
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index 42d729458..ef6c741cd 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -89,7 +89,7 @@ Type=oneshot RemainAfterExit=yes ExecStart=/bin/sh -c '/usr/bin/echo Ready >/dev/%s' [Install] -RequiredBy=multi-user.target +RequiredBy=default.target ` deMoby := `[Unit] Description=Remove moby-engine @@ -106,7 +106,7 @@ ExecStart=/usr/bin/rpm-ostree ex apply-live --allow-replacement ExecStartPost=/bin/touch /var/lib/%N.stamp [Install] -WantedBy=multi-user.target +WantedBy=default.target ` _ = ready ignSystemd := Systemd{ diff --git a/pkg/systemd/generate/containers.go b/pkg/systemd/generate/containers.go index 037652a6d..e17993cfb 100644 --- a/pkg/systemd/generate/containers.go +++ b/pkg/systemd/generate/containers.go @@ -127,7 +127,7 @@ NotifyAccess={{{{.NotifyAccess}}}} {{{{- end}}}} [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` // ContainerUnit generates a systemd unit for the specified container. Based diff --git a/pkg/systemd/generate/containers_test.go b/pkg/systemd/generate/containers_test.go index f46513459..81693f5ad 100644 --- a/pkg/systemd/generate/containers_test.go +++ b/pkg/systemd/generate/containers_test.go @@ -61,7 +61,7 @@ PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodID := serviceInfo + headerInfo + goodIDContent goodIDNoHeaderInfo := serviceInfo + goodIDContent @@ -87,7 +87,7 @@ PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNameBoundTo := `# container-foobar.service @@ -113,7 +113,7 @@ PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodWithNameAndGeneric := `# jadda-jadda.service @@ -138,7 +138,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodWithNameAndSdnotify := `# jadda-jadda.service @@ -163,7 +163,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodWithExplicitShortDetachParam := `# jadda-jadda.service @@ -188,7 +188,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNameNewWithPodFile := `# jadda-jadda.service @@ -213,7 +213,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNameNewDetach := `# jadda-jadda.service @@ -238,7 +238,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodIDNew := `# container-639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401.service @@ -263,7 +263,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` genGoodNewDetach := func(detachparam string) string { @@ -291,7 +291,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` return goodNewDetach } @@ -318,7 +318,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNewRootFlags := `# jadda-jadda.service @@ -343,7 +343,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodContainerCreate := `# jadda-jadda.service @@ -368,7 +368,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNewWithJournaldTag := `# jadda-jadda.service @@ -393,7 +393,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNewWithSpecialChars := `# jadda-jadda.service @@ -418,7 +418,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNewWithIDFiles := `# jadda-jadda.service @@ -443,7 +443,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNewWithPodIDFiles := `# jadda-jadda.service @@ -468,7 +468,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNewWithEnvar := `# jadda-jadda.service @@ -494,7 +494,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` goodNewWithRestartPolicy := `# jadda-jadda.service @@ -520,7 +520,7 @@ Type=notify NotifyAccess=all [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` tests := []struct { name string diff --git a/pkg/systemd/generate/pods.go b/pkg/systemd/generate/pods.go index e755b8eea..82cd12c8f 100644 --- a/pkg/systemd/generate/pods.go +++ b/pkg/systemd/generate/pods.go @@ -101,7 +101,7 @@ PIDFile={{{{.PIDFile}}}} Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` // PodUnits generates systemd units for the specified pod and its containers. diff --git a/pkg/systemd/generate/pods_test.go b/pkg/systemd/generate/pods_test.go index c565a30ed..612908991 100644 --- a/pkg/systemd/generate/pods_test.go +++ b/pkg/systemd/generate/pods_test.go @@ -62,7 +62,7 @@ PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` podGood := serviceInfo + headerInfo + podContent podGoodNoHeaderInfo := serviceInfo + podContent @@ -92,7 +92,7 @@ PIDFile=%t/pod-123abc.pid Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` podGoodNamedNewWithRootArgs := `# pod-123abc.service @@ -120,7 +120,7 @@ PIDFile=%t/pod-123abc.pid Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` podGoodNamedNewWithReplaceFalse := `# pod-123abc.service @@ -148,7 +148,7 @@ PIDFile=%t/pod-123abc.pid Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` podNewLabelWithCurlyBraces := `# pod-123abc.service @@ -176,7 +176,7 @@ PIDFile=%t/pod-123abc.pid Type=forking [Install] -WantedBy=multi-user.target default.target +WantedBy=default.target ` tests := []struct { |