ovs实现lb负载均衡

负载均衡定义

负载均衡器的实现原理是通过硬件或软件设备将客户端访问流量根据转发策略分发到多个服务器或设备上,以确保系统的负载均衡。常见的实现方式包括:

  1. 二层负载均衡‌:使用虚拟MAC地址方式,根据OSI模型的二层进行负载均衡。
  2. ‌四层负载均衡‌:基于IP+端口的负载均衡,主要分析IP层及TCP/UDP层,实现四层负载均衡。
  3. ‌七层负载均衡‌:从应用层开始,根据虚拟的URL或IP、主机名接收请求,再转向相应的处理服务器。

二层负载均衡

  • 网络设备:交换机
  • 过程分析:只有当pod访问负载均衡vip且是首包的情况下匹配switch负载均衡,在group里采用select机制根据数据包五元组哈希选择一个endpoint,打上ct_mark标记,并dnat到endpoint
  • ovs流表:
 table=19, priority=120,ct_state=+new+trk,tcp,metadata=0x1,nw_dst=10.96.187.144,tp_dst=10001 actions=load:0->NXM_NX_XXREG0[97],load:0xa60bb90→NXM_NX_XXREG0[64..95],load:0x2711→NXM_NX_XXREG0[32..47],group:5# 在group里进行负载均衡group_id=5,type=select,selection_method=dp_hash,bucket=bucket_id:0,weight:100,actions=ct(commit,table=20,zone=NXM_NX_REG13[0..15],nat(dst=10.244.0.4:80),exec(load:0x1->NXM_NX_CT_MARK[1])),bucket=bucket_id:1,weight:100,actions=ct(commit,table=20,zone=NXM_NX_REG13[0..15],nat(dst=10.244.0.5:80),exec(load:0x1->NXM_NX_CT_MARK[1])),bucket=bucket_id:2,weight:100,actions=ct(commit,table=20,zone=NXM_NX_REG13[0..15],nat(dst=10.244.0.6:80),exec(load:0x1->NXM_NX_CT_MARK[1])),bucket=bucket_id:3,weight:100,actions=ct(commit,table=20,zone=NXM_NX_REG13[0..15],nat(dst=10.244.0.7:80),exec(load:0x1→NXM_NX_CT_MARK[1]))
  • ovn流表:
