Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honor users requests in quadlet files #24334

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Oct 22, 2024

Fixes: #24322

Does this PR introduce a user-facing change?

Service section of quadlets now take precedence over built in defaults.
Quadlet build units no longer use RemainAfterExit=yes by default.

@openshift-ci openshift-ci bot added release-note approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 22, 2024
@rhatdan
Copy link
Member Author

rhatdan commented Oct 22, 2024

@ygalblum PTAL

Comment on lines 979 to 988
// The default syslog identifier is the exec basename (podman) which isn't very useful here
if _, ok := service.Lookup(ServiceGroup, "SyslogIdentifier"); !ok {
service.Set(ServiceGroup, "SyslogIdentifier", "%N")
}
if _, ok := service.Lookup(ServiceGroup, "Type"); !ok {
service.Set(ServiceGroup, "Type", "oneshot")
}
if _, ok := service.Lookup(ServiceGroup, "RemainAfterExit"); !ok {
service.Set(ServiceGroup, "RemainAfterExit", "yes")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is duplicated three times, so it should really be in its own function an reused

Copy link
Contributor

@ygalblum ygalblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nits

pkg/systemd/quadlet/quadlet.go Outdated Show resolved Hide resolved
// which isn't very useful here
"SyslogIdentifier", "%N")

defaultServiceGroup(service, false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should indicate in the release comment that the default behaviour for .build files has changed

@@ -1,5 +1,13 @@
## assert-podman-final-args systemd-ipv6
## assert-podman-args "--ipv6"
## assert-key-is Service Type exec
## assert-key-is Service RemainAfterExit yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this test passing? You set the value to no and assert for yes

@baude baude added the 5.3 label Nov 4, 2024
@baude
Copy link
Member

baude commented Nov 4, 2024

This PR has been marked for 5.3 inclusion but it must be merged prior to Nov 5 for inclusion in 5.3 RC3. PRs not merged by that date are considered on a case by case basis for backporting.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 5, 2024
Copy link
Contributor

openshift-ci bot commented Nov 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, rhatdan

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

The pull request process is described here

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-merge-bot openshift-merge-bot bot merged commit c8af2f2 into containers:main Nov 5, 2024
77 checks passed
@rhatdan
Copy link
Member Author

rhatdan commented Nov 5, 2024

KuxaBeast added a commit to KuxaBeast/os-autoinst-distri-opensuse that referenced this pull request Nov 27, 2024
containers/podman#24334

Quadlet build units no longer use RemainAfterExit=yes by default.
KuxaBeast added a commit to KuxaBeast/os-autoinst-distri-opensuse that referenced this pull request Nov 28, 2024
containers/podman#24334

Quadlet build units no longer use RemainAfterExit=yes by default.
KuxaBeast added a commit to KuxaBeast/os-autoinst-distri-opensuse that referenced this pull request Nov 28, 2024
Change dir variable name

Co-authored-by: Felix Niederwanger <[email protected]>

Don't parse JSON

Exclude pod validation for SLE<16

Enable for SLE

Allow only for tumbleweed and SLE 16+

Revert "Exclude pod validation for SLE<16"

This reverts commit d8e3064.

Remove unneeded JSON import

Add image pull phase and increase image build timeout

Improve run conditions and increase image pull delay

Improve file population and cleanup daemon-reload

Adjust for upstream Quadlet update

containers/podman#24334

Quadlet build units no longer use RemainAfterExit=yes by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.3 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. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman-system-generator ignores RemainAfterExit from .build Quadlet
4 participants