From 2a64ff37a4de4b3868b431ec4f4cd545cf4e5e0b Mon Sep 17 00:00:00 2001 From: Mikolaj Umanski Date: Wed, 21 Jun 2023 13:39:44 -0700 Subject: [PATCH 1/5] feat: add Ulimit config and updated sysctl ranges to swagger --- .../AgentPoolsCreate_CustomNodeConfig.json | 6 ++++- .../2023-06-02-preview/managedClusters.json | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json index de43307bd2f6..617c46c13541 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json @@ -33,7 +33,11 @@ }, "transparentHugePageEnabled": "always", "transparentHugePageDefrag": "madvise", - "swapFileSizeMB": 1500 + "swapFileSizeMB": 1500, + "ulimitConfig": { + "maxLockedMemory": "infinity", + "noFile": "1000" + } } } } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json index b14aa9c0d1e4..d5faffd99fca 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json @@ -6522,6 +6522,10 @@ "type": "integer", "format": "int32", "description": "The size in MB of a swap file that will be created on each node." + }, + "ulimitConfig": { + "$ref": "#/definitions/UlimitConfig", + "description": "Ulimit settings for Linux agent nodes." } } }, @@ -6635,6 +6639,8 @@ "netIpv4TcpkeepaliveIntvl": { "type": "integer", "format": "int32", + "minimum": 10, + "maximum": 90, "description": "Sysctl setting net.ipv4.tcp_keepalive_intvl." }, "netIpv4TcpTwReuse": { @@ -6663,11 +6669,15 @@ "netNetfilterNfConntrackMax": { "type": "integer", "format": "int32", + "minimum": 131072, + "maximum": 2097152, "description": "Sysctl setting net.netfilter.nf_conntrack_max." }, "netNetfilterNfConntrackBuckets": { "type": "integer", "format": "int32", + "minimum": 65536, + "maximum": 524288, "description": "Sysctl setting net.netfilter.nf_conntrack_buckets." }, "fsInotifyMaxUserWatches": { @@ -6712,6 +6722,20 @@ } } }, + "UlimitConfig": { + "description": "Ulimit settings for Linux agent nodes", + "type": "object", + "properties": { + "maxLockedMemory": { + "type": "string", + "description": "Maximum locked-in-memory address space (KB)" + }, + "noFile": { + "type": "string", + "description": "Maximum number of open files" + } + } + }, "ManagedClusterHTTPProxyConfig": { "description": "Cluster HTTP proxy configuration.", "type": "object", From 21db7acb487415adff1fdac911a4ce2a6b6ca082 Mon Sep 17 00:00:00 2001 From: Mikolaj Umanski Date: Wed, 21 Jun 2023 14:01:12 -0700 Subject: [PATCH 2/5] fix: use ulimits in json of LinuxOSConfig --- .../examples/AgentPoolsCreate_CustomNodeConfig.json | 2 +- .../aks/preview/2023-06-02-preview/managedClusters.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json index 617c46c13541..d61ec58844f8 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json @@ -34,7 +34,7 @@ "transparentHugePageEnabled": "always", "transparentHugePageDefrag": "madvise", "swapFileSizeMB": 1500, - "ulimitConfig": { + "ulimits": { "maxLockedMemory": "infinity", "noFile": "1000" } diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json index d5faffd99fca..e004a27af325 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/managedClusters.json @@ -6523,7 +6523,7 @@ "format": "int32", "description": "The size in MB of a swap file that will be created on each node." }, - "ulimitConfig": { + "ulimits": { "$ref": "#/definitions/UlimitConfig", "description": "Ulimit settings for Linux agent nodes." } From 3502f2b199a0039b4bca6a8c1269a142daf4ec86 Mon Sep 17 00:00:00 2001 From: Mikolaj Umanski Date: Wed, 21 Jun 2023 14:05:24 -0700 Subject: [PATCH 3/5] feat: add response example --- .../examples/AgentPoolsCreate_CustomNodeConfig.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json index d61ec58844f8..8b893fcb6c41 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-06-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json @@ -78,7 +78,11 @@ }, "transparentHugePageEnabled": "always", "transparentHugePageDefrag": "madvise", - "swapFileSizeMB": 1500 + "swapFileSizeMB": 1500, + "ulimits": { + "noFile": "1000", + "maxLockedMemory": "infinity" + } } } } From 949673772bb77447d5b3975ea5da27767c9705e2 Mon Sep 17 00:00:00 2001 From: Mikolaj Umanski Date: Wed, 21 Jun 2023 14:14:28 -0700 Subject: [PATCH 4/5] fix: add ulimits to custom words --- custom-words.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom-words.txt b/custom-words.txt index e8631a2e44bc..ea13a69d9f4e 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2844,4 +2844,5 @@ manytomany stransparent forceencryption tlsciphers -tlsprotocols \ No newline at end of file +tlsprotocols +ulimits \ No newline at end of file From 7d074d85152d030cc474e374292d16941269dc68 Mon Sep 17 00:00:00 2001 From: Mikolaj Umanski Date: Sat, 24 Jun 2023 20:55:04 -0700 Subject: [PATCH 5/5] Revert "fix: add ulimits to custom words" This reverts commit 949673772bb77447d5b3975ea5da27767c9705e2. --- custom-words.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom-words.txt b/custom-words.txt index ea13a69d9f4e..e8631a2e44bc 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2844,5 +2844,4 @@ manytomany stransparent forceencryption tlsciphers -tlsprotocols -ulimits \ No newline at end of file +tlsprotocols \ No newline at end of file