#  ovn-trace --ct=new node1 'inport=="ovn-poc_service-a-89c68dc96-f75t2" && eth.src== 0a:58:0a:f4:00:04 && eth.dst == 0a:58:0a:f4:00:01 && ip4.src==10.244.0.4 && ip.ttl==64 && ip4.dst==10.96.187.144 && tcp.dst==10001'
# tcp,reg14=0x3,vlan_tci=0x0000,dl_src=0a:58:0a:f4:00:04,dl_dst=0a:58:0a:f4:00:01,nw_src=10.244.0.4,nw_dst=10.96.187.144,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=10001,tcp_flags=0ingress(dp="node1", inport="ovn-poc_service-a-89c68dc96-f75t2")
---------------------------------------------------------------0. ls_in_check_port_sec (northd.c:7727): 1, priority 50, uuid 03dc908creg0[15] = check_in_port_sec();next;4. ls_in_pre_acl (northd.c:5649): ip, priority 100, uuid df97729freg0[0] = 1;next;5. ls_in_pre_lb (northd.c:5820): ip, priority 100, uuid 1990086areg0[2] = 1;next;6. ls_in_pre_stateful (northd.c:5852): reg0[2] == 1 && ip4 && tcp, priority 120, uuid 454a1f78reg1 = ip4.dst;reg2[0..15] = tcp.dst;ct_lb_mark;ct_lb_mark
----------7. ls_in_acl_hint (northd.c:5929): ct.new && !ct.est, priority 7, uuid 24ab3fd0reg0[7] = 1;reg0[9] = 1;next;8. ls_in_acl (northd.c:6545): ip && !ct.est, priority 1, uuid 8eaca776reg0[1] = 1;next;
11. ls_in_lb (northd.c:6858): ct.new && ip4.dst == 10.96.187.144 && tcp.dst == 10001, priority 120, uuid 4bf79ca8reg0[1] = 0;reg1 = 10.96.187.144;reg2[0..15] = 10001;ct_lb_mark(backends=10.244.0.4:80,10.244.0.5:80,10.244.0.6:80,10.244.0.7:80);ct_lb_mark /* default (use --ct to customize) */
------------------------------------------------
14. ls_in_pre_hairpin (northd.c:6931): ip && ct.trk, priority 100, uuid 1328c195reg0[6] = chk_lb_hairpin();reg0[12] = chk_lb_hairpin_reply();*** chk_lb_hairpin_reply action not implementednext;
23. ls_in_l2_lkup (northd.c:8465): eth.dst == 0a:58:0a:f4:00:01, priority 50, uuid 3c5ecd19outport = "stor-node1";output;egress(dp="node1", inport="ovn-poc_service-a-89c68dc96-f75t2", outport="stor-node1")
------------------------------------------------------------------------------------0. ls_out_pre_lb (northd.c:5538): ip && outport == "stor-node1", priority 110, uuid 2d693c30next;1. ls_out_pre_acl (northd.c:5538): ip && outport == "stor-node1", priority 110, uuid c384472dnext;3. ls_out_acl_hint (northd.c:5992): ct.est && ct_mark.blocked == 0, priority 1, uuid f77da843reg0[10] = 1;next;8. ls_out_check_port_sec (northd.c:5505): 1, priority 0, uuid 4fb4d39freg0[15] = check_out_port_sec();next;9. ls_out_apply_port_sec (northd.c:5510): 1, priority 0, uuid 6d6e8323output;/* output to "stor-node1", type "patch" */ingress(dp="ovn_cluster_router", inport="rtos-node1")
-----------------------------------------------------0. lr_in_admission (northd.c:10835): eth.dst == 0a:58:0a:f4:00:01 && inport == "rtos-node1" && is_chassis_resident("cr-rtos-node1"), priority 50, uuid be29772fxreg0[0..47] = 0a:58:0a:f4:00:01;next;1. lr_in_lookup_neighbor (northd.c:10979): 1, priority 0, uuid e1a8324creg9[2] = 1;next;2. lr_in_learn_neighbor (northd.c:10988): reg9[2] == 1, priority 100, uuid 64a7073bnext;
10. lr_in_ip_routing_pre (northd.c:11214): 1, priority 0, uuid 7dd0d651reg7 = 0;next;
11. lr_in_ip_routing (northd.c:9629): ip4.dst == 10.244.0.0/24, priority 74, uuid 7546028cip.ttl--;reg8[0..15] = 0;reg0 = ip4.dst;reg1 = 10.244.0.1;eth.src = 0a:58:0a:f4:00:01;outport = "rtos-node1";flags.loopback = 1;next;
12. lr_in_ip_routing_ecmp (northd.c:11290): reg8[0..15] == 0, priority 150, uuid 95a7470dnext;
13. lr_in_policy (northd.c:11457): 1, priority 0, uuid 9fff15f1reg8[0..15] = 0;next;
14. lr_in_policy_ecmp (northd.c:11459): reg8[0..15] == 0, priority 150, uuid f7115b27next;
15. lr_in_arp_resolve (northd.c:11660): outport == "rtos-node1" && reg0 == 10.244.0.6, priority 100, uuid 5eb2a06deth.dst = 0a:58:0a:f4:00:06;next;
18. lr_in_gw_redirect (northd.c:12060): outport == "rtos-node1", priority 50, uuid a372b2faoutport = "cr-rtos-node1";next;
19. lr_in_arp_request (northd.c:12178): 1, priority 0, uuid d469dbb2output;/* Replacing type "chassisredirect" outport "cr-rtos-node1" with distributed port "rtos-node1". */egress(dp="ovn_cluster_router", inport="rtos-node1", outport="rtos-node1")
--------------------------------------------------------------------------0. lr_out_chk_dnat_local (northd.c:13442): 1, priority 0, uuid 43040472reg9[4] = 0;next;6. lr_out_delivery (northd.c:12225): outport == "rtos-node1", priority 100, uuid c027ddcdoutput;/* output to "rtos-node1", type "patch" */ingress(dp="node1", inport="stor-node1")
----------------------------------------0. ls_in_check_port_sec (northd.c:7727): 1, priority 50, uuid 03dc908creg0[15] = check_in_port_sec();next;4. ls_in_pre_acl (northd.c:5535): ip && inport == "stor-node1", priority 110, uuid dea94017next;5. ls_in_pre_lb (northd.c:5535): ip && inport == "stor-node1", priority 110, uuid 9594bbf7next;7. ls_in_acl_hint (northd.c:5992): ct.est && ct_mark.blocked == 0, priority 1, uuid 2c071dfereg0[10] = 1;next;
14. ls_in_pre_hairpin (northd.c:6931): ip && ct.trk, priority 100, uuid 1328c195reg0[6] = chk_lb_hairpin();reg0[12] = chk_lb_hairpin_reply();*** chk_lb_hairpin_reply action not implementednext;
23. ls_in_l2_lkup (northd.c:8394): eth.dst == 0a:58:0a:f4:00:06, priority 50, uuid d57c86c5outport = "ovn-poc_service-a-89c68dc96-tgkwt";output;egress(dp="node1", inport="stor-node1", outport="ovn-poc_service-a-89c68dc96-tgkwt")
------------------------------------------------------------------------------------0. ls_out_pre_lb (northd.c:5822): ip, priority 100, uuid fe121cbfreg0[2] = 1;next;1. ls_out_pre_acl (northd.c:5651): ip, priority 100, uuid 105736e5reg0[0] = 1;next;2. ls_out_pre_stateful (northd.c:5872): reg0[2] == 1, priority 110, uuid 1c6b05efct_lb_mark;ct_lb_mark /* default (use --ct to customize) */
------------------------------------------------3. ls_out_acl_hint (northd.c:5992): ct.est && ct_mark.blocked == 0, priority 1, uuid f77da843reg0[10] = 1;next;8. ls_out_check_port_sec (northd.c:5505): 1, priority 0, uuid 4fb4d39freg0[15] = check_out_port_sec();next;9. ls_out_apply_port_sec (northd.c:5510): 1, priority 0, uuid 6d6e8323output;/* output to "ovn-poc_service-a-89c68dc96-tgkwt", type "" */

