Page MenuHomePhabricator

changeprop-jobqueue in codfw rows E & F has no IPv6 connectivity to kafka-main
Closed, ResolvedPublic

Description

After deploying changeprop-jobqueue in codfw, we discovered that some replicas were crashing with a transport error:

{"name":"cpjobqueue","hostname":"changeprop-production-697d48f9c7-pb984","pid":1,"level":"FATAL","err":{"message":"broker transport failure","name":"Error","stack":"Error: Local: Broker transport failure\n    at Function.createLibrdkafkaError [as create] (/srv/service/node_modules/node-rdkafka/lib/error.js:456:10)\n    at /srv/service/node_modules/node-rdkafka/lib/client.js:350:28","code":-195,"origin":"local","errno":-195},"stack":"Error: Local: Broker transport failure\n    at Function.createLibrdkafkaError [as create] (/srv/service/node_modules/node-rdkafka/lib/error.js:456:10)\n    at /srv/service/node_modules/node-rdkafka/lib/client.js:350:28","levelPath":"fatal/startup","msg":"Message not supplied","time":"2026-08-03T17:34:16.008Z","v":0}
rzl@deploy1003:/srv/deployment-charts/helmfile.d/services/changeprop-jobqueue$ kubectl get pod -o wide --sort-by 'spec.nodeName'
NAME                                     READY   STATUS             RESTARTS        AGE     IP               NODE                              NOMINATED NODE   READINESS GATES
changeprop-production-6fbff89654-wsmv2   3/3     Running            0               4m50s   10.194.151.141   wikikube-worker2001.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-99cc2   3/3     Running            0               4m58s   10.194.232.54    wikikube-worker2037.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-hmqsn   3/3     Running            0               4m56s   10.194.230.36    wikikube-worker2064.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-xck8n   3/3     Running            0               4m54s   10.194.135.5     wikikube-worker2073.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-8nl8p   3/3     Running            0               4m57s   10.194.159.109   wikikube-worker2078.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-f7ncz   3/3     Running            0               4m56s   10.194.139.1     wikikube-worker2090.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-cdddq   3/3     Running            0               4m58s   10.194.207.132   wikikube-worker2110.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-pdwll   3/3     Running            0               4m53s   10.194.203.221   wikikube-worker2149.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-7mt7n   3/3     Running            0               4m41s   10.194.190.26    wikikube-worker2161.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-t66bd   3/3     Running            0               4m58s   10.194.243.163   wikikube-worker2167.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-mw29g   3/3     Running            0               4m54s   10.194.162.27    wikikube-worker2187.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-lrmcb   3/3     Running            0               4m38s   10.194.162.156   wikikube-worker2201.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-zlrw2   3/3     Running            0               4m58s   10.194.183.121   wikikube-worker2210.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-kv8rc   3/3     Running            0               4m36s   10.194.183.217   wikikube-worker2270.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-5btht   3/3     Running            0               4m51s   10.194.198.221   wikikube-worker2281.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-dxb4h   3/3     Running            0               4m38s   10.194.160.130   wikikube-worker2284.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-k57w8   3/3     Running            0               4m37s   10.194.143.0     wikikube-worker2298.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-7jkkp   3/3     Running            0               4m24s   10.194.153.31    wikikube-worker2302.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-t26nm   3/3     Running            0               4m58s   10.194.170.49    wikikube-worker2303.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-h7ghk   3/3     Running            0               4m43s   10.194.138.126   wikikube-worker2311.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-dtst2   3/3     Running            0               4m24s   10.194.161.157   wikikube-worker2331.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-fjdpf   2/3     CrashLoopBackOff   4 (27s ago)     4m37s   10.194.187.111   wikikube-worker2332.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-j4v6r   3/3     Running            4 (94s ago)     4m37s   10.194.133.169   wikikube-worker2337.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-rsm4s   2/3     CrashLoopBackOff   4 (26s ago)     4m43s   10.194.220.17    wikikube-worker2342.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-4xq2s   3/3     Running            3 (2m45s ago)   4m39s   10.194.221.246   wikikube-worker2345.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-8lf9s   2/3     CrashLoopBackOff   4 (21s ago)     4m40s   10.194.129.27    wikikube-worker2349.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-c7zvk   3/3     Running            3 (2m31s ago)   4m40s   10.194.212.180   wikikube-worker2353.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-dbwfs   2/3     CrashLoopBackOff   4 (29s ago)     4m41s   10.194.169.208   wikikube-worker2360.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-2t77n   2/3     CrashLoopBackOff   4 (24s ago)     4m41s   10.194.203.172   wikikube-worker2364.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-qbrrh   2/3     CrashLoopBackOff   4 (16s ago)     4m39s   10.194.161.78    wikikube-worker2374.codfw.wmnet   <none>           <none>

