mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #21573 from pmorie/configmap-flake
Make flake in configMap update e2e easier to debug
This commit is contained in:
commit
6a1156d7a3
@ -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)
|
||||
return err
|
||||
} 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
|
||||
} else {
|
||||
glog.V(4).Infof("%s: write required for target directory %v", w.logContext, w.targetDir)
|
||||
}
|
||||
|
||||
// (4)
|
||||
tsDir, err := w.newTimestampDir()
|
||||
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
|
||||
}
|
||||
|
||||
@ -151,6 +153,8 @@ func (w *AtomicWriter) Write(payload map[string][]byte) error {
|
||||
if err = w.writePayloadToDir(cleanPayload, tsDir); err != nil {
|
||||
glog.Errorf("%s: error writing payload to ts data directory %s: %v", w.logContext, tsDir, err)
|
||||
return err
|
||||
} else {
|
||||
glog.V(4).Infof("%s: performed write of new data to ts data directory: %s", w.logContext, tsDir)
|
||||
}
|
||||
|
||||
// (6)
|
||||
|
@ -181,7 +181,7 @@ var _ = Describe("ConfigMap", func() {
|
||||
// Kubelet projects the update into the volume and the container picks
|
||||
// it up. This timeout is based on the default Kubelet sync period (1
|
||||
// minute) plus additional time for fudge factor.
|
||||
const podLogTimeout = 90 * time.Second
|
||||
const podLogTimeout = 300 * time.Second
|
||||
|
||||
name := "configmap-test-upd-" + string(util.NewUUID())
|
||||
volumeName := "configmap-volume"
|
||||
@ -267,6 +267,7 @@ var _ = Describe("ConfigMap", func() {
|
||||
_, err = f.Client.ConfigMaps(f.Namespace.Name).Update(configMap)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
By("waiting to observe update in volume")
|
||||
Eventually(pollLogs, podLogTimeout, poll).Should(ContainSubstring("value-2"))
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user