diff --git a/test/extended/builds/contextdir.go b/test/extended/builds/contextdir.go index 39bb048667f4..74e32294201a 100644 --- a/test/extended/builds/contextdir.go +++ b/test/extended/builds/contextdir.go @@ -65,7 +65,7 @@ var _ = g.Describe("[Feature:Builds][Slow] builds with a context directory", fun // oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete, // which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment g.By("waiting for a deployment") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for endpoint") diff --git a/test/extended/builds/gitauth.go b/test/extended/builds/gitauth.go index e5ed1b662c7b..7ffeb3116e91 100644 --- a/test/extended/builds/gitauth.go +++ b/test/extended/builds/gitauth.go @@ -87,7 +87,7 @@ var _ = g.Describe("[Feature:Builds][Slow] can use private repositories as build o.Expect(err).NotTo(o.HaveOccurred()) g.By("expecting the deployment of the gitserver to be in the Complete phase") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), gitServerDeploymentConfigName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), gitServerDeploymentConfigName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) sourceSecretName := secretFunc() diff --git a/test/extended/builds/new_app.go b/test/extended/builds/new_app.go index a9dd4cf3eab0..c573e88b4745 100644 --- a/test/extended/builds/new_app.go +++ b/test/extended/builds/new_app.go @@ -59,7 +59,7 @@ var _ = g.Describe("[Feature:Builds][Conformance] oc new-app", func() { o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for the deployment to complete") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), a58, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), a58, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) }) diff --git a/test/extended/builds/pipeline.go b/test/extended/builds/pipeline.go index 7c7bd3117fc0..89681078b7e5 100644 --- a/test/extended/builds/pipeline.go +++ b/test/extended/builds/pipeline.go @@ -118,7 +118,10 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() { o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for jenkins deployment") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, false, oc) + if err != nil { + exutil.DumpApplicationPodLogs("jenkins", oc) + } o.Expect(err).NotTo(o.HaveOccurred()) j = jenkins.NewRef(oc) diff --git a/test/extended/cluster/cl.go b/test/extended/cluster/cl.go index 4dbfa371a142..b8ba387c20f8 100644 --- a/test/extended/cluster/cl.go +++ b/test/extended/cluster/cl.go @@ -172,7 +172,7 @@ var _ = g.Describe("[Feature:Performance][Serial][Slow] Load cluster", func() { // deploymentName is buildName without the -1 suffix deploymentName := buildName[:len(buildName)-2] e2e.Logf("Waiting for deployment: %q", deploymentName) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), ns, deploymentName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), ns, deploymentName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) e2e.Logf("Deployment %q completed", deploymentName) } diff --git a/test/extended/image_ecosystem/jenkins_plugin.go b/test/extended/image_ecosystem/jenkins_plugin.go index 4d8480cc1550..f49cc003add1 100644 --- a/test/extended/image_ecosystem/jenkins_plugin.go +++ b/test/extended/image_ecosystem/jenkins_plugin.go @@ -173,7 +173,9 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin", // and test image is present, a new image stream is created using the test image, and our jenkins template is instantiated with // an override to use that images stream and test image var licensePrefix, pluginName string - newAppArgs := []string{exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json")} + // with the startup costs now of jenkins 2.89 or greater and trying to incur those during startup, need more memory + // to avoid deployment timeouts + newAppArgs := []string{"-f", exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json"), "-p", "MEMORY_LIMIT=2Gi"} useSnapshotImage := false origPluginNewAppArgs, useOrigPluginSnapshotImage := jenkins.SetupSnapshotImage(jenkins.UseLocalPluginSnapshotEnvVarName, localPluginSnapshotImage, localPluginSnapshotImageStream, newAppArgs, oc) loginPluginNewAppArgs, useLoginPluginSnapshotImage := jenkins.SetupSnapshotImage(jenkins.UseLocalLoginPluginSnapshotEnvVarName, localLoginPluginSnapshotImage, localLoginPluginSnapshotImageStream, newAppArgs, oc) @@ -202,7 +204,10 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin", o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for jenkins deployment") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, false, oc) + if err != nil { + exutil.DumpApplicationPodLogs("jenkins", oc) + } o.Expect(err).NotTo(o.HaveOccurred()) j = jenkins.NewRef(oc) @@ -267,9 +272,9 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin", // we leverage some of the openshift utilities for waiting for the deployment before we poll // jenkins for the successful job completion g.By("waiting for frontend, frontend-prod deployments as signs that the build has finished") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("get build console logs and see if succeeded") @@ -319,9 +324,9 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin", // we leverage some of the openshift utilities for waiting for the deployment before we poll // jenkins for the successful job completion g.By("waiting for frontend, frontend-prod deployments as signs that the build has finished") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("get build console logs and see if succeeded") @@ -387,7 +392,7 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin", // we leverage some of the openshift utilities for waiting for the deployment before we poll // jenkins for the successful job completion g.By("waiting for frontend deployments as signs that the build has finished") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("get build console logs and see if succeeded") diff --git a/test/extended/image_ecosystem/mariadb_ephemeral.go b/test/extended/image_ecosystem/mariadb_ephemeral.go index 4b271b75111a..bed0f6efc1f1 100644 --- a/test/extended/image_ecosystem/mariadb_ephemeral.go +++ b/test/extended/image_ecosystem/mariadb_ephemeral.go @@ -46,7 +46,7 @@ var _ = g.Describe("[image_ecosystem][mariadb][Slow] openshift mariadb image", f // oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete, // which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mariadb", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mariadb", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("expecting the mariadb service get endpoints") diff --git a/test/extended/image_ecosystem/mongodb_ephemeral.go b/test/extended/image_ecosystem/mongodb_ephemeral.go index 0b66b826ab51..fe81b945acb5 100644 --- a/test/extended/image_ecosystem/mongodb_ephemeral.go +++ b/test/extended/image_ecosystem/mongodb_ephemeral.go @@ -38,7 +38,7 @@ var _ = g.Describe("[image_ecosystem][mongodb] openshift mongodb image", func() o.Expect(oc.Run("new-app").Args("-f", templatePath).Execute()).Should(o.Succeed()) g.By("waiting for the deployment to complete") - err := exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mongodb", 1, oc) + err := exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mongodb", 1, true, oc) o.Expect(err).ShouldNot(o.HaveOccurred()) g.By("expecting the mongodb pod is running") diff --git a/test/extended/image_ecosystem/mysql_ephemeral.go b/test/extended/image_ecosystem/mysql_ephemeral.go index 2b68351243c6..a47113da1f83 100644 --- a/test/extended/image_ecosystem/mysql_ephemeral.go +++ b/test/extended/image_ecosystem/mysql_ephemeral.go @@ -43,7 +43,7 @@ var _ = g.Describe("[image_ecosystem][mysql][Slow] openshift mysql image", func( // oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete, // which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mysql", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mysql", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("expecting the mysql service get endpoints") diff --git a/test/extended/image_ecosystem/mysql_replica.go b/test/extended/image_ecosystem/mysql_replica.go index c3eab93281c1..173717a7fc83 100644 --- a/test/extended/image_ecosystem/mysql_replica.go +++ b/test/extended/image_ecosystem/mysql_replica.go @@ -83,7 +83,7 @@ func replicationTestFactory(oc *exutil.CLI, tc testCase) func() { // oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete, // which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment g.By("waiting for the deployment to complete") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), helperName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), helperName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for an endpoint") diff --git a/test/extended/image_ecosystem/postgresql_replica.go b/test/extended/image_ecosystem/postgresql_replica.go index cd5182447ce5..efeb1872f35f 100644 --- a/test/extended/image_ecosystem/postgresql_replica.go +++ b/test/extended/image_ecosystem/postgresql_replica.go @@ -99,7 +99,7 @@ func PostgreSQLReplicationTestFactory(oc *exutil.CLI, image string) func() { // oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete, // which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), postgreSQLHelperName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), postgreSQLHelperName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) err = e2e.WaitForEndpoint(oc.KubeFramework().ClientSet, oc.Namespace(), postgreSQLHelperName) diff --git a/test/extended/image_ecosystem/s2i_perl.go b/test/extended/image_ecosystem/s2i_perl.go index 924b23e96618..5164fead12a0 100644 --- a/test/extended/image_ecosystem/s2i_perl.go +++ b/test/extended/image_ecosystem/s2i_perl.go @@ -62,7 +62,7 @@ var _ = g.Describe("[image_ecosystem][perl][Slow] hot deploy for openshift perl } o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for endpoint") @@ -89,7 +89,7 @@ var _ = g.Describe("[image_ecosystem][perl][Slow] hot deploy for openshift perl g.By("turning on hot-deploy") err = oc.Run("env").Args("dc", dcName, "PERL_APACHE2_RELOAD=true").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for a new endpoint") diff --git a/test/extended/image_ecosystem/s2i_php.go b/test/extended/image_ecosystem/s2i_php.go index b82d371a016d..35faafa24451 100644 --- a/test/extended/image_ecosystem/s2i_php.go +++ b/test/extended/image_ecosystem/s2i_php.go @@ -52,7 +52,7 @@ var _ = g.Describe("[image_ecosystem][php][Slow] hot deploy for openshift php im } o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "cakephp-mysql-example", 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "cakephp-mysql-example", 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for endpoint") diff --git a/test/extended/image_ecosystem/s2i_python.go b/test/extended/image_ecosystem/s2i_python.go index 71b7cd5ee4f5..654d20b52a6e 100644 --- a/test/extended/image_ecosystem/s2i_python.go +++ b/test/extended/image_ecosystem/s2i_python.go @@ -65,7 +65,7 @@ var _ = g.Describe("[image_ecosystem][python][Slow] hot deploy for openshift pyt } o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for endpoint") @@ -102,7 +102,7 @@ var _ = g.Describe("[image_ecosystem][python][Slow] hot deploy for openshift pyt g.By("turning on hot-deploy") err = oc.Run("env").Args("dc", dcName, "APP_CONFIG=conf/reload.py").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for a new endpoint") diff --git a/test/extended/image_ecosystem/s2i_ruby.go b/test/extended/image_ecosystem/s2i_ruby.go index 9567a71f4e25..cbcf0f7c5e56 100644 --- a/test/extended/image_ecosystem/s2i_ruby.go +++ b/test/extended/image_ecosystem/s2i_ruby.go @@ -58,7 +58,7 @@ var _ = g.Describe("[image_ecosystem][ruby][Slow] hot deploy for openshift ruby } o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for endpoint") @@ -93,7 +93,7 @@ var _ = g.Describe("[image_ecosystem][ruby][Slow] hot deploy for openshift ruby g.By("turning on hot-deploy") err = oc.Run("env").Args("dc", dcName, "RAILS_ENV=development").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("waiting for a new endpoint") diff --git a/test/extended/image_ecosystem/sample_repos.go b/test/extended/image_ecosystem/sample_repos.go index 40fafce78344..37b555f302f5 100644 --- a/test/extended/image_ecosystem/sample_repos.go +++ b/test/extended/image_ecosystem/sample_repos.go @@ -74,12 +74,12 @@ func NewSampleRepoTest(c SampleRepoConfig) func() { o.Expect(err).NotTo(o.HaveOccurred()) g.By("expecting the app deployment to be complete") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.deploymentConfigName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.deploymentConfigName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) if len(c.dbDeploymentConfigName) > 0 { g.By("expecting the db deployment to be complete") - err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.dbDeploymentConfigName, 1, oc) + err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.dbDeploymentConfigName, 1, true, oc) o.Expect(err).NotTo(o.HaveOccurred()) g.By("expecting the db service is available") diff --git a/test/extended/util/framework.go b/test/extended/util/framework.go index 267ea35f5a32..ea4569c1787f 100644 --- a/test/extended/util/framework.go +++ b/test/extended/util/framework.go @@ -808,7 +808,7 @@ var CheckImageStreamTagNotFoundFn = func(i *imageapi.ImageStream) bool { // WaitForDeploymentConfig waits for a DeploymentConfig to complete transition // to a given version and report minimum availability. -func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset.DeploymentConfigsGetter, namespace, name string, version int64, cli *CLI) error { +func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset.DeploymentConfigsGetter, namespace, name string, version int64, enforceNotProgressing bool, cli *CLI) error { e2e.Logf("waiting for deploymentconfig %s/%s to be available with version %d\n", namespace, name, version) var dc *appsapi.DeploymentConfig @@ -841,8 +841,10 @@ func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset } } - if progressing != nil && progressing.Status == kapi.ConditionFalse { - return false, fmt.Errorf("not progressing") + if enforceNotProgressing { + if progressing != nil && progressing.Status == kapi.ConditionFalse { + return false, fmt.Errorf("not progressing") + } } if progressing != nil &&