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

オープン
#2,052 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
69/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
21
フォーク
9
平均マージ
2日 8時間
マージ済み PR(30日)
99

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

githedgehog/dataplane のほかの issue

githedgehog/dataplane の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。