From 651cbe96bb26e61705ea610797113a5bcf5cc954 Mon Sep 17 00:00:00 2001 From: Philip Haberkern Date: Tue, 12 Sep 2023 08:36:12 +0200 Subject: [PATCH 1/2] feat(wale-clone): Added data dir permission change during cloning --- postgres-appliance/bootstrap/clone_with_wale.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/postgres-appliance/bootstrap/clone_with_wale.py b/postgres-appliance/bootstrap/clone_with_wale.py index e8d31962d..ecb8f9fff 100755 --- a/postgres-appliance/bootstrap/clone_with_wale.py +++ b/postgres-appliance/bootstrap/clone_with_wale.py @@ -176,6 +176,10 @@ def run_clone_from_s3(options): envdir = get_clone_envdir() with open(os.path.join(envdir, update_envdir), 'w') as f: f.write(env[update_envdir]) + + ret = subprocess.call(['chmod', '0700', options.datadir]) + if ret != 0: + raise Exception("Permission adjustment of data dir exited with code {0}".format(ret)) return 0 From 2659ecad62e38335b1ab9350936faff317a48277 Mon Sep 17 00:00:00 2001 From: Philip Haberkern Date: Tue, 12 Sep 2023 09:02:54 +0200 Subject: [PATCH 2/2] removed whitespaces in blank line --- postgres-appliance/bootstrap/clone_with_wale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-appliance/bootstrap/clone_with_wale.py b/postgres-appliance/bootstrap/clone_with_wale.py index ecb8f9fff..372e86f6d 100755 --- a/postgres-appliance/bootstrap/clone_with_wale.py +++ b/postgres-appliance/bootstrap/clone_with_wale.py @@ -176,7 +176,7 @@ def run_clone_from_s3(options): envdir = get_clone_envdir() with open(os.path.join(envdir, update_envdir), 'w') as f: f.write(env[update_envdir]) - + ret = subprocess.call(['chmod', '0700', options.datadir]) if ret != 0: raise Exception("Permission adjustment of data dir exited with code {0}".format(ret))