From 89524a4d92298889c7b810be977a92fcefec05a7 Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Wed, 16 Feb 2022 15:49:39 +0000 Subject: [PATCH 1/2] chore: update chart to include nvmf env variables --- chart/templates/mayastor-daemonset.yaml | 5 +++++ deploy/csi-daemonset.yaml | 2 +- deploy/mayastor-daemonset.yaml | 21 +++++++++++++-------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/chart/templates/mayastor-daemonset.yaml b/chart/templates/mayastor-daemonset.yaml index cee13ff68..c111c1171 100644 --- a/chart/templates/mayastor-daemonset.yaml +++ b/chart/templates/mayastor-daemonset.yaml @@ -36,6 +36,11 @@ spec: env: - name: RUST_LOG value: info,mayastor={{ .Values.mayastorLogLevel }} + - name: NVMF_TCP_MAX_QPAIRS_PER_CTRL + # Current recommendation is to set this value to be the number of cores provided to mayastor (see -l argument) plus 1. + value: {{ add .Values.mayastorCpuCount 1 }} + - name: NVMF_TCP_MAX_QUEUE_DEPTH + value: 32 - name: MY_NODE_NAME valueFrom: fieldRef: diff --git a/deploy/csi-daemonset.yaml b/deploy/csi-daemonset.yaml index 6a52fe3a9..5707cb75c 100644 --- a/deploy/csi-daemonset.yaml +++ b/deploy/csi-daemonset.yaml @@ -30,7 +30,7 @@ spec: # the same. containers: - name: mayastor-csi - image: mayadata/mayastor:v1.0.0 + image: mayadata/mayastor:v1.0.1 imagePullPolicy: IfNotPresent # we need privileged because we mount filesystems and use mknod securityContext: diff --git a/deploy/mayastor-daemonset.yaml b/deploy/mayastor-daemonset.yaml index 05f297811..ae8281bb6 100644 --- a/deploy/mayastor-daemonset.yaml +++ b/deploy/mayastor-daemonset.yaml @@ -33,11 +33,16 @@ spec: command: ['sh', '-c', 'until nc -vz nats 4222; do echo "Waiting for message bus..."; sleep 1; done;'] containers: - name: mayastor - image: mayadata/mayastor:v1.0.0 + image: mayadata/mayastor:v1.0.1 imagePullPolicy: IfNotPresent env: - name: RUST_LOG value: info,mayastor=info + - name: NVMF_TCP_MAX_QPAIRS_PER_CTRL + # Current recommendation is to set this value to be the number of cores provided to mayastor (see -l argument) plus 1. + value: 2 + - name: NVMF_TCP_MAX_QUEUE_DEPTH + value: 32 - name: MY_NODE_NAME valueFrom: fieldRef: @@ -50,11 +55,12 @@ spec: # The -l argument accepts cpu-list. Indexing starts at zero. # For example -l 1,2,10-20 means use core 1, 2, 10 to 20. # Note: Ensure that the CPU resources are updated accordingly. - # If you use 2 CPUs, the CPU: field should also read 2. + # If you use 2 CPUs, the CPU: field should also read 2. - "-N$(MY_NODE_NAME)" - "-g$(MY_POD_IP)" - "-nnats" - - "-l1" + - "-y/var/local/mayastor/config.yaml" + - "-l0" - "-pmayastor-etcd" command: - mayastor @@ -73,15 +79,14 @@ spec: # NOTE: Each container must have mem/cpu limits defined in order to # belong to Guaranteed QoS class, hence can never get evicted in case of # pressure unless they exceed those limits. limits and requests must be the same. - # limits: cpu: "1" - memory: "1Gi" - hugepages-2Mi: "2Gi" + memory: "512Mi" + hugepages-2Mi: "1Gi" requests: cpu: "1" - memory: "1Gi" - hugepages-2Mi: "2Gi" + memory: "512Mi" + hugepages-2Mi: "1Gi" ports: - containerPort: 10124 protocol: TCP From 4fabf05f1da7543010b5afb60029ac0b9ef673cd Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Wed, 16 Feb 2022 18:15:12 +0000 Subject: [PATCH 2/2] chore: update chart to reflect previous deploy configuration --- chart/templates/_helpers.tpl | 2 +- chart/templates/mayastor-daemonset.yaml | 12 ++++++------ deploy/mayastor-daemonset.yaml | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 34c605d1e..767a57d11 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -13,6 +13,6 @@ {{- if gt $i 0 }} {{- printf "," }} {{- end }} -{{- printf "%d" $i }} +{{- printf "%d" (add $i 1) }} {{- end }} {{- end }} diff --git a/chart/templates/mayastor-daemonset.yaml b/chart/templates/mayastor-daemonset.yaml index c111c1171..f4d84db89 100644 --- a/chart/templates/mayastor-daemonset.yaml +++ b/chart/templates/mayastor-daemonset.yaml @@ -38,9 +38,9 @@ spec: value: info,mayastor={{ .Values.mayastorLogLevel }} - name: NVMF_TCP_MAX_QPAIRS_PER_CTRL # Current recommendation is to set this value to be the number of cores provided to mayastor (see -l argument) plus 1. - value: {{ add .Values.mayastorCpuCount 1 }} + value: "{{ add .Values.mayastorCpuCount 1 }}" - name: NVMF_TCP_MAX_QUEUE_DEPTH - value: 32 + value: "32" - name: MY_NODE_NAME valueFrom: fieldRef: @@ -79,12 +79,12 @@ spec: # pressure unless they exceed those limits. limits and requests must be the same. limits: cpu: "{{ .Values.mayastorCpuCount }}" - memory: "512Mi" - hugepages-2Mi: "{{ .Values.mayastorHugePagesGiB }}Gi" + memory: "1Gi" + hugepages-2Mi: "{{ add .Values.mayastorHugePagesGiB 1 }}Gi" requests: cpu: "{{ .Values.mayastorCpuCount }}" - memory: "512Mi" - hugepages-2Mi: "{{ .Values.mayastorHugePagesGiB }}Gi" + memory: "1Gi" + hugepages-2Mi: "{{ add .Values.mayastorHugePagesGiB 1 }}Gi" ports: - containerPort: 10124 protocol: TCP diff --git a/deploy/mayastor-daemonset.yaml b/deploy/mayastor-daemonset.yaml index ae8281bb6..c26bd4262 100644 --- a/deploy/mayastor-daemonset.yaml +++ b/deploy/mayastor-daemonset.yaml @@ -40,9 +40,9 @@ spec: value: info,mayastor=info - name: NVMF_TCP_MAX_QPAIRS_PER_CTRL # Current recommendation is to set this value to be the number of cores provided to mayastor (see -l argument) plus 1. - value: 2 + value: "2" - name: NVMF_TCP_MAX_QUEUE_DEPTH - value: 32 + value: "32" - name: MY_NODE_NAME valueFrom: fieldRef: @@ -60,7 +60,7 @@ spec: - "-g$(MY_POD_IP)" - "-nnats" - "-y/var/local/mayastor/config.yaml" - - "-l0" + - "-l1" - "-pmayastor-etcd" command: - mayastor @@ -81,12 +81,12 @@ spec: # pressure unless they exceed those limits. limits and requests must be the same. limits: cpu: "1" - memory: "512Mi" - hugepages-2Mi: "1Gi" + memory: "1Gi" + hugepages-2Mi: "2Gi" requests: cpu: "1" - memory: "512Mi" - hugepages-2Mi: "1Gi" + memory: "1Gi" + hugepages-2Mi: "2Gi" ports: - containerPort: 10124 protocol: TCP