Ok, I understand what you mean, numans. But here still has a problem, 
if service_monitor does not get a reply due to backends is not work. Thus, 
health
status is ok. If client sends request for vip, even vip forwords request to
backend, client would not get a reply.

So, here may be needs another patch ?
Thank you ! 

-----邮件原件-----
发件人: Numan Siddique [mailto:num...@ovn.org] 
发送时间: 2022年8月8日 9:19
收件人: david hanks (王传雷) <wangchuan...@inspur.com>
抄送: ovs dev <d...@openvswitch.org>
主题: Re: [ovs-dev] [PATCH ovn] pinctrl: fix bug of monitor status in health check

On Mon, Aug 1, 2022 at 11:06 PM wangchuanlei <wangchuan...@inspur.com> wrote:
>
> when vm of backend do not send reply packet, monitor state should 
> change from waiting to offline,  this patch is to fix it!
>
> Signed-off-by: wangchuanlei <wangchuan...@inspur.com>

This patch breaks the service monitor functionality for UDP.

For UDP protocol, the service monitor's state is set to ONLINE when the wait 
time elapses and ovn-controller doesn't receive any  ICMP4_DST_UNREACH packet.

But this patch changes the behavior and it will never set the state to ONLINE 
for UDP.
Please see this - https://github.com/ovn-org/ovn/blob/main/ovn-sb.xml#L4546
<<snip>>
For UDP service, <code>ovn-controller</code> sends a UDP packet to the service 
and doesn't expect any reply. If it receives an ICMP reply, then it considers 
the service to be <code>offline</code>.
<</snip>>

Thanks
Numan


> ---
>  controller/pinctrl.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c index 
> 38e8590af..8226ad868 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -7526,13 +7526,8 @@ 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 {
> --
> 2.27.0
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to