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 |
schema/config-linux.json
Outdated
| "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.
I see blkioWeight is still pointer in specs-go.
There was a problem hiding this comment.
I have modified blkioWeight to uint16Pointer as it is typed in spec-go, so blkioWeightPointer is not needed any more
|
@hqhq does this still make sense after your recent PR about negative values? |
schema/config-linux.json
Outdated
| } | ||
| }, | ||
| { | ||
| "type": "null" |
There was a problem hiding this comment.
We probably don't want the null alternative since null alternatives for arrays were just rejected in #555.
bd8e3a5 to
055f3fa
Compare
| "blkioWeight": { | ||
| "type": "integer", | ||
| "minimum": 10, | ||
| "maximum": 1000 |
There was a problem hiding this comment.
Yeah, it seems keep this is better, updated.
055f3fa to
61e0da0
Compare
schema/config-linux.json
Outdated
| ] | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "defs-linux.json#/definitions/Device" |
There was a problem hiding this comment.
Inconsistent indent (try cd schema && make fmt).
| "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.
As of 61e0da0, you still need to remove the definition for this from defs-linux.json.
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