Page MenuHomePhabricator

Blackbox probe for TLS cert expiry failing on multiple eqiad SR-Linux nodes
Open, MediumPublic

Description

We had some cert alerts come in for cert expiry on devices in eqiad rows c and d:

gNMI TLS certificate for lsw1-c7-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-d2-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-c3-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-c2-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-c6-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for ssw1-d8-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-d4-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-d3-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-c4-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-c5-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for lsw1-d7-eqiad.mgmt.eqiad.wmnet is going to expire in 0s
gNMI TLS certificate for ssw1-d1-eqiad.mgmt.eqiad.wmnet is going to expire in 0s

I think the recent patches to update the alerting have messed up the "expire time" message here. It should only say 0s if it has already expired, however these aren't due to expire for approx 6 weeks:

cmooney@cumin1003:~$ openssl s_client -connect ssw1-d8-eqiad.mgmt.eqiad.wmnet:443 </dev/null 2>/dev/null | openssl x509 -noout -dates 
notBefore=Jul 31 13:34:00 2025 GMT
notAfter=Jul 31 13:34:00 2026 GMT

Further I think our cookbook to renew the certs only works if it's due to expire within four weeks, so right now running the cookbook does not issue a fresh cert, so we can't clear the alerts that way.

cmooney@cumin1003:~$ sudo cookbook sre.network.tls ssw1-d8-eqiad
Acquired lock for key /spicerack/locks/cookbooks/sre.network.tls: {'concurrency': 20, 'created': '2026-06-15 17:40:26.351828+00:00', 'owner': 'cmooney@cumin1003 [4192695]', 'ttl': 1800}
START - Cookbook sre.network.tls for network device ssw1-d8-eqiad
ssw1-d8-eqiad: 👍 Nothing to do.
Released lock for key /spicerack/locks/cookbooks/sre.network.tls: {'concurrency': 20, 'created': '2026-06-15 17:40:26.351828+00:00', 'owner': 'cmooney@cumin1003 [4192695]', 'ttl': 1800}
END (PASS) - Cookbook sre.network.tls (exit_code=0) for network device ssw1-d8-eqiad

Anyway these aren't going to expire this evening I will take a closer look tomorrow.

Event Timeline

cmooney triaged this task as Medium priority.

So something odd is going on here. If I query thanos only two Nokia devices in eqiad are currently showing a probe_ssl_earliest_cert_expiry value:

probe_ssl_earliest_cert_expiry{instance="lsw1-d7-eqiad.mgmt.eqiad.wmnet:57400", job="probes/grpc", module="gnmi_connect", site="eqiad"} 1785518640
probe_ssl_earliest_cert_expiry{instance="lswtest-d8-eqiad.mgmt.eqiad.wmnet:57400", job="probes/grpc", module="gnmi_connect",  site="eqiad"} 1795710660

Those devices didn't alert, checking the timestamp for lsw1-d7-eqiad it corresponds to Jul 31 05:24, very close to the ones that are not showing.

In fact searching more I can see that we had values for the devices that are alerting up until shortly before the alerts fired yesterday:

image.png (1,519×868 px, 122 KB)

So it seems like the issue isn't any problem with the way the alert is set up, but that for some reason the blackbox probes have stopped working for most - but not all - Nokia devices on site? If I look on prometheus1005 I can see it is still configured to run the probes for this device (in /srv/prometheus/ops/targets/probes-grpc_site.yaml):

- targets:
  - lsw1-c3-eqiad.mgmt.eqiad.wmnet:57400
  labels:
    module: gnmi_connect
    role: asw

Looking at the logs that is indeed the case, we've a ton of this since the time they stopped yesterday:

Jun 15 17:14:13 prometheus1005 prometheus-blackbox-exporter[1334269]: time=2026-06-15T17:14:13.786Z level=ERROR source=tcp.go:131 msg="Error dialing TCP" module=gnmi_connect target=lsw1-c4-eqiad.mgmt.eqiad.wmnet:57400 err="context deadline exceeded"
Jun 15 17:14:13 prometheus1005 prometheus-blackbox-exporter[1334269]: time=2026-06-15T17:14:13.786Z level=ERROR source=handler.go:135 msg="Probe failed" module=gnmi_connect target=lsw1-c4-eqiad.mgmt.eqiad.wmnet:57400 duration_seconds=5.001023203

Raw TCP connectivity seems ok:

root@prometheus1005:/srv# telnet lsw1-c4-eqiad.mgmt.eqiad.wmnet 57400 
Trying 10.65.4.161...
Connected to lsw1-c4-eqiad.mgmt.eqiad.wmnet.

Connecting with OpenSSL fails though, the TLS handshake does not progress once the TCP socket is open. Looking on one of the affected switches I see this logged at the time it started failing:

2026-06-15T17:14:08.777 sr_grpc_server: debug|7552|E: common    server_context_util.cc:235 AuthContextObserverAddConnection  failed to spawn grpc connection watcher thread (ret 11) for fd=35 (peer='ipv4:10.64.0.82:42728'), connections in list 2

I ussed this command on lsw1-c4-eqiad:

tools system app-management application grpc_server restart warm

Which seems to have resolved it, I can now get the cert returned with a manual openssl command from a prometheus host. I will wait a few minutes to see if we start getting stats for the cert expiry for that switch again, and gnmic stats are ok. If they are I'll do the same for all the affected hosts.

cmooney renamed this task from Network device tls certs: alerting niggles to Blackbox probe for TLS cert expriy failing on multiple eqiad SR-Linux nodes.Jun 16 2026, 6:51 PM

Mentioned in SAL (#wikimedia-operations) [2026-06-16T19:18:15Z] <topranks> restarting grpc server on eqiad SR-Linux switches to recover from problem of no free threads T429242

Alight small gap when gnmic had to reconnect but other than that lsw1-c4-eqiad is back working ok.

I've run the same command for all alerting switches and the alerts have cleared. We'll have to keep an eye open on this one. It may be a knock-on from last week's aborted attempt to re-subscribe to the 'components' path on the eqiad (SR-Linux v24.10) devices, which failed (see T428685).

Anyway for now this seems ok, resolving. With any luck these fire for real in a few weeks to advise us of the cert expiry.

Thanks. I'll run the "fix" for all but one switch and open a ticket with Nokia.

lsw1-d2-eqiad has been left in a "bad" state and I opened 05827811 against it with Nokia.

Nokia came back to advise this is a known bug in 24.10.4.

Hello Cathal,

The gRPC server stops responding on SR-Linux?24.10.4 because of a known bug that exhausts gRPC threads and leaves TCP sessions in CLOSE_WAIT state. The bug is present only in version?24.10.4 and is fixed in the next release?24.10.5.

Action Plan:-

1.Deploy the upgrade to SR-Linux?24.10.5 on all affected 7220-IXR devices as soon as it is available.

2.Until the upgrade is complete, schedule regular warm restarts of the gRPC server (e.g., nightly) or implement the monitoring script to trigger restarts automatically.

Not entirely unexpected. One thought that strikes me is how often are we doing these blackbox probes? I looked into it and I believe they get executed every time the blackbox exporter metrics endpoint is scraped by prometheus, so likely every minute? That's way more frequently than we need for this, but it's not clear we can reduce the frequency just for these without affecting other blackbox checks.

I had a quick look at the doc and indeed I couldn't find a way to increase the check interval.

• Aklapper renamed this task from Blackbox probe for TLS cert expriy failing on multiple eqiad SR-Linux nodes to Blackbox probe for TLS cert expiry failing on multiple eqiad SR-Linux nodes.Jul 7 2026, 9:29 AM