Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flake in configMap update e2e easier to debug #21573

Merged
merged 1 commit into from Feb 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/volume/util/atomic_writer.go
Expand Up @@ -136,21 +136,25 @@ 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
}

// (5)
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)
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/configmap.go
Expand Up @@ -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"
Expand Down Expand Up @@ -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"))
})

Expand Down