From d8269e5a394dfa0116e8baeb7aac0a82eb430e5e Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Sun, 16 Jun 2024 13:51:09 -0700 Subject: [PATCH] Adds logging during remote command executor fallback --- staging/src/k8s.io/client-go/tools/remotecommand/fallback.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/staging/src/k8s.io/client-go/tools/remotecommand/fallback.go b/staging/src/k8s.io/client-go/tools/remotecommand/fallback.go index 3efde3c5883..78620d33cf5 100644 --- a/staging/src/k8s.io/client-go/tools/remotecommand/fallback.go +++ b/staging/src/k8s.io/client-go/tools/remotecommand/fallback.go @@ -18,6 +18,8 @@ package remotecommand import ( "context" + + "k8s.io/klog/v2" ) var _ Executor = &FallbackExecutor{} @@ -51,6 +53,7 @@ func (f *FallbackExecutor) Stream(options StreamOptions) error { func (f *FallbackExecutor) StreamWithContext(ctx context.Context, options StreamOptions) error { err := f.primary.StreamWithContext(ctx, options) if f.shouldFallback(err) { + klog.V(4).Infof("RemoteCommand fallback: %v", err) return f.secondary.StreamWithContext(ctx, options) } return err