From a772a30f070efdb28db81c16a6f8b2a9867f3cb7 Mon Sep 17 00:00:00 2001 From: "Gupta, Sangeet (sg774j)" Date: Wed, 6 Oct 2021 14:02:45 +0000 Subject: [PATCH] nova: Update script to true of grep does get anything. Change-Id: I54addea00b4ab91d8fe4925f88cacd582888a7f3 --- nova/Chart.yaml | 2 +- nova/templates/bin/_nova-service-cleaner.sh.tpl | 4 ++-- releasenotes/notes/nova.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nova/Chart.yaml b/nova/Chart.yaml index 2be4bacecd..4b01a5058d 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.2.19 +version: 0.2.20 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/bin/_nova-service-cleaner.sh.tpl b/nova/templates/bin/_nova-service-cleaner.sh.tpl index 7f5c344a2f..22427576e8 100644 --- a/nova/templates/bin/_nova-service-cleaner.sh.tpl +++ b/nova/templates/bin/_nova-service-cleaner.sh.tpl @@ -18,9 +18,9 @@ set -xe # If any non-compute service is down, then sleep for 2 times the report_interval # to confirm service is still down. -DISABLED_SVC="$(openstack compute service list -f value | grep -v 'nova-compute' | grep 'down')" +DISABLED_SVC="$(openstack compute service list -f value | grep -v 'nova-compute' | grep 'down' || true)" if [ ! -z "${DISABLED_SVC}" ]; then - sleep $((2 * {{ .Values.jobs.service_cleaner.sleep_time }})) + sleep {{ .Values.jobs.service_cleaner.sleep_time }} fi NOVA_SERVICES_TO_CLEAN="$(openstack compute service list -f value -c Binary | sort | uniq | grep -v '^nova-compute$')" diff --git a/releasenotes/notes/nova.yaml b/releasenotes/notes/nova.yaml index a6b595d6d6..7c74e57463 100644 --- a/releasenotes/notes/nova.yaml +++ b/releasenotes/notes/nova.yaml @@ -40,4 +40,5 @@ nova: - 0.2.17 Fix disablement of helm.sh/hook for Helm v2 - 0.2.18 Give service time to restore - 0.2.19 Define service cleaner sleep time + - 0.2.20 Update script to true of grep does get anything. ...