libcontainerd/supervisor: consolidate platform-specific defaults#48353
Merged
thaJeztah merged 1 commit intomoby:masterfrom Aug 20, 2024
Merged
Conversation
Commit a000934 updated the default MaxRecvMsgSize and MaxSendMsgSize for Linux, but did not modify the defaults for Windows. Those options should not be platform-specific, which means that the only difference between the Linux and Windows config are the addresses for GRPC and Debug (Windows defaulting to a named pipe, whereas Linux sockets within exec-root). This patch - implements functions to return the default addresses for each platform - moves the defaults into `supervisor.Start()` - removes the now redundant `remote.setDefaults()` method It's worth noting that prior to this path, `remove.setDefaults()` would be applied _after_ any (custom) `DaemonOpt` was applied. However, none of the existing `DaemonOpt` options currently mutates these options. `remote` is also a non-exported type, so no external implementations can currently be created. It is therefore safe to set these defaults before options are applied. Signed-off-by: Sebastiaan van Stijn <[email protected]>
vvoland
approved these changes
Aug 20, 2024
austinvazquez
approved these changes
Aug 20, 2024
Member
Author
|
Thanks! Let me bring this one in, and continue looking at the original PR what part CI didn't like 😂 (I'm starting to suspect the second commit there) |
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.
Commit a000934 updated the default MaxRecvMsgSize and MaxSendMsgSize for Linux, but did not modify the defaults for Windows. Those options should not be platform-specific, which means that the only difference between the Linux and Windows config are the addresses for GRPC and Debug (Windows defaulting to a named pipe, whereas Linux sockets within exec-root).
This patch
supervisor.Start()remote.setDefaults()methodIt's worth noting that prior to this path,
remove.setDefaults()would be applied after any (custom)DaemonOptwas applied. However, none of the existingDaemonOptoptions currently mutates these options.remoteis also a non-exported type, so no external implementations can currently be created. It is therefore safe to set these defaults before options are applied.