integration/*: extend Runtime.Status response
CRI Runtime Status contains `Info` and it can help us check current configuration. Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
401d4b491f
commit
ec759f5be4
@ -120,7 +120,7 @@ type RuntimeService interface {
|
||||
// UpdateRuntimeConfig updates runtime configuration if specified
|
||||
UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig, opts ...grpc.CallOption) error
|
||||
// Status returns the status of the runtime.
|
||||
Status(opts ...grpc.CallOption) (*runtimeapi.RuntimeStatus, error)
|
||||
Status(opts ...grpc.CallOption) (*runtimeapi.StatusResponse, error)
|
||||
// RuntimeConfig returns configuration information of the runtime.
|
||||
// A couple of notes:
|
||||
// - The RuntimeConfigRequest object is not to be confused with the contents of UpdateRuntimeConfigRequest.
|
||||
|
@ -513,12 +513,12 @@ func (r *RuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeCo
|
||||
}
|
||||
|
||||
// Status returns the status of the runtime.
|
||||
func (r *RuntimeService) Status(opts ...grpc.CallOption) (*runtimeapi.RuntimeStatus, error) {
|
||||
func (r *RuntimeService) Status(opts ...grpc.CallOption) (*runtimeapi.StatusResponse, error) {
|
||||
klog.V(10).Infof("[RuntimeService] Status (timeout=%v)", r.timeout)
|
||||
ctx, cancel := getContextWithTimeout(r.timeout)
|
||||
defer cancel()
|
||||
|
||||
resp, err := r.runtimeClient.Status(ctx, &runtimeapi.StatusRequest{}, opts...)
|
||||
resp, err := r.runtimeClient.Status(ctx, &runtimeapi.StatusRequest{Verbose: true}, opts...)
|
||||
if err != nil {
|
||||
klog.Errorf("Status from runtime service failed: %v", err)
|
||||
return nil, err
|
||||
@ -532,7 +532,7 @@ func (r *RuntimeService) Status(opts ...grpc.CallOption) (*runtimeapi.RuntimeSta
|
||||
return nil, errors.New(errorMessage)
|
||||
}
|
||||
|
||||
return resp.Status, nil
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// RuntimeConfig returns the CgroupDriver of the runtime.
|
||||
|
Loading…
Reference in New Issue
Block a user