fixup! config-linux: Refined JSON definitions for RDMA limits#1
Merged
paravmellanox merged 1 commit intoparavmellanox:masterfrom Jan 24, 2018
Merged
fixup! config-linux: Refined JSON definitions for RDMA limits#1paravmellanox merged 1 commit intoparavmellanox:masterfrom
paravmellanox merged 1 commit intoparavmellanox:masterfrom
Conversation
Owner
paravmellanox
left a comment
There was a problem hiding this comment.
I followed HugepageLimits naming style to reflect as 'RdmaLimits' instead of 'Rdma'.
Author
|
On Wed, Jan 24, 2018 at 12:41:58PM -0800, Parav Pandit wrote:
I followed HugepageLimits naming style to reflect as 'RdmaLimits'
instead of 'Rdma'.
But the JSON property behind HugepageLimits is hugepageLimits [1]. I
think it would be fine to have:
"rdma": {
"mlx5_1": {
"hca_handles": 3,
"hca_objects": 10000
},
…
}
with LinuxResources.Rdma. Or it would be fine to have:
"rdmaLimits": {
"mlx5_1": {
"hca_handles": 3,
"hca_objects": 10000
},
…
}
with LinuxResources.RdmaLimits. But I'd rather not have ‘rdma’ as the
JSON property and RdmaLimits as the Go property.
[1]: https://github.com/opencontainers/runtime-spec/blob/v1.0.1/specs-go/config.go#L336
|
Owner
|
Ah I get now. This aligns with hugepages naming convention well. |
additionalProperties is defined for the JSON Schema draft-04 in [1] with clearer documentation in draft-07 [2]. It is supportd by gojsonschema since xeipuuv/gojsonschema@0572d9d (added additionalProperties with inner schema, 2013-06-21). [1]: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4 [2]: https://tools.ietf.org/html/draft-handrews-json-schema-validation-00#section-6.5.6 Signed-off-by: W. Trevor King <wking@tremily.us>
Author
|
On Wed, Jan 24, 2018 at 09:02:58PM +0000, Parav Pandit wrote:
So lets have:
LinuxResources.RdmaLimits as Go property
"rdmaLimits" as JSON property.
Done with e28a297 → ff6d8ab. I've also added the associated JSON
Schema and some tests to demonstrate additionalProperties working
(although you'll want to cherry-pick opencontainers/runtime-spec#945
for that).
|
paravmellanox
approved these changes
Jan 24, 2018
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.
In case this is an easier way for me to make suggestions for opencontainers#942. If these changes look good, you can squash them into your master branch.