Skip to content

update all-in-one systemd, use podman generated ExecStart|Stop#315

Merged
rootfs merged 1 commit intoopenshift:mainfrom
sallyom:systemd-unit-update-aio
Sep 28, 2021
Merged

update all-in-one systemd, use podman generated ExecStart|Stop#315
rootfs merged 1 commit intoopenshift:mainfrom
sallyom:systemd-unit-update-aio

Conversation

@sallyom
Copy link
Copy Markdown
Contributor

@sallyom sallyom commented Sep 28, 2021

Signed-off-by: Sally O'Malley somalley@redhat.com

Which issue(s) this PR addresses:
follow-up for #276

This PR updates the systemd ExecStart|Stop commands to be in line with podman generate systemd --new --name ctrID. The --new flag creates and uses a --cid-file & --pid-file to ensure container is removed upon stop so that when service is enabled and starts with machine start, the podman cmd will not fail due to container with name microshift-aio already exists

Note: The unit file is generated with Podman 3.3.1 and adds

Type=notify
NotifyAccess=all

also adds the --sdnotify=conmon --cgroups=no-conmon flags to the podman run cmd.

older versions of podman generate this:

Type=forking

Signed-off-by: Sally O'Malley <somalley@redhat.com>
@sallyom
Copy link
Copy Markdown
Contributor Author

sallyom commented Sep 28, 2021

/assign @fzdarsky

I confirmed with VM restart that there are no issues with service startup. I also asked in slack w/ container-engines people if the Type=notify is only with the most recent podman version. Last time (last week) I used podman generate systemd it produces a unit file with Type=forking 🤷
EDIT:
This is indeed new, podman recently updated the type to notify because notify supports more use cases. This will not cause an issue if machine has older version of podman, I checked back to podman 2.2.1 at least.

@rootfs
Copy link
Copy Markdown
Member

rootfs commented Sep 28, 2021

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Sep 28, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rootfs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 28, 2021
@rootfs rootfs merged commit a755db3 into openshift:main Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants