Tags: google/cadvisor
Tags
fix: handle nil Health state in docker container handler Container.State.Health can be nil when no health check is configured. Check for nil before accessing .Status to prevent panic. Fixes nil pointer dereference in newDockerContainerHandler when inspecting containers without health checks. Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Use built-in error wrapping instead of pkg/errors (#3689) github.com/pkg/errors is archived and unmaintained; this replaces that as follows: * instead of extracting the cause for os.IsNotExist, use errors.Is directly (which unwraps errors itself) * wrap errors using fmt.Errorf (wrapped errors using pkg/errors add the error message after a colon, so this changes the format to match) * errors.Wrapf is replaced with fmt.Errorf Signed-off-by: Stephen Kitt <skitt@redhat.com> Co-authored-by: Davanum Srinivas <davanum@gmail.com>
PreviousNext