Skip to content

Commit

Permalink
ovn-controller: Fix inject-pkt command error response.
Browse files Browse the repository at this point in the history
From: Han Zhou <hzhou8@ebay.com>

When using unixctl command inject-packet, it always respond with
failure "server not ready", although the command was actually executed
successfully.

Fixes: 0bd4d85 ("ovn-controller: Initial use of incremental engine - quiet mode.")
Signed-off-by: Han Zhou <hzhou8@ebay.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
hzhou8 authored and ovsrobot committed Aug 5, 2019
1 parent a8f005c commit 6e14809
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions ovn/controller/ovn-controller.c
Expand Up @@ -2055,12 +2055,14 @@ main(int argc, char *argv[])
unixctl_command_reply_error(pending_pkt.conn, error);
free(error);
} else {
VLOG_DBG("Pending_pkt conn but br_int %p or chassis "
"%p not ready. run-id: %"PRIu64, br_int,
chassis, engine_run_id);
unixctl_command_reply_error(pending_pkt.conn,
"ovn-controller not ready.");
unixctl_command_reply(pending_pkt.conn, NULL);
}
} else {
VLOG_DBG("Pending_pkt conn but br_int %p or chassis "
"%p not ready. run-id: %"PRIu64, br_int,
chassis, engine_run_id);
unixctl_command_reply_error(pending_pkt.conn,
"ovn-controller not ready.");
}
pending_pkt.conn = NULL;
free(pending_pkt.flow_s);
Expand Down
2 changes: 1 addition & 1 deletion tests/ovn.at
Expand Up @@ -3705,7 +3705,7 @@ sleep 1
packet="inport==\"ls1-lp1\" && eth.src==$ls1_lp1_mac && eth.dst==$rp_ls1_mac &&
ip4 && ip.ttl==64 && ip4.src==$ls1_lp1_ip && ip4.dst==$ls2_lp1_ip &&
udp && udp.src==53 && udp.dst==4369"
as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet"
AT_CHECK([as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet"])


echo "---------NB dump-----"
Expand Down

0 comments on commit 6e14809

Please sign in to comment.