You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/08/04 10:17:35 UTC

[incubator-dlab] branch DLAB-1594-2 updated: [DLAB-1594]: added traceback

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

lfrolov pushed a commit to branch DLAB-1594-2
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-1594-2 by this push:
     new 19494bf  [DLAB-1594]: added traceback
19494bf is described below

commit 19494bf1f29d3cc193b914bc130e2c4fb9842938
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Aug 4 13:17:17 2020 +0300

    [DLAB-1594]: added traceback
---
 infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index 029049a..573a976 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -134,6 +134,7 @@ def install_certbot(os_family):
         elif os_family == 'redhat':
             print('This OS family is not supported yet')
     except Exception as err:
+        traceback.print_exc()
         print('Failed Certbot install: ' + str(err))
         sys.exit(1)
 
@@ -146,22 +147,20 @@ def run_certbot(domain_name, email=''):
         else:
             sudo('certbot certonly --standalone -n -d ssn.{} --register-unsafely-without-email --agree-tos'.format(domain_name))
     except Exception as err:
+        traceback.print_exc()
         print('Failed to run Certbot: ' + str(err))
         sys.exit(1)
 
 def find_replace_line(file_path, searched_str, replacement_line):
     try:
         lines = sudo('cat {}'.format(file_path)).split('\r\n')
-        #with open(file_path, 'r') as file:
-            #lines = file.readlines()
         sudo('echo "" > {}'.format(file_path))
         for line in lines:
             if searched_str in line:
                 line = replacement_line
             sudo('echo "{}" >> {}'.format(line, file_path)
-            #with open(file_path, 'w') as file:
-                #file.writelines(lines)
     except Exception as err:
+        traceback.print_exc()
         print('Failed to replace string: ' + str(err))
         sys.exit(1)
 
@@ -179,6 +178,7 @@ def configure_nginx_LE(domain_name):
         find_replace_line(certbot_service_path, 'ExecStart', certbot_service)
         sudo('systemctl restart nginx')
     except Exception as err:
+        traceback.print_exc()
         print('Failed to run Certbot: ' + str(err))
         sys.exit(1)
 


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