Skip to content

Commit

Permalink
Fix antctl trace-packet arguments missing issue
Browse files Browse the repository at this point in the history
Fix the following error when running `antctl trace-packet`, which is
caused by missing arguments for ovs-appctl command.

```
syntax error at br-int (or the bridge name was omitted)
ovs-appctl: /var/run/openvswitch/ovs-vswitchd.103.ctl: server returned an error
```

Signed-off-by: Lan Luo <luola@vmware.com>
  • Loading branch information
luolanzone committed Jan 4, 2024
1 parent 48c1646 commit 2155824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/agent/apiserver/handlers/ovstracing/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func validateRequest(r *http.Request) (*request, *handlers.HandlerError) {
return &request, nil
}

// HandleFunc returns the function which can handle API requests to "/ovsflows".
// HandleFunc returns the function which can handle API requests to "/ovstracing".
func HandleFunc(aq querier.AgentQuerier) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var traceReq *ovsctl.TracingRequest
Expand Down
1 change: 1 addition & 0 deletions pkg/ovs/ovsctl/appctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (r *ovsAppctlRunner) RunAppctlCmd(cmd string, needsBridge bool, args ...str
if needsBridge {
cmdArgs = append(cmdArgs, r.bridge)
}
cmdArgs = append(cmdArgs, args...)
ovsCmd := exec.CommandContext(context.TODO(), "ovs-appctl", cmdArgs...)
out, err := ovsCmd.CombinedOutput()
if err != nil {
Expand Down

0 comments on commit 2155824

Please sign in to comment.