From 48a59b13247eeb297248a1c0f01447603781c54f Mon Sep 17 00:00:00 2001 From: okozachenko Date: Fri, 22 Dec 2023 20:35:49 +1100 Subject: [PATCH] set startupProbe in nova compute In environments where there is a large number of ports (100+) on a hypervisor, the start up can take a long time, and eventually the liveness test will fail because the process is stuck plugging ports in. No need initial delay for live/readiness probe and Startup probe is enough Change-Id: I54544a45a716fa4ff840019c0526343063ed1ac5 --- nova/Chart.yaml | 2 +- nova/templates/daemonset-compute.yaml | 16 ++++++++++++++++ nova/values.yaml | 9 +++++++-- releasenotes/notes/nova.yaml | 1 + 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/nova/Chart.yaml b/nova/Chart.yaml index f9e19b0583..c489bdc2b4 100644 --- a/nova/Chart.yaml +++ b/nova/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Nova name: nova -version: 0.3.31 +version: 0.3.32 home: https://docs.openstack.org/nova/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png sources: diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index f6bab517ad..e1125f9191 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -41,6 +41,21 @@ exec: {{- end }} {{- end }} +{{- define "novaComputeStartupProbeTemplate" }} +exec: + command: + - python + - /tmp/health-probe.py + - --config-file + - /etc/nova/nova.conf + - --service-queue-name + - compute + - --liveness-probe + {{- if .Values.pod.use_fqdn.compute }} + - --use-fqdn + {{- end }} +{{- end }} + {{- define "nova.compute.daemonset" }} {{- $daemonset := index . 0 }} {{- $configMapName := index . 1 }} @@ -282,6 +297,7 @@ spec: {{- end }} {{ dict "envAll" $envAll "component" "compute" "container" "default" "type" "liveness" "probeTemplate" (include "novaComputeLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} {{ dict "envAll" $envAll "component" "compute" "container" "default" "type" "readiness" "probeTemplate" (include "novaComputeReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} +{{ dict "envAll" $envAll "component" "compute" "container" "default" "type" "startup" "probeTemplate" (include "novaComputeStartupProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} command: - /tmp/nova-compute.sh terminationMessagePath: /var/log/termination-log diff --git a/nova/values.yaml b/nova/values.yaml index 62d8e2a9fb..a48ecb1953 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -1993,15 +1993,20 @@ pod: liveness: enabled: True params: - initialDelaySeconds: 120 periodSeconds: 90 timeoutSeconds: 70 readiness: enabled: True params: - initialDelaySeconds: 80 periodSeconds: 90 timeoutSeconds: 70 + startup: + enabled: True + params: + failureThreshold: 120 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 70 api-metadata: default: liveness: diff --git a/releasenotes/notes/nova.yaml b/releasenotes/notes/nova.yaml index 3eebbd5b35..12af77bd91 100644 --- a/releasenotes/notes/nova.yaml +++ b/releasenotes/notes/nova.yaml @@ -100,4 +100,5 @@ nova: - 0.3.29 Add ability to define extra command(s) for the nova service cleaner job - 0.3.30 Add the conditional statement for log_config_append - 0.3.31 Add getting LISTEN IP for CIDR + - 0.3.32 Set the startupProbe for nova-compute ...