The output format is now used by the `Complete()` function, so it must
be set before invoking said function.
The commit also adds a unit tests for this scenario.
Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
Implements device-specific health check timeouts in the DRA health monitoring
system as defined in KEP-4680. This allows DRA drivers to specify custom
timeout values for individual devices through the gRPC health API.
Changes:
- Add HealthCheckTimeout field to state.DeviceHealth struct to store
device-specific timeout durations
- Add health_check_timeout_seconds field to DeviceHealth proto message
in the DRA health gRPC API (v1alpha1)
- Update manager.go to extract timeout from gRPC responses and apply
DefaultHealthTimeout (30s) when not specified
- Handle negative timeout values defensively by logging a warning and
falling back to the default timeout
- Simplify healthinfo.go by removing redundant fallback logic since
timeouts are now always set at creation time
- Update tests to include HealthCheckTimeout in test fixtures
The timeout behavior is:
- Positive values: Use the specified timeout in seconds
- Zero or unspecified: Use DefaultHealthTimeout (30 seconds)
- Negative values: Log warning and use DefaultHealthTimeout
This implementation provides flexibility for DRA drivers to define
appropriate health check intervals for different device types while
maintaining backward compatibility through sensible defaults.
Ref: KEP-4680 (Add Resource Health to Pod Status)
Ref: kubernetes/enhancements#5476
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
keep only the test stub, as all the code was already
removed by PR in the series because superseded by
code in cpumanager_test.go,
which will be moved in cpu_manager_test.go at the
end of this series.
Split to make the review easier.
Signed-off-by: Francesco Romani <fromani@redhat.com>
superseded by code in cpumanager_test.go,
which will be moved in cpu_manager_test.go at the
end of this series.
Split to make the review easier.
Signed-off-by: Francesco Romani <fromani@redhat.com>
superseded by code in cpumanager_test.go,
which will be moved in cpu_manager_test.go at the
end of this series.
Split to make the review easier.
Signed-off-by: Francesco Romani <fromani@redhat.com>
superseded by code in cpumanager_test.go,
which will be moved in cpu_manager_test.go at the
end of this series.
Split to make the review easier.
Signed-off-by: Francesco Romani <fromani@redhat.com>
superseded by code in cpumanager_test.go,
which will be moved in cpu_manager_test.go at the
end of this series.
Split to make the review easier.
Signed-off-by: Francesco Romani <fromani@redhat.com>
superseded by code in cpumanager_test.go,
which will be moved in cpu_manager_test.go at the
end of this series.
Split to make the review easier.
Signed-off-by: Francesco Romani <fromani@redhat.com>