Clarify healthz `unhealthy-count` and `last-unhealthy`
hellt opened this issue · 3 comments
Can we clarify the difference in descriptions for last-unhealthy
and unhealthy-count
?
Namely, last-unhealthy
indicates that the field should be modified any time a component is in a status that is not HEALTHY. UNSPECIFIED falls under this category.
At the same time, unhealthy-count
only counts transitions HEALTHY<->UNHEALTHY. Will unhealthy counter increment if the component moved from HEALTHY to UNSPECIFIED?
This subtle difference may lead to differences in implementation.
public/release/models/platform/openconfig-platform-healthz.yang
Lines 78 to 122 in de94e3b
To summarize, our reading of current model digests to the following state transition:
healthy
->unspecified
|last-unhealthy
changes |unhealthy-count
doesn't changeunhealthy
->unspecified
|last-unhealthy
changes |unhealthy-count
doesn't changeunspecified
->unhealthy
|last-unhealthy
changes |unhealthy-count
doesn't changeunspecified
->healthy
|last-unhealthy
doesn't change |unhealthy-count
doesn't changehealthy
->unhealthy
|last-unhealthy
changes |unhealthy-count
increments changeunhealthy
->healthy
|last-unhealthy
doesn't change |unhealthy-count
doesn't change
it should be once healthy it is any state transition out of that state
@marcushines then this addition should be valid - #853. If I understood your comment correctly.