`rate_limit_nic_packets_total` keeps the old count after a NIC meter is created again

Aperta
#2,052 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
69/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start with nic-offload/src/mlx5/install.rs and stats/src/scrape.rs, where the issue identifies the NIC counter reset and the recorder retaining its maximum. Trace how meter recreation updates the counter and how scrape values are held, then check for tests covering counter resets. Done when the exported metric follows the restarted NIC count (or the NIC count continues across recreation) and the reported delta is correct.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

After a NIC meter is created again under the same name, rate_limit_nic_packets_total keeps exporting the old meter's count until the new count passes it. The NIC count restarts at 0 (report in nic-offload/src/mlx5/install.rs sets it with counter.absolute()), but the recorder keeps the larger value: *held = (*held).max(value) in stats/src/scrape.rs. Deltas read across the restart come out short by the old count.

Seen on v0.38.2 (fabricator v0.51.4) on env-5, ConnectX-7, DPDK driver:

  1. Create a gateway peering with a rate-limits annotation, send traffic through it, and read rate_limit_nic_packets_total with result="conforming" on the gateway: 314,606.
  2. Delete the peering, create it again with the same annotation, and read the metric before any traffic: still 314,606.
  3. Send 13,889,592 UDP packets. The dataplane log line meter vpc-01--vpc-04/rl (bits) in the NIC counts from 0 and ends at passed 2518699 packets, dropped 11370914 packets. The metric reads 2,518,699, so its delta from step 2 is 2,204,093.
curl -s 127.0.0.1:9442/metrics | grep '^rate_limit_nic_packets_total'
kubectl -n fab logs <gateway pod> -c dataplane | grep 'in the NIC: passed'

The metric should follow the NIC's count after the meter is created again, or the NIC's count should continue across it.

Lingua principale
Rust
Stelle
21
Fork
9
Merge medio
2g 8h
PR unite (30g)
99

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di githedgehog/dataplane

Tutte le issue di githedgehog/dataplane

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.