Allow timeouts to be configured in config#3459
Merged
estesp merged 1 commit intocontainerd:masterfrom Aug 19, 2019
Merged
Conversation
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3459 +/- ##
==========================================
- Coverage 44.24% 44.23% -0.01%
==========================================
Files 124 124
Lines 13732 13735 +3
==========================================
Hits 6076 6076
- Misses 6725 6728 +3
Partials 931 931
Continue to review full report at Codecov.
|
Contributor
|
@kevpar - FYI this is similar to what we have been seeing. |
dmcgowan
reviewed
Jul 26, 2019
Member
|
I agree with @dmcgowan with naming |
dbdd262 to
0d0dcb8
Compare
|
Build succeeded.
|
Member
Author
|
Updated |
AkihiroSuda
reviewed
Aug 6, 2019
This adds a singleton `timeout` package that will allow services and user to configure timeouts in the daemon. When a service wants to use a timeout, it should declare a const and register it's default value inside an `init()` function for that package. When the default config is generated, we can use the `timeout` package to provide the available timeout keys so that a user knows that they can configure. These show up in the config as follows: ```toml [timeouts] "io.containerd.timeout.shim.cleanup" = 5 "io.containerd.timeout.shim.load" = 5 "io.containerd.timeout.shim.shutdown" = 3 "io.containerd.timeout.task.state" = 2 ``` Timeouts in the config are specified in seconds. Timeouts are very hard to get right and giving this power to the user to configure things is a huge improvement. Machines can be faster and slower and depending on the CPU or load of the machine, a timeout may need to be adjusted. Signed-off-by: Michael Crosby <[email protected]>
0d0dcb8 to
2e8ea9f
Compare
Member
Author
|
Updated to specify timeouts as a time.duration ( string in the config) |
|
Build succeeded.
|
AkihiroSuda
approved these changes
Aug 13, 2019
mxpv
approved these changes
Aug 16, 2019
Member
|
@jterry75 see above; those commits are from 2019 😅 (not sure why they showed up in timelines / notifications) |
Contributor
|
LOL!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a singleton
timeoutpackage that will allow services and userto configure timeouts in the daemon. When a service wants to use a
timeout, it should declare a const and register it's default value
inside an
init()function for that package. When the default configis generated, we can use the
timeoutpackage to provide the availabletimeout keys so that a user knows that they can configure.
These show up in the config as follows:
Timeouts in the config are specified as a string and parsed as a duration.
Timeouts are very hard to get right and giving this power to the user to
configure things is a huge improvement. Machines can be faster and
slower and depending on the CPU or load of the machine, a timeout may
need to be adjusted.
Signed-off-by: Michael Crosby [email protected]