mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Merge pull request #27305 from zmerlynn/fix-logged-op
Automatic merge from submit-queue GCE provider: Fix minor cosmetic logging issue []() Log the pollOp, not the base op. (This will include the final status/timestamp and any errors.)
This commit is contained in:
commit
cd8e8f4c5a
@ -445,9 +445,9 @@ func (gce *GCECloud) waitForOp(op *compute.Operation, getOperation func(operatio
|
||||
duration := time.Now().Sub(opStart)
|
||||
if duration > 1*time.Minute {
|
||||
// Log the JSON. It's cleaner than the %v structure.
|
||||
enc, err := op.MarshalJSON()
|
||||
enc, err := pollOp.MarshalJSON()
|
||||
if err != nil {
|
||||
glog.Warningf("waitForOperation: long operation (%v): %v (failed to encode to JSON: %v)", duration, op, err)
|
||||
glog.Warningf("waitForOperation: long operation (%v): %v (failed to encode to JSON: %v)", duration, pollOp, err)
|
||||
} else {
|
||||
glog.Infof("waitForOperation: long operation (%v): %v", duration, string(enc))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user