Merge pull request #86315 from liggitt/delete-grace-period-debug

Add debugging for delete grace period e2e flake
This commit is contained in:
Kubernetes Prow Robot 2019-12-19 00:38:10 -08:00 committed by GitHub
commit 6eb4e7c443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@ limitations under the License.
package node package node
import ( import (
"encoding/json"
"net/http" "net/http"
"strconv" "strconv"
"time" "time"
@ -108,6 +109,7 @@ var _ = SIGDescribe("Pods Extended", func() {
ginkgo.By("verifying the kubelet observed the termination notice") ginkgo.By("verifying the kubelet observed the termination notice")
start := time.Now()
err = wait.Poll(time.Second*5, time.Second*30, func() (bool, error) { err = wait.Poll(time.Second*5, time.Second*30, func() (bool, error) {
podList, err := e2ekubelet.GetKubeletPods(f.ClientSet, pod.Spec.NodeName) podList, err := e2ekubelet.GetKubeletPods(f.ClientSet, pod.Spec.NodeName)
if err != nil { if err != nil {
@ -122,6 +124,8 @@ var _ = SIGDescribe("Pods Extended", func() {
framework.Logf("deletion has not yet been observed") framework.Logf("deletion has not yet been observed")
return false, nil return false, nil
} }
data, _ := json.Marshal(kubeletPod)
framework.Logf("start=%s, now=%s, kubelet pod: %s", start, time.Now(), string(data))
return false, nil return false, nil
} }
framework.Logf("no pod exists with the name we were looking for, assuming the termination request was observed and completed") framework.Logf("no pod exists with the name we were looking for, assuming the termination request was observed and completed")