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/04/05 13:29:27 UTC

[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]: added lines to check aws creds file

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 90f653f  [DATALAB-2091]: added lines to check aws creds file
90f653f is described below

commit 90f653f0eaac9e10893ade3373312cd0f7e7ddee
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Apr 5 16:29:16 2021 +0300

    [DATALAB-2091]: added lines to check aws creds file
---
 infrastructure-provisioning/src/general/lib/aws/actions_lib.py     | 2 +-
 infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index fdc32e9..b1a9830 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -1514,7 +1514,7 @@ def create_aws_config_files(generate_full_config=False):
 
         logging.info(subprocess.run("chmod 600 " + aws_user_dir + "/*" + " 2>&1", capture_output=True, shell=True, check=True))
         logging.info(subprocess.run("chmod 550 " + aws_user_dir + " 2>&1", capture_output=True, shell=True, check=True))
-
+        subprocess.run("cat " + aws_user_dir, capture_output=True, shell=True, check=True)
         return True
     except Exception as err:
         print('Error: {0}'.format(err))
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
index bee2e3f..a858789 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
@@ -48,8 +48,10 @@ if __name__ == "__main__":
         logging.info('[CREATE AWS CONFIG FILE]')
         print('[CREATE AWS CONFIG FILE]')
         if 'aws_access_key' in os.environ and 'aws_secret_access_key' in os.environ:
+            print('===== 1')
             datalab.actions_lib.create_aws_config_files(generate_full_config=True)
         else:
+            print('===== 1')
             datalab.actions_lib.create_aws_config_files()
     except Exception as err:
         logging.info('Unable to create configuration')

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