]> git.proxmox.com Git - ovs.git/commit
ovn-trace: Fix warnings when port is found but not in current datapath.
authorHan Zhou <zhouhan@gmail.com>
Tue, 7 Aug 2018 02:44:02 +0000 (19:44 -0700)
committerBen Pfaff <blp@ovn.org>
Tue, 7 Aug 2018 22:22:05 +0000 (15:22 -0700)
commit1413d2125907a69db86bf55f1115b8c02fc8f886
tree0044703693255ec879d867f6aafadb83b4d60a63
parent090454dd4041159d610db8d9e8cd2df213bcbadd
ovn-trace: Fix warnings when port is found but not in current datapath.

When port group is used, ovn-trace may print warnings like this:

$ ovn-trace ls1 'inport == "lp111" && eth.src == f0:00:00:00:01:11 && eth.dst == f0:00:00:00:01:12  && ip4.src == 192.168.11.1 && ip4.dst == 192.168.11.2 && ip.ttl == 10'
2018-08-02T01:43:23Z|00001|ovntrace|WARN|lp211: not in datapath ls1
2018-08-02T01:43:23Z|00002|ovntrace|WARN|lp211: unknown logical port
2018-08-02T01:43:23Z|00003|ovntrace|WARN|lp221: not in datapath ls1
2018-08-02T01:43:23Z|00004|ovntrace|WARN|lp221: unknown logical port
2018-08-02T01:43:23Z|00005|ovntrace|WARN|lp231: not in datapath ls1
2018-08-02T01:43:23Z|00006|ovntrace|WARN|lp231: unknown logical port

There are 2 warnings:

For the first one, it might be reasonable
before port group is supported, but now since ports in a port group
can span across multiple datapaths, this situation is normal, and
warning should not be printed.

For the second one, it is misleading, and it should not be printed
in this situation even before port group is supported. It should be
printed only if the port is not found at all.

This patch fixes both.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
ovn/utilities/ovn-trace.c