diff --git a/test/e2e/framework/volume_util.go b/test/e2e/framework/volume_util.go index 84214a15ab4..08d392b3a2b 100644 --- a/test/e2e/framework/volume_util.go +++ b/test/e2e/framework/volume_util.go @@ -72,6 +72,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: @@ -196,6 +199,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 f3bfc0f2be4..c8b505fb360 100644 --- a/test/e2e/storage/volumes.go +++ b/test/e2e/storage/volumes.go @@ -288,7 +288,7 @@ var _ = SIGDescribe("Volumes", func() { }() _, 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{