Otherwise, errors are logged at "debug" level.  Errors when pushing
flows can then seemingly be silently lost.

Signed-off-by: Justin Pettit <jpet...@ovn.org>
---
 ovn/controller/ofctrl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c
index f47e7e1..a67dde5 100644
--- a/ovn/controller/ofctrl.c
+++ b/ovn/controller/ofctrl.c
@@ -478,6 +478,12 @@ ofctrl_recv(const struct ofp_header *oh, enum ofptype type)
 {
     if (type == OFPTYPE_ECHO_REQUEST) {
         queue_msg(make_echo_reply(oh));
+    } else if (type == OFPTYPE_ERROR) {
+        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(30, 300);
+
+        char *s = ofp_to_string(oh, ntohs(oh->length), 2);
+        VLOG_INFO_RL(&rl, "OpenFlow error: %s", s);
+        free(s);
     } else if (type != OFPTYPE_ECHO_REPLY &&
                type != OFPTYPE_BARRIER_REPLY &&
                type != OFPTYPE_PACKET_IN &&
-- 
1.9.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to