Skip to content

Commit

Permalink
quadlet: Drop the SocketActivated key
Browse files Browse the repository at this point in the history
This was added in the old quadlet to work around issues with podman
not passing on notify fds and pids. However, these are now fixed with:

containers#11316
openSUSE/catatonit#15

So, remove this key (which was never in a podman release anyway)

Signed-off-by: Alexander Larsson <alexl@redhat.com>
  • Loading branch information
alexlarsson committed Oct 20, 2022
1 parent cdbfa76 commit 60d5392
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
14 changes: 0 additions & 14 deletions pkg/systemd/quadlet/quadlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const (
KeyRemapUIDRanges = "RemapUidRanges"
KeyRemapGIDRanges = "RemapGidRanges"
KeyNotify = "Notify"
KeySocketActivated = "SocketActivated"
KeyExposeHostPort = "ExposeHostPort"
KeyPublishPort = "PublishPort"
KeyKeepID = "KeepId"
Expand Down Expand Up @@ -89,7 +88,6 @@ var supportedContainerKeys = map[string]bool{
KeyRemapUIDRanges: true,
KeyRemapGIDRanges: true,
KeyNotify: true,
KeySocketActivated: true,
KeyExposeHostPort: true,
KeyPublishPort: true,
KeyKeepID: true,
Expand Down Expand Up @@ -428,18 +426,6 @@ func ConvertContainer(container *parser.UnitFile, isUser bool) (*parser.UnitFile
podman.add("--read-only-tmpfs=false")
}

socketActivated := container.LookupBoolean(ContainerGroup, KeySocketActivated, false)
if socketActivated {
// TODO: This will not be needed with later podman versions that support activation directly:
// https://github.com/containers/podman/pull/11316
podman.add("--preserve-fds=1")
podmanEnv["LISTEN_FDS"] = "1"

// TODO: This will not be 2 when catatonit forwards fds:
// https://github.com/openSUSE/catatonit/pull/15
podmanEnv["LISTEN_PID"] = "2"
}

defaultContainerUID := uint32(0)
defaultContainerGID := uint32(0)

Expand Down
9 changes: 0 additions & 9 deletions test/e2e/quadlet/socketactivated.container

This file was deleted.

1 change: 0 additions & 1 deletion test/e2e/quadlet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ var _ = Describe("quadlet system generator", func() {
Entry("readonly-notmpfs.container", "readonly-notmpfs.container"),
Entry("readwrite.container", "readwrite.container"),
Entry("readwrite-notmpfs.container", "readwrite-notmpfs.container"),
Entry("socketactivated.container", "socketactivated.container"),
Entry("shortname.container", "shortname.container"),
Entry("timezone.container", "timezone.container"),
Entry("user.container", "user.container"),
Expand Down

0 comments on commit 60d5392

Please sign in to comment.