Merge pull request #69755 from mrunalp/use_fsync

Use fsync instead of sync for test
This commit is contained in:
k8s-ci-robot 2018-10-16 13:01:52 -07:00 committed by GitHub
commit 08be38186d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ var _ = SIGDescribe("StatefulSet", func() {
By("Verifying statefulset set proper service name")
framework.ExpectNoError(sst.CheckServiceName(ss, headlessSvcName))
cmd := "echo $(hostname) > /data/hostname; sync;"
cmd := "echo $(hostname) | dd of=/data/hostname conv=fsync"
By("Running " + cmd + " in all stateful pods")
framework.ExpectNoError(sst.ExecInStatefulPods(ss, cmd))

View File

@ -599,7 +599,7 @@ func (s *StatefulSetTester) ResumeNextPod(ss *apps.StatefulSet) {
if resumedPod != "" {
Failf("Found multiple paused stateful pods: %v and %v", pod.Name, resumedPod)
}
_, err := RunHostCmdWithRetries(pod.Namespace, pod.Name, "touch /data/statefulset-continue; sync", StatefulSetPoll, StatefulPodTimeout)
_, err := RunHostCmdWithRetries(pod.Namespace, pod.Name, "dd if=/dev/zero of=/data/statefulset-continue bs=1 count=1 conv=fsync", StatefulSetPoll, StatefulPodTimeout)
ExpectNoError(err)
Logf("Resumed pod %v", pod.Name)
resumedPod = pod.Name