In particular note that's sorted by node name, which in this case roughly correlates with location -- all the pods with failures (in the bottom 9 rows) are scheduled on workers in rows E and F, with the new network design.

(This is after rolling back the changeprop config change we were deploying, so we've ruled it out as a cause.)

@Scott_French has some additional data which I'll let him add, but the punchline is: from inside the network namespace in rows A-D we have IPv4 and IPv6 connectivity to the kafka brokers, and from rows E/F we have IPv4 only.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1320218 had a related patch set uploaded (by RLazarus; author: RLazarus):

[operations/deployment-charts@master] changeprop: Add a nodeAffinity rule against codfw rows E and F

https://gerrit.wikimedia.org/r/1320218

This is an interesting one.

changeprop-production-6fbff89654-rsm4s is one of the pods that is (or was; see NOTE below) crash looping, complaining about Kafka broker connectivity ("Broker transport failure").

Let's nsenter into the netns of the pod and see whether we can connect to an arbitrary broker:

swfrench@wikikube-worker2342:~$ sudo nsenter -n -t 2554447
root@wikikube-worker2342:/home/swfrench# nc -v -4 kafka-main2008.codfw.wmnet 9093
Connection to kafka-main2008.codfw.wmnet (10.192.29.28) 9093 port [tcp/*] succeeded!
^C
root@wikikube-worker2342:/home/swfrench# nc -v -6 kafka-main2008.codfw.wmnet 9093
^C
root@wikikube-worker2342:/home/swfrench# # ^ hangs

Indeed, it seems we only have connectivity on v4. What about a healthy pod?

Let's nsenter into the netns of changeprop-production-6fbff89654-dxb4h:

swfrench@wikikube-worker2284:~$ sudo nsenter -n -t 3240930
root@wikikube-worker2284:/home/swfrench# nc -v -4 kafka-main2008.codfw.wmnet 9093
Connection to kafka-main2008.codfw.wmnet (10.192.29.28) 9093 port [tcp/*] succeeded!
^C
root@wikikube-worker2284:/home/swfrench# nc -v -6 kafka-main2008.codfw.wmnet 9093
Connection to kafka-main2008.codfw.wmnet (2620:0:860:116:10:192:29:28) 9093 port [tcp/*] succeeded!
^C
root@wikikube-worker2284:/home/swfrench#

Alright - v6 connectivity works in the happy case and is suspect in the sad case.

Back on changeprop-production-6fbff89654-rsm4s can we see what these suspect connections look like?

root@wikikube-worker2342:/home/swfrench# ss -tn dport 9093 
State          Recv-Q       Send-Q                                     Local Address:Port                              Peer Address:Port
ESTAB          0            0                                          10.194.220.17:33448                             10.192.29.28:9093
ESTAB          0            0                                          10.194.220.17:33272                             10.192.29.28:9093
< ... snip ... >
ESTAB          0            0                                          10.194.220.17:60668                             10.192.41.25:9093
SYN-SENT       0            1                  [2620:0:860:cabe:7ce5:8563:4873:5ad1]:54634             [2620:0:860:112:10:192:22:6]:9093
SYN-SENT       0            1                  [2620:0:860:cabe:7ce5:8563:4873:5ad1]:54612             [2620:0:860:112:10:192:22:6]:9093
SYN-SENT       0            1                  [2620:0:860:cabe:7ce5:8563:4873:5ad1]:54622             [2620:0:860:112:10:192:22:6]:9093
SYN-SENT       0            1                  [2620:0:860:cabe:7ce5:8563:4873:5ad1]:54642             [2620:0:860:112:10:192:22:6]:9093
SYN-SENT       0            1                  [2620:0:860:cabe:7ce5:8563:4873:5ad1]:54652             [2620:0:860:112:10:192:22:6]:9093
SYN-SENT       0            1                  [2620:0:860:cabe:7ce5:8563:4873:5ad1]:54624             [2620:0:860:112:10:192:22:6]:9093

So, we're getting stuck in SYN-SENT when using v6.

NOTE: See how we're also seeing working v4 connections? This probably explains why we eventually see things settle down in the unhappy case (e.g., if the order of the returned v4 vs. v6 addresses is nondeterministic during resolution).

What do things look like over on an arbitrary Kafka broker?

swfrench@kafka-main2010:~$ traceroute 10.194.220.17
traceroute to 10.194.220.17 (10.194.220.17), 30 hops max, 60 byte packets
 1  irb-2048.lsw1-d6-codfw.codfw.wmnet (10.192.41.1)  12.312 ms  12.293 ms  12.285 ms
 2  anycast-gw-2019-codfw.codfw.wmnet (10.192.32.1)  6.227 ms  1.785 ms  6.211 ms
 3  et-0-0-28.ssw1-e1-codfw.codfw.wmnet (10.192.253.159)  1.886 ms et-0-0-27.ssw1-f1-codfw.codfw.wmnet (10.192.253.167)  6.162 ms et-0-0-27.ssw1-e1-codfw.codfw.wmnet (10.192.253.157)  1.870 ms
 4  ethernet-1-55.lsw1-e5-codfw.codfw.wmnet (10.192.253.135)  0.425 ms  0.417 ms  0.409 ms
 5  wikikube-worker2342.codfw.wmnet (10.192.46.2)  0.128 ms  0.133 ms  0.210 ms^C
swfrench@kafka-main2010:~$ 
swfrench@kafka-main2010:~$ traceroute6 2620:0:860:cabe:7ce5:8563:4873:5ad1
traceroute to 2620:0:860:cabe:7ce5:8563:4873:5ad1 (2620:0:860:cabe:7ce5:8563:4873:5ad1), 30 hops max, 80 byte packets
 1  irb-2048.lsw1-d6-codfw.codfw.wmnet (2620:0:860:120::1)  12.928 ms  12.908 ms  12.899 ms
 2  lo0-5000.ssw1-d1-codfw.codfw.wmnet (2620:0:860:13f::13)  6.772 ms lo0-5000.ssw1-d8-codfw.codfw.wmnet (2620:0:860:13f::14)  1.913 ms lo0-5000.ssw1-d1-codfw.codfw.wmnet (2620:0:860:13f::13)  6.755 ms
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  *^C

Interesting, so a v4 traceroute looks broadly like what I'd expect, while a v6 traceroute never seems to get past the D spine switch (insert usual traceroute grain of salt). Puzzling.

Looking at grafana, it looks like calico is announcing both the v4 and v6 pod IP prefixes to the ToR (just going by prefix counts) and they're being accepted. I wonder if they're not making it to the SSW somehow?

I don't think it's something about host-level connectivity - e.g., I can connect to the brokers on v6 without issue from the host itself (wikikube-worker2342), and it's only when I nsenter into the pod's netns - thus egressing from the pod IP - that v6 is borked.

Change #1320218 merged by jenkins-bot:

[operations/deployment-charts@master] changeprop: Add a nodeAffinity rule against codfw rows E and F

https://gerrit.wikimedia.org/r/1320218

Change #1320275 had a related patch set uploaded (by RLazarus; author: RLazarus):

[operations/deployment-charts@master] changeprop: Apply the correct (if surprising) number of "affinity:"s

https://gerrit.wikimedia.org/r/1320275

Change #1320275 merged by jenkins-bot:

[operations/deployment-charts@master] changeprop: Apply the correct (if surprising) number of "affinity:"s

https://gerrit.wikimedia.org/r/1320275

Apologies for this one folks, it seems this was due to a misconfiguration on our end that's always been there in these rows but was not noticed before.

On the spine switches in codfw rows e/f (which is our only non-EVPN spine/leaf "pod", and thus has a separate configuration), we had this in the export policy towards the CRs / other switches:

set policy-options policy-statement core_out term subnet6 from protocol bgp
set policy-options policy-statement core_out term subnet6 from route-filter ::/0 prefix-length-range /16-/64

The issue is the prefix length filter is only allowing "regular" size IPv6 subnets, i.e. of minimum size a /64. Calico uses the barmy /122 sized subnets which had escaped me when we first put this together.

I've manually adjusted this on ssw1-e1-codfw now and things seem to be better, packets now at least make it to the host:

cmooney@cumin1003:~$ mtr -b -w -c 5 2620:0:860:cabe:7ce5:8563:4873:5ad1
Start: 2026-08-04T08:19:10+0000
HOST: cumin1003                                                    Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- ae2-1018.cr1-eqiad.wikimedia.org (2620:0:861:102:fe00::1)     0.0%     5    1.3   1.6   0.4   5.0   2.0
  2.|-- et-1-0-2.cr1-codfw.wikimedia.org (2620:0:860:fe01::2)         0.0%     5   31.0  30.9  30.6  31.0   0.2
  3.|-- et-0-0-31.100.ssw1-e1-codfw.codfw.wmnet (2620:0:860:139::1b)  0.0%     5   33.6  37.0  32.3  50.9   7.8
  4.|-- ethernet-1-56.lsw1-e5-codfw.codfw.wmnet (2620:0:860:139::2f)  0.0%     5   30.8  30.7  30.6  31.0   0.2
  5.|-- ???                                                          100.0     5    0.0   0.0   0.0   0.0   0.0
cmooney@wikikube-worker2342:~$ sudo tcpdump -i ens1f0np0 -l -p -nn host 2620:0:861:102:10:64:16:154 
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on ens1f0np0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
08:19:11.128733 IP6 2620:0:861:102:10:64:16:154 > 2620:0:860:cabe:7ce5:8563:4873:5ad1: ICMP6, echo request, id 859, seq 33004, length 24
08:19:11.230877 IP6 2620:0:861:102:10:64:16:154 > 2620:0:860:cabe:7ce5:8563:4873:5ad1: ICMP6, echo request, id 859, seq 33005, length 24

I'll make a patch now to roll this change out everywhere.

Change #1320750 had a related patch set uploaded (by Cathal Mooney; author: Cathal Mooney):

[operations/homer/public@master] L3 Switch Policy: core-out for unicast EBGP not allowing Calico /122s

https://gerrit.wikimedia.org/r/1320750

Change #1320750 merged by jenkins-bot:

[operations/homer/public@master] L3 Switch Policy: core-out for unicast EBGP not allowing Calico /122s

https://gerrit.wikimedia.org/r/1320750

Change #1320761 had a related patch set uploaded (by Effie Mouzeli; author: Effie Mouzeli):

[operations/deployment-charts@master] changeprop-jobqueue: removing node affinity

https://gerrit.wikimedia.org/r/1320761

Change #1320761 merged by jenkins-bot:

[operations/deployment-charts@master] changeprop-jobqueue: removing node affinity

https://gerrit.wikimedia.org/r/1320761

jijiki claimed this task.
jijiki triaged this task as High priority.
jijiki subscribed.

I reverted the patch, and now I see wikikube-worker2374.codfw.wmnet, wikikube-worker2366.codfw.wmnet, wikikube-worker2366.codfw.wmnet, all of which are on rows E and F.

Many thanks @cmooney!

NAME                                     READY   STATUS    RESTARTS   AGE   IP               NODE                              NOMINATED NODE   READINESS GATES
changeprop-production-6fbff89654-zpvfb   3/3     Running   0          69s   10.194.150.160   wikikube-worker2002.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-ql84q   3/3     Running   0          76s   10.194.225.219   wikikube-worker2015.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-m7lqx   3/3     Running   0          72s   10.194.232.34    wikikube-worker2037.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-c46bh   3/3     Running   0          76s   10.194.171.241   wikikube-worker2056.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-7tbmg   3/3     Running   0          74s   10.194.230.47    wikikube-worker2064.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-rcxbm   3/3     Running   0          43s   10.194.253.49    wikikube-worker2091.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-7pg5p   3/3     Running   0          73s   10.194.195.33    wikikube-worker2094.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-xzwfb   3/3     Running   0          72s   10.194.207.192   wikikube-worker2124.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-kxcgn   3/3     Running   0          43s   10.194.231.167   wikikube-worker2131.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-spttd   3/3     Running   0          56s   10.194.169.20    wikikube-worker2135.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-h48km   3/3     Running   0          74s   10.194.176.196   wikikube-worker2172.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-zjk66   3/3     Running   0          55s   10.194.148.131   wikikube-worker2198.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-mggkp   3/3     Running   0          70s   10.194.233.173   wikikube-worker2199.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-pzkrw   3/3     Running   0          69s   10.194.160.22    wikikube-worker2203.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-4t5nz   3/3     Running   0          75s   10.194.219.142   wikikube-worker2214.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-fsrt4   3/3     Running   0          76s   10.194.207.76    wikikube-worker2254.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-tvskw   3/3     Running   0          53s   10.194.160.158   wikikube-worker2284.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-d8rmz   3/3     Running   0          76s   10.194.197.216   wikikube-worker2290.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-g8ds7   3/3     Running   0          54s   10.194.251.232   wikikube-worker2299.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-7gsvk   3/3     Running   0          71s   10.194.206.92    wikikube-worker2320.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-29qk4   3/3     Running   0          76s   10.194.181.18    wikikube-worker2324.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-r5thv   3/3     Running   0          53s   10.194.160.244   wikikube-worker2333.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-bq4jv   3/3     Running   0          57s   10.194.133.149   wikikube-worker2337.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-zfbdf   3/3     Running   0          58s   10.194.157.8     wikikube-worker2347.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-j4qkl   3/3     Running   0          56s   10.194.172.246   wikikube-worker2351.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-7zmwm   3/3     Running   0          56s   10.194.169.192   wikikube-worker2360.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-gvvmj   3/3     Running   0          59s   10.194.203.179   wikikube-worker2364.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-gwz9m   3/3     Running   0          58s   10.194.186.173   wikikube-worker2366.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-vhqv8   3/3     Running   0          55s   10.194.153.223   wikikube-worker2370.codfw.wmnet   <none>           <none>
changeprop-production-6fbff89654-w4wzt   3/3     Running   0          57s   10.194.161.112   wikikube-worker2374.codfw.wmnet   <none>           <none>