From f5ddd163a10ff99e9770d8b511cdc3c81dc5612e Mon Sep 17 00:00:00 2001 From: Davlet Panech Date: Fri, 16 Feb 2024 08:23:07 -0500 Subject: [PATCH] stx control stop --wait: helm compatibility Don't use --wait with helm uninstall because it requires helm >= 3.7, and even in those versions doesn't work correctly. Story: 2011038 Task: 49549 Signed-off-by: Davlet Panech Change-Id: I4f3be32bf4ce84e1670e7884fc09c3ddac00b85a --- stx/lib/stx/stx_control.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stx/lib/stx/stx_control.py b/stx/lib/stx/stx_control.py index f3c30e33..5f86ed75 100644 --- a/stx/lib/stx/stx_control.py +++ b/stx/lib/stx/stx_control.py @@ -276,12 +276,12 @@ stx-pkgbuilder/configmap/') self.configurePulp() def handleStopTask(self, projectname, wait): - # "helm uninstall --wait" doesn't work, except in very recent helm versions - # see https://github.com/helm/helm/issues/10586 + # "helm uninstall --wait" requires version >= 3.7, and is broken + # in some versions: + # https://github.com/helm/helm/issues/10586 # https://github.com/helm/helm/pull/11479 # - # In case helm returned too early, we will loop until there are no pods left, - # after "helm uninstall". + # Workaround: loop until there are no pods left, after "helm uninstall". # Use Helm's own default timeout of 5 minutes timeout = 5 * 60 @@ -289,7 +289,7 @@ stx-pkgbuilder/configmap/') helm_status = self.k8s.helm_release_exists(self.projectname) if helm_status: - cmd = f'{self.config.helm()} uninstall {projectname} --wait' + cmd = f'{self.config.helm()} uninstall {projectname}' self.logger.debug('Execute the helm stop command: %s', cmd) subprocess.check_call(cmd, shell=True) else: