-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop using /bin/sh for OVS commands (#5364)
We are currently using the shell (/bin/sh) to run ovs-appctl and ovs-ofctl commands, but there does not seem to be a reason to do so. Instead, we can invoke the binary directly with exec.Command and pass the arguments as a slice. Before this change, ovsVSwitchdUDS would return "/var/run/openvswitch/ovs-vswitchd.*.ctl" as a fallback value in case the PID of ovs-vswitchd could not be determined. The shell would then expand the wildcard patterns. I now believe that it is better to return an error in that case. We want to make sure that we use a valid file always (and returning the glob pattern would cause an error if multiple files match). If we run into issues because of this approach, we can update the code to expand the glob pattern programmatically and, if a single path matches, we can return that path. Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information
1 parent
c9770d7
commit 2302cfe
Showing
9 changed files
with
38 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.