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

create/run: remove default --stop-signal #3245

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

thaJeztah
Copy link
Member

relates to moby/moby#42717

The DefaultStopSignal const has been deprecated, because the daemon already
handles a default value. The current code did not actually send the default
value unless the flag was set, which also made the flag description incorrect,
because in that case, the daemon's default would be used, which could
potentially be different as was specified here.

This patch removes the default value from the flag, leaving it to the daemon
to set a default.

- Description for the changelog

Remove default value from `--stop-signal` flag, as it may not reflect the actual default used by the daemon.

- A picture of a cute animal (not mandatory but encouraged)

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2021

Codecov Report

Merging #3245 (6d420ca) into master (c758c3e) will increase coverage by 0.00%.
The diff coverage is 66.66%.

@@           Coverage Diff           @@
##           master    #3245   +/-   ##
=======================================
  Coverage   57.98%   57.98%           
=======================================
  Files         302      302           
  Lines       21754    21753    -1     
=======================================
+ Hits        12613    12614    +1     
+ Misses       8218     8217    -1     
+ Partials      923      922    -1     

@@ -621,7 +621,7 @@ incompatible with any restart policy other than `none`.
For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option.
Under these conditions, user can pass any size less than the backing fs size.

**--stop-signal**=*SIGTERM*
**--stop-signal**=""
Signal to stop a container. Default is SIGTERM.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this maybe note the fact that the default can be defined by the image or something? (STOPSIGNAL in Dockerfile)

Suggested change
Signal to stop a container. Default is SIGTERM.
Signal to stop a container. Default is defined by `STOPSIGNAL` in the image or `SIGTERM` if not defined.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yes, makes sense to add, let me add some of that; thanks!

@thaJeztah
Copy link
Member Author

I did some further rewriting of the docs, and moved a large part to #3261 (included in this PR; first two commits are from there)

The DefaultStopSignal const has been deprecated, because the daemon already
handles a default value. The current code did not actually send the default
value unless the flag was set, which also made the flag description incorrect,
because in that case, the _daemon's_ default would be used, which could
potentially be different as was specified here.

This patch removes the default value from the flag, leaving it to the daemon
to set a default.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

Rebased, to removed the changes from #3261 from this PR, and moved the KILL -> SIGKILL changes separate as well, as it's not directly related #3271

@thaJeztah
Copy link
Member Author

@tianon @silvin-lubecki PTAL

Copy link
Contributor

@tianon tianon left a comment

Choose a reason for hiding this comment

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

👀

@thaJeztah
Copy link
Member Author

@silvin-lubecki PTAL 🤗

@thaJeztah
Copy link
Member Author

@silvin-lubecki @tonistiigi PTAL 🤗

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 3fb4fb8 into docker:master Nov 2, 2021
@thaJeztah thaJeztah deleted the remove_stopsignal_default branch November 2, 2021 11:17
jlecordier pushed a commit to jlecordier/cli that referenced this pull request Dec 8, 2021
create/run: remove default --stop-signal

Signed-off-by: jlecordier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants