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

Fix podman stop -t -1 CID #21826

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Fix podman stop -t -1 CID #21826

merged 1 commit into from
Feb 27, 2024

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Feb 26, 2024

Currently if a user specifies a negative time to stop a container the code ends up specifying the negative time to time.Duration which treats it as 0. By settine the default to max.Unint32 we end up with a positive number which indicates > 68 years which is probably close enough to infinity for our use case.

Fixes: #21811

Does this PR introduce a user-facing change?

None

Copy link
Contributor

openshift-ci bot commented Feb 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2024
@rhatdan rhatdan added 5.0 and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 26, 2024
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM
Older than me counts as infinity :^)

@rhatdan
Copy link
Member Author

rhatdan commented Feb 26, 2024

Even older then me.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2024
@mheon
Copy link
Member

mheon commented Feb 26, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2024
@baude
Copy link
Member

baude commented Feb 26, 2024

should we have a test to prevent regression (system or e2e) ?

@rhatdan
Copy link
Member Author

rhatdan commented Feb 26, 2024

Sure if you can figure a way to not wait 68 years to complete. :^)

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2024
@Luap99
Copy link
Member

Luap99 commented Feb 26, 2024

#21811 (comment) shows you were this is broken.
At the very least the test must be changed to make sure the warning is never displayed.

Currently if a user specifies a negative time to stop a container the
code ends up specifying the negative time to time.Duration which treats
it as 0. By settine the default to max.Unint32 we end up with a positive
number which indicates > 68 years which is probably close enough to
infinity for our use case.

Fixes: containers#21811

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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 Feb 27, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 6dd8454 into containers:main Feb 27, 2024
93 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 May 28, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators May 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
5.0 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-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman stop -t -1 container-id issue
5 participants