Skip to content

Commit ec759f5

Browse files
committed
integration/*: extend Runtime.Status response
CRI Runtime Status contains `Info` and it can help us check current configuration. Signed-off-by: Wei Fu <[email protected]>
1 parent 401d4b4 commit ec759f5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

integration/cri-api/pkg/apis/services.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ type RuntimeService interface {
120120
// UpdateRuntimeConfig updates runtime configuration if specified
121121
UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig, opts ...grpc.CallOption) error
122122
// Status returns the status of the runtime.
123-
Status(opts ...grpc.CallOption) (*runtimeapi.RuntimeStatus, error)
123+
Status(opts ...grpc.CallOption) (*runtimeapi.StatusResponse, error)
124124
// RuntimeConfig returns configuration information of the runtime.
125125
// A couple of notes:
126126
// - The RuntimeConfigRequest object is not to be confused with the contents of UpdateRuntimeConfigRequest.

integration/remote/remote_runtime.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,12 @@ func (r *RuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeCo
513513
}
514514

515515
// Status returns the status of the runtime.
516-
func (r *RuntimeService) Status(opts ...grpc.CallOption) (*runtimeapi.RuntimeStatus, error) {
516+
func (r *RuntimeService) Status(opts ...grpc.CallOption) (*runtimeapi.StatusResponse, error) {
517517
klog.V(10).Infof("[RuntimeService] Status (timeout=%v)", r.timeout)
518518
ctx, cancel := getContextWithTimeout(r.timeout)
519519
defer cancel()
520520

521-
resp, err := r.runtimeClient.Status(ctx, &runtimeapi.StatusRequest{}, opts...)
521+
resp, err := r.runtimeClient.Status(ctx, &runtimeapi.StatusRequest{Verbose: true}, opts...)
522522
if err != nil {
523523
klog.Errorf("Status from runtime service failed: %v", err)
524524
return nil, err
@@ -532,7 +532,7 @@ func (r *RuntimeService) Status(opts ...grpc.CallOption) (*runtimeapi.RuntimeSta
532532
return nil, errors.New(errorMessage)
533533
}
534534

535-
return resp.Status, nil
535+
return resp, nil
536536
}
537537

538538
// RuntimeConfig returns the CgroupDriver of the runtime.

0 commit comments

Comments
 (0)