sandbox-policy status: NotReady over Unknown, and no heal on an unreadable counter

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, kubernetes
領域
backend, security

調査の方向性

Start with the Ready status logic in status.go:238-243 and the heal interval handling in nodeowner.go:361. Read the tests around those paths and the #1067 → #1075 stack context before changing behavior. Add coverage for an unreadable counter with an over-threshold rate, and for witness-only versus node-fault errors; done when both fixes and tests are included after the stack merges.

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

説明

Follow-up from the review of #1073 (two lows, kept out of the stack).

1. NotReady should win over Unknown

When a witness counter cannot be read, Ready stays Unknown (reason WitnessUnknown) even if the fail-closed rate is over the NotReady threshold (status.go:238-243): the rate check runs only when Ready would be True. The rate shows in Degraded, but not in Ready.

A rate over the threshold is a known problem. Unknown should mean "nothing known is wrong, but a counter is unreadable".

Fix: evaluate the fail-closed rate first; report NotReady when it is over the threshold, and Unknown only otherwise. One test with an unreadable counter and a rate over the threshold.

2. Heals on an unreadable counter

A health error that is only an unreadable counter starts a heal. When the unreadable slot counter sits next to node faults, the error matches ErrNodeFaultsOnly and waits the 10-minute node interval (nodeowner.go:361).

An unreadable counter is not a fault that a heal clears; it is already reported as Unknown.

Fix: no heal for a witness-only error. Use the 10-minute node interval only when every leaf of the error is a node fault. Tests for both cases.

Done when

  • Both changes are in, with tests, after the #1067 → #1075 stack merges.
主要言語
Go
スター
39
フォーク
42
平均マージ
2日 16時間
マージ済み PR(30日)
48

環境構築

はじめの一歩

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

kubescape/node-agent のほかの issue

kubescape/node-agent の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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