diff --git a/test/e2e/framework/volume_util.go b/test/e2e/framework/volume_util.go index 4a0e8e7ac8f..88e60243f7c 100644 --- a/test/e2e/framework/volume_util.go +++ b/test/e2e/framework/volume_util.go @@ -64,6 +64,9 @@ const ( MiB int64 = 1024 * KiB GiB int64 = 1024 * MiB TiB int64 = 1024 * GiB + + // Waiting period for volume server (Ceph, ...) to initialize itself. + VolumeServerPodStartupSleep = 20 * time.Second ) // Configuration of one tests. The test consist of: @@ -190,6 +193,14 @@ func NewRBDServer(cs clientset.Interface, namespace string) (config VolumeTestCo }, } pod, ip = CreateStorageServer(cs, config) + + // Ceph server container needs some time to start. Tests continue working if + // this sleep is removed, however kubelet logs (and kubectl describe + // ) would be cluttered with error messages about non-existing + // image. + Logf("sleeping a bit to give ceph server time to initialize") + time.Sleep(VolumeServerPodStartupSleep) + return config, pod, ip } diff --git a/test/e2e/storage/volumes.go b/test/e2e/storage/volumes.go index 90021d69dfe..1dbb8dba241 100644 --- a/test/e2e/storage/volumes.go +++ b/test/e2e/storage/volumes.go @@ -268,7 +268,7 @@ var _ = utils.SIGDescribe("Volumes", func() { defer framework.VolumeTestCleanup(f, config) _, serverIP := framework.CreateStorageServer(cs, config) By("sleeping a bit to give ceph server time to initialize") - time.Sleep(20 * time.Second) + time.Sleep(framework.VolumeServerPodStartupSleep) // create ceph secret secret := &v1.Secret{