Currently when the user adds an IPsec tunnel port to the
ovs bridge the ovs-monitor-ipsec script will submit a request
to start the IPsec connection for this port and ignores
the request output which can contain an error message.

This patch captures the request output and prints
the error message to the ovs logs.

Signed-off-by: Mohammad Heib <[email protected]>
---
 ipsec/ovs-monitor-ipsec.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in
index a8b0705d9..aa0135b86 100755
--- a/ipsec/ovs-monitor-ipsec.in
+++ b/ipsec/ovs-monitor-ipsec.in
@@ -708,6 +708,11 @@ conn prevent_unencrypted_vxlan
                     not re.match(r".*need --listen.*", pout):
                 break
 
+        if re.match(r".*[F|f]ailed to initiate connection.*", pout):
+            vlog.err('Failed to initiate connection through'
+                    ' Interface %s.\n' % (conn.split('-')[0]))
+            vlog.err(pout)
+
     def _nss_clear_database(self):
         """Remove all OVS IPsec related state from the NSS database"""
         try:
-- 
2.34.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to