二层负载均衡

  • 网络设备:路由器
  • 过程分析:只host访问负载均衡vip且是首包走3层router负载均衡,在group里采用select机制根据数据包五元组哈希选择一个endpoint,dnat到endpoint,再通过dnat后的网段进行路由到ovn_cluster_router,转发到pod
  • ovs流表:
table=14,  priority=120,ct_state=+new+trk,tcp,reg0=0xa60bb90,reg9=0x27110000/0xffff0000,metadata=0x7 actions=load:0x1->NXM_NX_REG10[3],group:6# 在group里进行负载均衡group_id=6,type=select,selection_method=dp_hash,bucket=bucket_id:0,weight:100,actions=ct(commit,table=15,zone=NXM_NX_REG11[0..15],nat(dst=10.244.0.4:80),exec(load:0x1->NXM_NX_CT_MARK[1])),bucket=bucket_id:1,weight:100,actions=ct(commit,table=15,zone=NXM_NX_REG11[0..15],nat(dst=10.244.0.5:80),exec(load:0x1->NXM_NX_CT_MARK[1])),bucket=bucket_id:2,weight:100,actions=ct(commit,table=15,zone=NXM_NX_REG11[0..15],nat(dst=10.244.0.6:80),exec(load:0x1->NXM_NX_CT_MARK[1])),bucket=bucket_id:3,weight:100,actions=ct(commit,table=15,zone=NXM_NX_REG11[0..15],nat(dst=10.244.0.7:80),exec(load:0x1->NXM_NX_CT_MARK[1]))
  • ovn流表:
