-
Notifications
You must be signed in to change notification settings - Fork 553
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
fix blkio related validation #545
fix blkio related validation #545
Conversation
@cyphar are these values that you say needed to stay as pointers? |
I'm fairly sure they do need to remain as pointers. Though, IIRC @wking mentioned something about this a few days ago (saying that there are some open issues about the pointer as dont-touch-this semantics). |
On Mon, Aug 29, 2016 at 08:01:27AM -0700, Aleksa Sarai wrote:
Pointers make it easy to say “leave it alone”, but they don't give you But in this case, blkioThrottleReadBpsDevice and friends are “array or The uint16 → int16 change for major/minor matches the spec in And the Major/Minor touched by 5d47014 are not pointers, but the |
ping @vbatts any comments? |
5d47014
to
bd8e3a5
Compare
@opencontainers/runtime-spec-maintainers PTAL |
@@ -97,11 +97,11 @@ | |||
"properties": { | |||
"blkioWeight": { | |||
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeight", | |||
"$ref": "defs-linux.json#/definitions/blkioWeightPointer" | |||
"$ref": "defs-linux.json#/definitions/blkioWeight" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see blkioWeight
is still pointer in specs-go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have modified blkioWeight
to uint16Pointer
as it is typed in spec-go, so blkioWeightPointer
is not needed any more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I see, thanks.
@hqhq does this still make sense after your recent PR about negative values? |
} | ||
}, | ||
{ | ||
"type": "null" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't want the null
alternative since null alternatives for arrays were just rejected in #555.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thanks.
bd8e3a5
to
055f3fa
Compare
@@ -140,19 +140,7 @@ | |||
} | |||
}, | |||
"blkioWeight": { | |||
"type": "integer", | |||
"minimum": 10, | |||
"maximum": 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to keep this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it seems keep this is better, updated.
055f3fa
to
61e0da0
Compare
] | ||
"type": "array", | ||
"items": { | ||
"$ref": "defs-linux.json#/definitions/Device" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indent (try cd schema && make fmt
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thanks
}, | ||
"blkioWeightDevice": { | ||
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice", | ||
"type": "array", | ||
"items": { | ||
"$ref": "defs-linux.json#/definitions/blockIODeviceWeightPointer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of 61e0da0, you still need to remove the definition for this from defs-linux.json
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thanks
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
61e0da0
to
58832f9
Compare
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Through 58832f9 looks good to me.
|
Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com