iqiyi / dpvs

DPVS is a high performance Layer-4 load balancer based on DPDK.
Other
2.99k stars 723 forks source link

FullNat 如何删除一个 LoclIP #958

Open selboo opened 3 months ago

selboo commented 3 months ago
[root@localhost ~]# ipvsadm -Ln
IP Virtual Server version 1.9.6 (size=0)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.238.40.11:80 rr
  -> 192.168.1.5:80               FullNat 1      0          0
  -> 192.168.1.6:80               FullNat 1      0          0

[root@localhost ~]# ipvsadm -G
VIP:VPORT            TOTAL    SNAT_IP              CONFLICTS  CONNS
10.238.40.11:80      2
                              192.168.1.3          0          0
                              192.168.1.4          0          0
[root@localhost ~]# ipvsadm --add-laddr -z 192.168.1.9 -t 10.238.40.11:80 -F dpdk1

[root@localhost ~]# ipvsadm -G
VIP:VPORT            TOTAL    SNAT_IP              CONFLICTS  CONNS
10.238.40.11:80      3
                              192.168.1.3          0          0
                              192.168.1.4          0          0
                              192.168.1.9          0          0

如何删除 192.168.1.9, 调用 --del-laddr 参数的时候,有错误

[root@localhost ~]# ipvsadm --del-laddr -z 192.168.1.9 -t 10.238.40.11:80 -F dpdk1
[sockopt_msg_recv] errcode set in socket msg#1 header: no service(-17)
Success

以下 dpvs.log 日志

MSGMGR: [sockopt_msg_send:msg#SOCKOPT_SET_LADDR_DEL] errcode set in sockopt msg reply: no service
IFA: [00] ifa_free: del ifaddr 192.168.1.9
SERVICE: dp_vs_service_hashkey: IP proto not support.
leogoing commented 2 months ago

969 已修复