# ovn-trace --ct=new ext_node1 'inport=="brenp0s10_node1" && eth.src==fa:92:01:b6:d4:fd && eth.dst==fa:92:01:b6:d4:fd && ip4.src==169.254.169.2 && ip4.dst==10.96.187.144 && ip && ip.ttl==64 && tcp.dst==10001'
# tcp,reg14=0x1,vlan_tci=0x0000,dl_src=fa:92:01:b6:d4:fd,dl_dst=fa:92:01:b6:d4:fd,nw_src=169.254.169.2,nw_dst=10.96.187.144,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=10001,tcp_flags=0ingress(dp="ext_node1", inport="brenp0s10_node1")
-------------------------------------------------0. ls_in_check_port_sec (northd.c:7727): 1, priority 50, uuid 03dc908creg0[15] = check_in_port_sec();next;5. ls_in_pre_lb (northd.c:5535): ip && inport == "brenp0s10_node1", priority 110, uuid 51131891next;
17. ls_in_arp_rsp (northd.c:7749): inport == "brenp0s10_node1", priority 100, uuid 55db24b2next;
23. ls_in_l2_lkup (northd.c:8394): eth.dst == fa:92:01:b6:d4:fd, priority 50, uuid 034b6bbeoutport = "etor-GR_node1";output;egress(dp="ext_node1", inport="brenp0s10_node1", outport="etor-GR_node1")
-------------------------------------------------------------------------0. ls_out_pre_lb (northd.c:5538): ip && outport == "etor-GR_node1", priority 110, uuid 2762bbbbnext;8. ls_out_check_port_sec (northd.c:5505): 1, priority 0, uuid 4fb4d39freg0[15] = check_out_port_sec();next;9. ls_out_apply_port_sec (northd.c:5510): 1, priority 0, uuid 6d6e8323output;/* output to "etor-GR_node1", type "l3gateway" */ingress(dp="GR_node1", inport="rtoe-GR_node1")
----------------------------------------------0. lr_in_admission (northd.c:10835): eth.dst == fa:92:01:b6:d4:fd && inport == "rtoe-GR_node1", priority 50, uuid 8b77bd84xreg0[0..47] = fa:92:01:b6:d4:fd;next;1. lr_in_lookup_neighbor (northd.c:10979): 1, priority 0, uuid e1a8324creg9[2] = 1;next;2. lr_in_learn_neighbor (northd.c:10988): reg9[2] == 1 || reg9[3] == 0, priority 100, uuid 2c666711next;5. lr_in_defrag (northd.c:10148): ip && ip4.dst == 10.96.187.144 && tcp, priority 110, uuid d7c84c30reg0 = 10.96.187.144;reg9[16..31] = tcp.dst;ct_dnat;ct_dnat /* assuming no un-dnat entry, so no change */
-----------------------------------------------------6. lr_in_dnat (northd.c:9766): ct.new && ip4 && reg0 == 10.96.187.144 && tcp && reg9[16..31] == 10001, priority 120, uuid 16accb91flags.force_snat_for_lb = 1;ct_lb_mark(backends=10.244.0.4:80,10.244.0.5:80,10.244.0.6:80,10.244.0.7:80);ct_lb_mark /* default (use --ct to customize) */
------------------------------------------------
10. lr_in_ip_routing_pre (northd.c:11214): 1, priority 0, uuid 7dd0d651reg7 = 0;next;
11. lr_in_ip_routing (northd.c:9629): reg7 == 0 && ip4.dst == 10.244.0.0/16, priority 49, uuid b99c65d6ip.ttl--;reg8[0..15] = 0;reg0 = 100.64.0.1;reg1 = 100.64.0.3;eth.src = 0a:58:64:40:00:03;outport = "rtoj-GR_node1";flags.loopback = 1;next;
12. lr_in_ip_routing_ecmp (northd.c:11290): reg8[0..15] == 0, priority 150, uuid 95a7470dnext;
13. lr_in_policy (northd.c:11457): 1, priority 0, uuid 9fff15f1reg8[0..15] = 0;next;
14. lr_in_policy_ecmp (northd.c:11459): reg8[0..15] == 0, priority 150, uuid f7115b27next;
15. lr_in_arp_resolve (northd.c:11493): ip4, priority 0, uuid 7becfca7get_arp(outport, reg0);/* MAC binding to 0a:58:64:40:00:01. */next;
19. lr_in_arp_request (northd.c:12178): 1, priority 0, uuid d469dbb2output;egress(dp="GR_node1", inport="rtoe-GR_node1", outport="rtoj-GR_node1")
----------------------------------------------------------------------0. lr_out_chk_dnat_local (northd.c:13442): 1, priority 0, uuid 43040472reg9[4] = 0;next;1. lr_out_undnat (northd.c:13462): ip, priority 50, uuid 998e6c30flags.loopback = 1;ct_dnat;ct_dnat /* assuming no un-dnat entry, so no change */
-----------------------------------------------------2. lr_out_post_undnat (northd.c:13464): ip && ct.new, priority 50, uuid 13cbb26fct_commit;next;6. lr_out_delivery (northd.c:12225): outport == "rtoj-GR_node1", priority 100, uuid 215be6d1output;/* output to "rtoj-GR_node1", type "l3gateway" */ingress(dp="join", inport="jtor-GR_node1")
------------------------------------------0. ls_in_check_port_sec (northd.c:7727): 1, priority 50, uuid 03dc908creg0[15] = check_in_port_sec();next;5. ls_in_pre_lb (northd.c:5535): ip && inport == "jtor-GR_node1", priority 110, uuid e6087be9next;
23. ls_in_l2_lkup (northd.c:8465): eth.dst == 0a:58:64:40:00:01, priority 50, uuid 6a3b96d6outport = "jtor-ovn_cluster_router";output;egress(dp="join", inport="jtor-GR_node1", outport="jtor-ovn_cluster_router")
----------------------------------------------------------------------------0. ls_out_pre_lb (northd.c:5538): ip && outport == "jtor-ovn_cluster_router", priority 110, uuid 843f9c76next;8. ls_out_check_port_sec (northd.c:5505): 1, priority 0, uuid 4fb4d39freg0[15] = check_out_port_sec();next;9. ls_out_apply_port_sec (northd.c:5510): 1, priority 0, uuid 6d6e8323output;/* output to "jtor-ovn_cluster_router", type "patch" */ingress(dp="ovn_cluster_router", inport="rtoj-ovn_cluster_router")
------------------------------------------------------------------0. lr_in_admission (northd.c:10835): eth.dst == 0a:58:64:40:00:01 && inport == "rtoj-ovn_cluster_router", priority 50, uuid 4a2c861fxreg0[0..47] = 0a:58:64:40:00:01;next;1. lr_in_lookup_neighbor (northd.c:10979): 1, priority 0, uuid e1a8324creg9[2] = 1;next;2. lr_in_learn_neighbor (northd.c:10988): reg9[2] == 1, priority 100, uuid 64a7073bnext;
10. lr_in_ip_routing_pre (northd.c:11214): 1, priority 0, uuid 7dd0d651reg7 = 0;next;
11. lr_in_ip_routing (northd.c:9629): ip4.dst == 10.244.0.0/24, priority 74, uuid 7546028cip.ttl--;reg8[0..15] = 0;reg0 = ip4.dst;reg1 = 10.244.0.1;eth.src = 0a:58:0a:f4:00:01;outport = "rtos-node1";flags.loopback = 1;next;
12. lr_in_ip_routing_ecmp (northd.c:11290): reg8[0..15] == 0, priority 150, uuid 95a7470dnext;
13. lr_in_policy (northd.c:11457): 1, priority 0, uuid 9fff15f1reg8[0..15] = 0;next;
14. lr_in_policy_ecmp (northd.c:11459): reg8[0..15] == 0, priority 150, uuid f7115b27next;
15. lr_in_arp_resolve (northd.c:11660): outport == "rtos-node1" && reg0 == 10.244.0.4, priority 100, uuid 98d8234deth.dst = 0a:58:0a:f4:00:04;next;
18. lr_in_gw_redirect (northd.c:12060): outport == "rtos-node1", priority 50, uuid a372b2faoutport = "cr-rtos-node1";next;
19. lr_in_arp_request (northd.c:12178): 1, priority 0, uuid d469dbb2output;/* Replacing type "chassisredirect" outport "cr-rtos-node1" with distributed port "rtos-node1". */egress(dp="ovn_cluster_router", inport="rtoj-ovn_cluster_router", outport="rtos-node1")
---------------------------------------------------------------------------------------0. lr_out_chk_dnat_local (northd.c:13442): 1, priority 0, uuid 43040472reg9[4] = 0;next;6. lr_out_delivery (northd.c:12225): outport == "rtos-node1", priority 100, uuid c027ddcdoutput;/* output to "rtos-node1", type "patch" */ingress(dp="node1", inport="stor-node1")
----------------------------------------0. ls_in_check_port_sec (northd.c:7727): 1, priority 50, uuid 03dc908creg0[15] = check_in_port_sec();next;4. ls_in_pre_acl (northd.c:5535): ip && inport == "stor-node1", priority 110, uuid dea94017next;5. ls_in_pre_lb (northd.c:5535): ip && inport == "stor-node1", priority 110, uuid 9594bbf7next;7. ls_in_acl_hint (northd.c:5992): ct.est && ct_mark.blocked == 0, priority 1, uuid 2c071dfereg0[10] = 1;next;
14. ls_in_pre_hairpin (northd.c:6931): ip && ct.trk, priority 100, uuid 1328c195reg0[6] = chk_lb_hairpin();reg0[12] = chk_lb_hairpin_reply();*** chk_lb_hairpin_reply action not implementednext;
23. ls_in_l2_lkup (northd.c:8394): eth.dst == 0a:58:0a:f4:00:04, priority 50, uuid 50aab262outport = "ovn-poc_service-a-89c68dc96-f75t2";output;egress(dp="node1", inport="stor-node1", outport="ovn-poc_service-a-89c68dc96-f75t2")
------------------------------------------------------------------------------------0. ls_out_pre_lb (northd.c:5822): ip, priority 100, uuid fe121cbfreg0[2] = 1;next;1. ls_out_pre_acl (northd.c:5651): ip, priority 100, uuid 105736e5reg0[0] = 1;next;2. ls_out_pre_stateful (northd.c:5872): reg0[2] == 1, priority 110, uuid 1c6b05efct_lb_mark;ct_lb_mark /* default (use --ct to customize) */
------------------------------------------------3. ls_out_acl_hint (northd.c:5992): ct.est && ct_mark.blocked == 0, priority 1, uuid f77da843reg0[10] = 1;next;8. ls_out_check_port_sec (northd.c:5505): 1, priority 0, uuid 4fb4d39freg0[15] = check_out_port_sec();next;9. ls_out_apply_port_sec (northd.c:5510): 1, priority 0, uuid 6d6e8323output;/* output to "ovn-poc_service-a-89c68dc96-f75t2", type "" */

