Make flake in configMap update e2e easier to debug
This commit is contained in:
parent
ced1ddfcc7
commit
f8d58ac708
@ -136,14 +136,16 @@ func (w *AtomicWriter) Write(payload map[string][]byte) error {
|
|||||||
glog.Errorf("%s: error determining whether payload should be written to disk: %v", w.logContext, err)
|
glog.Errorf("%s: error determining whether payload should be written to disk: %v", w.logContext, err)
|
||||||
return err
|
return err
|
||||||
} else if !should && len(pathsToRemove) == 0 {
|
} else if !should && len(pathsToRemove) == 0 {
|
||||||
glog.V(5).Infof("%s: no update required for target directory %v", w.logContext, w.targetDir)
|
glog.V(4).Infof("%s: no update required for target directory %v", w.logContext, w.targetDir)
|
||||||
return nil
|
return nil
|
||||||
|
} else {
|
||||||
|
glog.V(4).Infof("%s: write required for target directory %v", w.logContext, w.targetDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
// (4)
|
// (4)
|
||||||
tsDir, err := w.newTimestampDir()
|
tsDir, err := w.newTimestampDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(5).Infof("%s: error creating new ts data directory: %v", w.logContext, err)
|
glog.V(4).Infof("%s: error creating new ts data directory: %v", w.logContext, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,6 +153,8 @@ func (w *AtomicWriter) Write(payload map[string][]byte) error {
|
|||||||
if err = w.writePayloadToDir(cleanPayload, tsDir); err != nil {
|
if err = w.writePayloadToDir(cleanPayload, tsDir); err != nil {
|
||||||
glog.Errorf("%s: error writing payload to ts data directory %s: %v", w.logContext, tsDir, err)
|
glog.Errorf("%s: error writing payload to ts data directory %s: %v", w.logContext, tsDir, err)
|
||||||
return err
|
return err
|
||||||
|
} else {
|
||||||
|
glog.V(4).Infof("%s: performed write of new data to ts data directory: %s", w.logContext, tsDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
// (6)
|
// (6)
|
||||||
|
@ -181,7 +181,7 @@ var _ = Describe("ConfigMap", func() {
|
|||||||
// Kubelet projects the update into the volume and the container picks
|
// Kubelet projects the update into the volume and the container picks
|
||||||
// it up. This timeout is based on the default Kubelet sync period (1
|
// it up. This timeout is based on the default Kubelet sync period (1
|
||||||
// minute) plus additional time for fudge factor.
|
// minute) plus additional time for fudge factor.
|
||||||
const podLogTimeout = 90 * time.Second
|
const podLogTimeout = 300 * time.Second
|
||||||
|
|
||||||
name := "configmap-test-upd-" + string(util.NewUUID())
|
name := "configmap-test-upd-" + string(util.NewUUID())
|
||||||
volumeName := "configmap-volume"
|
volumeName := "configmap-volume"
|
||||||
@ -267,6 +267,7 @@ var _ = Describe("ConfigMap", func() {
|
|||||||
_, err = f.Client.ConfigMaps(f.Namespace.Name).Update(configMap)
|
_, err = f.Client.ConfigMaps(f.Namespace.Name).Update(configMap)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
|
||||||
|
By("waiting to observe update in volume")
|
||||||
Eventually(pollLogs, podLogTimeout, poll).Should(ContainSubstring("value-2"))
|
Eventually(pollLogs, podLogTimeout, poll).Should(ContainSubstring("value-2"))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user