You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/02/08 11:44:41 UTC

[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]: removed with hide(

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
     new 77da794  [DATALAB-2091]: removed with hide(
77da794 is described below

commit 77da794effcdb285dec61e8e4e26801170d65965
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Feb 8 13:44:22 2021 +0200

    [DATALAB-2091]: removed with hide(
---
 infrastructure-provisioning/src/base/entrypoint.py | 50 ++++++++--------------
 1 file changed, 17 insertions(+), 33 deletions(-)

diff --git a/infrastructure-provisioning/src/base/entrypoint.py b/infrastructure-provisioning/src/base/entrypoint.py
index 1db622c..d1f6917 100644
--- a/infrastructure-provisioning/src/base/entrypoint.py
+++ b/infrastructure-provisioning/src/base/entrypoint.py
@@ -107,9 +107,8 @@ if __name__ == "__main__":
     except:
         pass
 
-    with fabric.context_managers.hide('running'):
-        if args.action != 'terminate':
-            subprocess.run('chmod 600 /root/keys/*.pem', shell=True)
+    if args.action != 'terminate':
+        subprocess.run('chmod 600 /root/keys/*.pem', shell=True)
 
     if dry_run:
         with open("/response/{}.json".format(request_id), 'w') as response_file:
@@ -118,12 +117,10 @@ if __name__ == "__main__":
 
     # Run execution routines
     elif args.action == 'create':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/create.py", shell=True)
+        subprocess.run("/bin/create.py", shell=True)
 
     elif args.action == 'status':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/status.py", shell=True)
+        subprocess.run("/bin/status.py", shell=True)
 
     elif args.action == 'describe':
         with open('/root/description.json') as json_file:
@@ -133,53 +130,40 @@ if __name__ == "__main__":
                 response_file.write(json.dumps(description))
 
     elif args.action == 'stop':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/stop.py", shell=True)
+        subprocess.run("/bin/stop.py", shell=True)
 
     elif args.action == 'start':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/start.py", shell=True)
+        subprocess.run("/bin/start.py", shell=True)
 
     elif args.action == 'terminate':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/terminate.py", shell=True)
+        subprocess.run("/bin/terminate.py", shell=True)
 
     elif args.action == 'configure':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/configure.py", shell=True)
+        subprocess.run("/bin/configure.py", shell=True)
 
     elif args.action == 'recreate':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/recreate.py", shell=True)
+        subprocess.run("/bin/recreate.py", shell=True)
 
     elif args.action == 'reupload_key':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/reupload_key.py", shell=True)
+        subprocess.run("/bin/reupload_key.py", shell=True)
 
     elif args.action == 'lib_install':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/install_libs.py", shell=True)
+        subprocess.run("/bin/install_libs.py", shell=True)
 
     elif args.action == 'lib_list':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/list_libs.py", shell=True)
+        subprocess.run("/bin/list_libs.py", shell=True)
 
     elif args.action == 'git_creds':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/git_creds.py", shell=True)
+        subprocess.run("/bin/git_creds.py", shell=True)
 
     elif args.action == 'create_image':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/create_image.py", shell=True)
+        subprocess.run("/bin/create_image.py", shell=True)
 
     elif args.action == 'terminate_image':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/terminate_image.py", shell=True)
+        subprocess.run("/bin/terminate_image.py", shell=True)
 
     elif args.action == 'reconfigure_spark':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/reconfigure_spark.py", shell=True)
+        subprocess.run("/bin/reconfigure_spark.py", shell=True)
 
     elif args.action == 'check_inactivity':
-        with fabric.context_managers.hide('running'):
-            subprocess.run("/bin/check_inactivity.py", shell=True)
\ No newline at end of file
+        subprocess.run("/bin/check_inactivity.py", shell=True)
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org