hairpin(特殊场景lb)

  • 网络设备:交换机
  • 过程分析:当pod访问serviceIP,经过负载均衡后的endpoint是自己时,snat将源ip改为vip,源目mac互换,跳过2层转发回到源pod,此过程在switch即可完成,不需要再经过router
  • ovs流表:
table=22, priority=100,ct_state=+trk,ip,metadata=0x1 actions=load:0->NXM_NX_REG10[7],resubmit(,68),move:NXM_NX_REG10[7]→NXM_NX_XXREG0[102],load:0→NXM_NX_REG10[7],resubmit(,69),move:NXM_NX_REG10[7]→NXM_NX_XXREG0[108],resubmit(,23)
table=68, priority=100,ct_mark=0x2/0x2,tcp,reg1=0xa60b85f,reg2=0x2711/0xffff,nw_src=10.244.0.4,nw_dst=10.244.0.4,tp_dst=80 actions=load:0x1->NXM_NX_REG10[7],learn(table=69,delete_learned,cookie=0x8a0b4179,OXM_OF_METADATA[],eth_type=0x800,NXM_OF_IP_SRC[],ip_dst=10.96.184.95,nw_proto=6,NXM_OF_TCP_SRC[]=NXM_OF_TCP_DST[],load:0x1→NXM_NX_REG10[7])
  • ovn流表:
