Fix bug 996. Error status when cluster is not ready 43/8543/1
authorquilesj <e.nvi001.tid@telefonica.com>
Thu, 23 Jan 2020 16:30:04 +0000 (16:30 +0000)
committerisraelad <adam.israel@canonical.com>
Thu, 30 Jan 2020 17:19:54 +0000 (18:19 +0100)
Change-Id: I194932ac67aa9a04a1fd4a7e4789103b13477e6e
Signed-off-by: quilesj <e.nvi001.tid@telefonica.com>
(cherry picked from commit 32dc3c64b74491a4058822a3d6f6371ff74c835f)

n2vc/k8s_helm_conn.py

index f7ff853..e57c42f 100644 (file)
@@ -1105,7 +1105,10 @@ class K8sHelmConnector(K8sConnector):
             msg = 'Exception executing command: {} -> {}'.format(command, e)
             if show_error_log:
                 self.error(msg)
-            return '', -1
+            if raise_exception_on_error:
+                raise e
+            else:
+                return '', -1
 
     def _remote_exec(
             self,