Skip to content

Commit

Permalink
Fix cinder service ServiceCommands
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eharney committed Nov 25, 2024
1 parent 9e97663 commit cdc5e8e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/cinderapi/statefuleset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/cinderbackup/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/cinderscheduler/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/cindervolume/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/kuttl/common/assert_tls_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cdc5e8e

Please sign in to comment.