# ovn-trace --ct=new node1 'inport=="ovn-poc_service-a-89c68dc96-fm272" && eth.src== 0a:58:0a:f4:00:04 && eth.dst == 0a:58:0a:f4:00:01 && ip4.src==10.244.0.4 && ip.ttl==64 && ip4.dst==10.96.184.95 && tcp.dst==10001'
2023-11-16T02:15:46Z|00001|ovntrace|WARN|ovn-poc_service-a-89c68dc96-f75t2: unknown logical port
2023-11-16T02:15:46Z|00002|ovntrace|WARN|ovn-poc_service-a-89c68dc96-f75t2: unknown logical port
# tcp,reg14=0x3,vlan_tci=0x0000,dl_src=0a:58:0a:f4:00:04,dl_dst=0a:58:0a:f4:00:01,nw_src=10.244.0.4,nw_dst=10.96.184.95,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=10001,tcp_flags=0ingress(dp="node1", inport="ovn-poc_service-a-89c68dc96-fm272")
---------------------------------------------------------------0. ls_in_check_port_sec (northd.c:7727): 1, priority 50, uuid 03dc908creg0[15] = check_in_port_sec();next;4. ls_in_pre_acl (northd.c:5649): ip, priority 100, uuid df97729freg0[0] = 1;next;5. ls_in_pre_lb (northd.c:5820): ip, priority 100, uuid 1990086areg0[2] = 1;next;6. ls_in_pre_stateful (northd.c:5852): reg0[2] == 1 && ip4 && tcp, priority 120, uuid 454a1f78reg1 = ip4.dst;reg2[0..15] = tcp.dst;ct_lb_mark;ct_lb_mark
----------7. ls_in_acl_hint (northd.c:5929): ct.new && !ct.est, priority 7, uuid 24ab3fd0reg0[7] = 1;reg0[9] = 1;next;8. ls_in_acl (northd.c:6545): ip && !ct.est, priority 1, uuid 8eaca776reg0[1] = 1;next;
11. ls_in_lb (northd.c:6858): ct.new && ip4.dst == 10.96.184.95 && tcp.dst == 10001, priority 120, uuid 6b816103reg0[1] = 0;reg1 = 10.96.184.95;reg2[0..15] = 10001;ct_lb_mark(backends=10.244.0.4:80);ct_lb_mark /* default (use --ct to customize) */
------------------------------------------------
14. ls_in_pre_hairpin (northd.c:6931): ip && ct.trk, priority 100, uuid 1328c195reg0[6] = chk_lb_hairpin();reg0[12] = chk_lb_hairpin_reply();*** chk_lb_hairpin_reply action not implementednext;
15. ls_in_nat_hairpin (northd.c:6940): ip && ct.new && ct.trk && reg0[6] == 1, priority 100, uuid 89e48276ct_snat_to_vip;*** ct_snat_to_vip action not implementednext;
16. ls_in_hairpin (northd.c:6965): (reg0[6] == 1 || reg0[12] == 1), priority 1, uuid 4680c239eth.dst <-> eth.src;outport = inport;flags.loopback = 1;output;egress(dp="node1", inport="ovn-poc_service-a-89c68dc96-fm272", outport="ovn-poc_service-a-89c68dc96-fm272")
-----------------------------------------------------------------------------------------------------------0. ls_out_pre_lb (northd.c:5822): ip, priority 100, uuid fe121cbfreg0[2] = 1;next;1. ls_out_pre_acl (northd.c:5651): ip, priority 100, uuid 105736e5reg0[0] = 1;next;2. ls_out_pre_stateful (northd.c:5872): reg0[2] == 1, priority 110, uuid 1c6b05efct_lb_mark;ct_lb_mark /* default (use --ct to customize) */
------------------------------------------------3. ls_out_acl_hint (northd.c:5992): ct.est && ct_mark.blocked == 0, priority 1, uuid f77da843reg0[10] = 1;next;8. ls_out_check_port_sec (northd.c:5505): 1, priority 0, uuid 4fb4d39freg0[15] = check_out_port_sec();next;9. ls_out_apply_port_sec (northd.c:5510): 1, priority 0, uuid 6d6e8323output;/* output to "ovn-poc_service-a-89c68dc96-fm272", type "" */

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/68720.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

