diff mbox series

[ovs-dev] Reply: [PATCH ovn] pinctrl: fix monitor state when using udp(icmp) to check healthy state

Message ID 87553b516bea491cb6cde2dbd101b279@inspur.com
State Superseded
Headers show
Series [ovs-dev] Reply: [PATCH ovn] pinctrl: fix monitor state when using udp(icmp) to check healthy state | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

wangchuanlei July 26, 2022, 12:36 a.m. UTC
Ok, I’ve already resubmit the commit message of  patch , please check the format, thanks a lot!

 

发件人: Numan Siddique [mailto:numans@ovn.org] 
发送时间: 2022年7月22日 0:37
收件人: david hanks (王传雷) <wangchuanlei@inspur.com>
抄送: ovs dev <dev@openvswitch.org>
主题: Re: [ovs-dev] [PATCH ovn] pinctrl: fix monitor state when using udp(icmp) to check healthy state

 

 

 

On Thu, Jul 21, 2022 at 12:40 AM wangchuanlei <wangchuanlei@inspur.com <mailto:wangchuanlei@inspur.com> > wrote:

Hi,
    On my enviroment, i have a load-balancer, witch uses udp(icmp) protocol to check connection status between vip and backend.
    In normal cirsumstances, vip send request packet to backends , and backends send reply to vip, so the result of health check is online status. Then, i set the nic of backends vm to down state through command "ip link set eth0 down", in this case, the backends vm would't send reply to vip, but vip still send request to backends.In function svc_monitors_run, after sending request packet, state of vip would change to waiting, after 3 seconds, due to no reply packet, svc_mon->state change to SVC_MON_S_ONLINE, so, even no reply state keep on line. This is unreasonable, it should be offline.
    So this patch is to fix this bug!

Signed-off-by: wangchuanlei <wangchuanlei@inspur.com <mailto:wangchuanlei@inspur.com> >

 

Thanks for the patch.

 

Can you please format the commit message as per the guidelines here - https://github.com/ovn-org/ovn/blob/main/Documentation/internals/contributing/submitting-patches.rst

 

Can also please drop "Hi" from the commit message.

 

Thanks

Numan

 

---
 controller/pinctrl.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index 38e8590af..1a21c7704 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -7526,13 +7526,9 @@  svc_monitors_run(struct rconn *swconn,

         case SVC_MON_S_WAITING:
             if (current_time > svc_mon->wait_time) {
-                if (svc_mon->protocol ==  SVC_MON_PROTO_TCP) {
-                    svc_mon->n_failures++;
-                    svc_mon->state = SVC_MON_S_OFFLINE;
-                } else {
-                    svc_mon->n_success++;
-                    svc_mon->state = SVC_MON_S_ONLINE;
-                }
+                svc_mon->n_failures++;
+                svc_mon->state = SVC_MON_S_OFFLINE;
+
                 svc_mon->next_send_time = current_time + svc_mon->interval;
                 next_run_time = svc_mon->next_send_time;
             } else {