From cdc5e8eb521d66a8ef77a1d605a15b670725dc63 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 10 Jul 2024 17:30:06 -0400 Subject: [PATCH] Fix cinder service ServiceCommands These all ran kolla_set_configs && kolla_start, but this is unnecessary because kolla_set_configs is run w/ sudo from kolla_start. Just call kolla_start instead. This is necessary to run cinder services as unprivileged cinder users instead of root -- without this change, containers fail to start because kolla_start can't open "/run_command" for writing. --- pkg/cinderapi/statefuleset.go | 2 +- pkg/cinderbackup/statefulset.go | 2 +- pkg/cinderscheduler/statefulset.go | 2 +- pkg/cindervolume/statefulset.go | 2 +- test/kuttl/common/assert_sample_deployment.yaml | 2 +- test/kuttl/common/assert_tls_sample_deployment.yaml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/cinderapi/statefuleset.go b/pkg/cinderapi/statefuleset.go index 05c9e6c1..0cb7e234 100644 --- a/pkg/cinderapi/statefuleset.go +++ b/pkg/cinderapi/statefuleset.go @@ -30,7 +30,7 @@ import ( const ( // ServiceCommand - - ServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" + ServiceCommand = "/usr/local/bin/kolla_start" ) // StatefulSet func diff --git a/pkg/cinderbackup/statefulset.go b/pkg/cinderbackup/statefulset.go index 95a9eb52..7ff1d7fb 100644 --- a/pkg/cinderbackup/statefulset.go +++ b/pkg/cinderbackup/statefulset.go @@ -28,7 +28,7 @@ import ( const ( // ServiceCommand - - ServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" + ServiceCommand = "/usr/local/bin/kolla_start" ) // StatefulSet func diff --git a/pkg/cinderscheduler/statefulset.go b/pkg/cinderscheduler/statefulset.go index b5851873..87d9cd5f 100644 --- a/pkg/cinderscheduler/statefulset.go +++ b/pkg/cinderscheduler/statefulset.go @@ -28,7 +28,7 @@ import ( const ( // ServiceCommand - - ServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" + ServiceCommand = "/usr/local/bin/kolla_start" ) // StatefulSet func diff --git a/pkg/cindervolume/statefulset.go b/pkg/cindervolume/statefulset.go index e939488c..4b4ad881 100644 --- a/pkg/cindervolume/statefulset.go +++ b/pkg/cindervolume/statefulset.go @@ -28,7 +28,7 @@ import ( const ( // ServiceCommand - - ServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" + ServiceCommand = "/usr/local/bin/kolla_start" ) // StatefulSet func diff --git a/test/kuttl/common/assert_sample_deployment.yaml b/test/kuttl/common/assert_sample_deployment.yaml index 2e19a0b4..d6e9c6e9 100644 --- a/test/kuttl/common/assert_sample_deployment.yaml +++ b/test/kuttl/common/assert_sample_deployment.yaml @@ -77,7 +77,7 @@ spec: name: logs - args: - -c - - /usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start + - /usr/local/bin/kolla_start command: - /bin/bash imagePullPolicy: IfNotPresent diff --git a/test/kuttl/common/assert_tls_sample_deployment.yaml b/test/kuttl/common/assert_tls_sample_deployment.yaml index 41b891b1..94f6d15f 100644 --- a/test/kuttl/common/assert_tls_sample_deployment.yaml +++ b/test/kuttl/common/assert_tls_sample_deployment.yaml @@ -68,7 +68,7 @@ spec: name: logs - args: - -c - - /usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start + - /usr/local/bin/kolla_start volumeMounts: - mountPath: /etc/machine-id name: etc-machine-id @@ -164,7 +164,7 @@ spec: containers: - args: - -c - - /usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start + - /usr/local/bin/kolla_start volumeMounts: - mountPath: /etc/machine-id name: etc-machine-id @@ -264,7 +264,7 @@ spec: containers: - args: - -c - - /usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start + - /usr/local/bin/kolla_start volumeMounts: - mountPath: /etc/machine-id name: etc-machine-id