Merge pull request #27305 from zmerlynn/fix-logged-op

Automatic merge from submit-queue

GCE provider: Fix minor cosmetic logging issue

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

Log the pollOp, not the base op. (This will include the final status/timestamp and any errors.)
This commit is contained in:
k8s-merge-robot 2016-06-14 10:19:14 -07:00 committed by GitHub
commit cd8e8f4c5a

View File

@ -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))
}