From 00ee2cd90d2804eebc441ae56519473d7e644d93 Mon Sep 17 00:00:00 2001 From: zhouhao Date: Tue, 25 Apr 2017 13:43:57 +0800 Subject: [PATCH] schema: Add a range limit to Swappiness Signed-off-by: zhouhao --- schema/config-linux.json | 2 +- schema/defs-linux.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/schema/config-linux.json b/schema/config-linux.json index d51e5b5dd..8f26cf483 100644 --- a/schema/config-linux.json +++ b/schema/config-linux.json @@ -198,7 +198,7 @@ }, "swappiness": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness", - "$ref": "defs.json#/definitions/uint64" + "$ref": "defs-linux.json#/definitions/memorySwappiness" } } }, diff --git a/schema/defs-linux.json b/schema/defs-linux.json index 094037654..a55de9a11 100644 --- a/schema/defs-linux.json +++ b/schema/defs-linux.json @@ -213,6 +213,11 @@ "allow" ] }, + "memorySwappiness": { + "type": "integer", + "minimum": 0, + "maximum": 100 + }, "NetworkInterfacePriority": { "type": "object", "properties": {