Skip to content

api: add missing docs for KernelMemoryTCP, and fix error message#43277

Merged
thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah:fix_kernelmem_docs_and_error
Mar 3, 2022
Merged

api: add missing docs for KernelMemoryTCP, and fix error message#43277
thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah:fix_kernelmem_docs_and_error

Conversation

@thaJeztah
Copy link
Member

Taken from #43214

While this feature is deprecated / unsupported on cgroups v2, it's
part of the API, so let's at least document it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
}
if resources.KernelMemory > 0 && resources.KernelMemory < linuxMinMemory {
return warnings, fmt.Errorf("Minimum kernel memory limit allowed is 4MB")
return warnings, fmt.Errorf("Minimum kernel memory limit allowed is 6MB")
Copy link
Member

Choose a reason for hiding this comment

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

I'm having a touch of deja-vu: #43214 (comment) 👀 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

hehe, yes, that's where these commits came from, but thought to move them out of that PR, as they already apply to the current API (and perhaps making the other PR slightly easier / smaller to review)

@thaJeztah
Copy link
Member Author

I'm gonna take a plunge here; this PR should be safe, and (mostly) for docs, so let's get this in

@thaJeztah
Copy link
Member Author

oh, actually; no LGTM yet 🙈 ... this LGTY, @tianon, or do you want to change the error to use a const (if so we should do it for the other errors as well

Copy link
Member

@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.

Sorry, yep, sounds good to me!

@thaJeztah
Copy link
Member Author

Thx! 👍

@thaJeztah thaJeztah merged commit 36ec581 into moby:master Mar 3, 2022
@thaJeztah thaJeztah deleted the fix_kernelmem_docs_and_error branch March 3, 2022 18:33
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.

2 participants