Skip to content

Conversation

@nbspsemicolon
Copy link
Contributor

Add ExitPolicy key to pod quadlets with logic to default to stop.

Docs updated with clarifcation on default value and usage example.

Simple assert added to bats to verify default constraint exists.

Addresses #25596

See Also: #26453

Does this PR introduce a user-facing change?

Added ExitPolicy for [Pod] in systemd quadlets

@nbspsemicolon
Copy link
Contributor Author

DCO is wrong. Signed-off-by is in the commit message.

@packit-as-a-service
Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@Luap99
Copy link
Member

Luap99 commented Jun 18, 2025

Commit sha: 06db239, Author: nbspsemicolon, Committer: nbspsemicolon; Expected "nbspsemicolon nbsp@nbailey.net", but got "Neil Bailey nbsp@nbailey.net".

The reason DCO check complains is because you git username (git config user.name) is not set to the real name used to sign off. That is not a blocker and I can set it to manual pass if wanted. Otherwise you can fix it with something like
git commit --amend --author="Neil Bailey nbsp@nbailey.net"

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.

Tests are failing because the argument order between --exit-policy=stop and --replace is swapped now. That is fine as it works in the same way but you will have to update the basic.pod test to make them pass.

cc @ygalblum

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.

LGTM for the code.
As @Luap99 wrote, basic.pod need to be adjusted.

Set custom DNS search domains. Use **DNSSearch=.** to remove the search domain.

This key can be listed multiple times.
### `ExitPolicy=`
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add an extra empty line

@ygalblum
Copy link
Contributor

Should we add a section to the man page explaining the usage of --exit-policy?

@nbspsemicolon nbspsemicolon force-pushed the quadlet-pod-exitpolicy branch from 06db239 to 25defe7 Compare June 18, 2025 18:57
@nbspsemicolon
Copy link
Contributor Author

Looks like I accidentally added a file while trying to fix the test. I'll squash again with the newline in docs added.

Add ExitPolicy key to pod quadlets with logic to default to stop.

Docs updated with clarifcation on default value and usage example.

Simple assert added to bats to verify default constraint exists.

Changed argument order in ginkgo basic pod unit test

Signed-off-by: Neil Bailey <nbsp@nbailey.net>
@nbspsemicolon nbspsemicolon force-pushed the quadlet-pod-exitpolicy branch from 25defe7 to 5989370 Compare June 18, 2025 19:08
podman.add("--exit-policy")
if found {
podman.add(exitPolicy)
} else {
Copy link
Member

Choose a reason for hiding this comment

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

no biggie but if one of these options is kind of a default, we will often set that and use a single condition as an override. maybe consider fix if you repush with someone else's comment (only if you consider one of them to be the default).

@nbspsemicolon
Copy link
Contributor Author

I'm not sure what to make of the debian and rawhide tests.

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

I restart the test it is a known flake

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 617cdc4 into containers:main Jun 19, 2025
76 of 77 checks passed
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 18, 2025
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants