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

Abierto
#1,113 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, kubernetes
Área
backend, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Go
Estrellas
39
Forks
42
Merge medio
2 d 16 h
PR fusionados (30 d)
48

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de kubescape/node-agent

Todos los issues de kubescape/node-agent

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.