JDK长期支持版本(LTS)

https://blogs.oracle.com/java/post/the-arrival-of-java-23 jdk长期支持版本&#xff08;LTS&#xff09;&#xff1a;JDK 8、11、17、21&#xff1a;

AI 在人形机器人发展中的作用

摘要&#xff1a;本文主要探讨了 AI 在人形机器人发展中的关键作用。通过对相关技术和应用案例的分析&#xff0c;阐述了 AI 如何赋予人形机器人智能感知、学习决策、自然语言处理及运动控制等能力&#xff0c;推动人形机器人在多领域的应用和产业发展&#xff0c;同时也对其面…

python(25) : 含有大模型生成的公式的文本渲染成图片并生成word文档(支持flask接口调用)

公式样例 渲染前 \[\sqrt{1904.615384} \approx 43.64\] 渲染后 安装依赖 pip install matplotlib -i https://mirrors.aliyun.com/pypi/simple/ requestspip install sympy -i https://mirrors.aliyun.com/pypi/simple/ requestspip install python-docx -i https://mirro…

SSM宠物医院信息管理系统

&#x1f345;点赞收藏关注 → 添加文档最下方联系方式咨询本源代码、数据库&#x1f345; 本人在Java毕业设计领域有多年的经验&#xff0c;陆续会更新更多优质的Java实战项目希望你能有所收获&#xff0c;少走一些弯路。&#x1f345;关注我不迷路&#x1f345; 项目视频 宠…

Swift 专题二 语法速查

一 、变量 let, var 变量是可变的&#xff0c;使用 var 修饰&#xff0c;常量是不可变的&#xff0c;使用 let 修饰。类、结构体和枚举里的变量是属性。 var v1:String "hi" // 标注类型 var v2 "类型推导" let l1 "标题" // 常量class a {…

mysql查看binlog日志

mysql 配置、查看binlog日志&#xff1a; 示例为MySQL8.0 1、 检查binlog开启状态 SHOW VARIABLES LIKE ‘log_bin’; 如果未开启&#xff0c;修改配置my.ini 开启日志 安装目录配置my.ini(mysql8在data目录) log-binmysql-bin&#xff08;开启日志并指定日志前缀&#xff…

某国际大型超市电商销售数据分析和可视化

完整源码项目包获取→点击文章末尾名片&#xff01; 本作品将从人、货、场三个维度&#xff0c;即客户维度、产品维度、区域维度&#xff08;补充时间维度与其他维度&#xff09;对某国际大型超市的销售情况进行数据分析和可视化报告展示&#xff0c;从而为该超市在弄清用户消费…

Linux 存储设备和 Ventoy 启动盘制作指南

一、Linux 存储设备基础知识 1. 设备路径&#xff08;/dev&#xff09; 设备路径是 Linux 系统中物理存储设备的唯一标识&#xff0c;类似设备的"身份证号"。 命名规则解析 /dev/sda&#xff1a; /dev&#xff1a;device&#xff08;设备&#xff09;的缩写&…

PostgreSQL-01-入门篇-简介

文章目录 1. PostgreSQL是什么?2. PostgreSQL 历史 2.1. 伯克利 POSTGRES 项目2.2. Postgres952.3. PostgreSQL来了 3. PostgreSQL vs MySQL4. 安装 4.1 Windows 安装4.2 linux 安装4.3 docker安装 1. PostgreSQL是什么 PostgreSQL 是一个基于加州大学伯克利分校计算机系开…

