Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call "bash -c" unnecessarily as entry points #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions pkg/ovncontroller/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,11 @@ func DaemonSet(
}

ovnControllerCmd = []string{
"/bin/bash", "-c",
"/usr/local/bin/container-scripts/net_setup.sh && ovn-controller",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work, because && is handled by shell.

}
ovnControllerArgs = []string{
strings.Join(
append(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this doesn't compile, as per CI

[]string{"/usr/local/bin/container-scripts/net_setup.sh && ovn-controller"},
append(ovnControllerTLSArgs, "--pidfile", "unix:/run/openvswitch/db.sock")...,
),
append(ovnControllerTLSArgs, "--pidfile", "unix:/run/openvswitch/db.sock")...,
" ",
),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ovndbcluster/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func StatefulSet(
var preStopCmd []string
var postStartCmd []string
cmd := []string{"/usr/bin/dumb-init"}
args := []string{"--single-child", "--", "/bin/bash", "-c", ServiceCommand}
args := []string{"--single-child", "--", ServiceCommand}
//
// https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
//
Expand Down