数仓建模:当DWS构建好后,突然来了一个新的需求,需要添加某个或某几个维度字段时,应该如何处理?

目录 1. 需求评估与分析 2. 表结构调整 3. ETL 流程修改 4. 数据更新和回填 5. 数据分析和报表调整

Git原理与应用(三)【远程操作 | 理解分布式 | 推送拉取远程仓库 | 标签管理】

Git 理解分布式版本控制系统远程仓库新建远程仓库克隆远程仓库向远程仓库推送配置Git忽略特殊文件 标签管理理解标签创建标签操作标签删除标签 理解分布式版本控制系统 我们⽬前所说的所有内容&#xff08;工作区&#xff0c;暂存区&#xff0c;版本库等等&#xff09;&#x…

TCP创建通信前的三次握手(为啥不是两次?)

1.三次握手的过程 客户端发送 SYN&#xff08;同步&#xff09;报文 客户端向服务器发送 SYN 标志的数据包&#xff0c;请求建立连接&#xff0c;表示 "你好&#xff0c;我要连接你"。 服务器回复 SYNACK&#xff08;同步确认&#xff09;报文 服务器收到 SYN 后&am…

一文夯实垃圾收集的理论基础

如何判断一个引用是否存活 引用计数法 给对象中添加一个引用计数器&#xff0c;每当有一个地方引用它&#xff0c;计数器就加 1&#xff1b;当引用失效&#xff0c;计数器就减 1&#xff1b;任何时候计数器为 0 的对象就是不可能再被使用的。 优点&#xff1a;可即刻回收垃圾&a…

回归算法、聚类算法、决策树、随机森林、神经网络

这也太全了&#xff01;回归算法、聚类算法、决策树、随机森林、神经网络、贝叶斯算法、支持向量机等十大机器学习算法一口气学完&#xff01;_哔哩哔哩_bilibili 【线性回归、代价函数、损失函数】动画讲解_哔哩哔哩_bilibili 14分钟详解所有机器学习算法&#xff1a;…

Spring Boot 配置(官网文档解读)

目录 摘要 Spring Boot 配置加载顺序 配置文件加载顺序 Spring Boot 配置加载方式 Value Value 注解简单示例 ConfigurationProperties 启动 ConfigurationProperties ConfigurationProperties 验证 ConfigurationProperties 与 Value 对比 Autowired Autowired 自…

机器学习-基本术语

文章目录 1. **数据集&#xff08;Dataset&#xff09;**2. **样本&#xff08;Sample&#xff09;**3. **属性&#xff08;Attribute&#xff09;**4. **特征&#xff08;Feature&#xff09;**5. **属性值&#xff08;Attribute Value&#xff09;**6. **属性空间&#xff08…

一款功能强大的互联网资产测绘引擎-CyberEdge

声明&#xff01;本文章所有的工具分享仅仅只是供大家学习交流为主&#xff0c;切勿用于非法用途&#xff0c;如有任何触犯法律的行为&#xff0c;均与本人及团队无关&#xff01;&#xff01;&#xff01; 目录标题 CyberEdge简洁而强大的互联网资产测绘工具核心特性搭建指南快…

细说STM32F407单片机电源低功耗StopMode模式及应用示例

目录 一、停止模式基础知识 1、进入停止模式 2、停止模式的状态 3、退出停止模式 4、SysTick定时器的影响 二、停止模式应用示例 1、示例功能和CubeMX项目配置 &#xff08;1&#xff09;时钟 &#xff08;2&#xff09;RTC &#xff08;3&#xff09;ADC1 &#xf…

【三国游戏——贪心、排序】

题目 代码 #include <bits/stdc.h> using namespace std; using ll long long; const int N 1e510; int a[N], b[N], c[N]; int w[4][N]; int main() {int n;cin >> n;for(int i 1; i < n; i)cin >> a[i];for(int i 1; i < n; i)cin >> b[i…

[Qt]事件-鼠标事件、键盘事件、定时器事件、窗口改变事件、事件分发器与事件过滤器

目录 前言&#xff1a;Qt与操作系统的关系 一、Qt事件 1.事件介绍 2.事件的表现形式 常见的Qt事件&#xff1a; 常见的事件描述: 3.事件的处理方式 处理鼠标进入和离开事件案例 控件添加到对象树底层原理 二、鼠标事件 1.鼠标按下和释放事件&#xff08;单击&#x…