From 067e6a51632f50579055dab29845901b192bd861 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Tue, 1 Jun 2021 15:11:25 -0400 Subject: [PATCH] when sharing paths use little z * AWX_ISOLATION_SHOW_PATHS will be shared between containers. Strange file not found error can crop up when concurrently accessing shared directories between multiple containers that are bind mounted with big Z. So make sure we use little z. --- awx/main/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 69b7bd0dec..e588103091 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -855,7 +855,9 @@ class BaseTask(object): if settings.AWX_ISOLATION_SHOW_PATHS: params['container_volume_mounts'] = [] for this_path in settings.AWX_ISOLATION_SHOW_PATHS: - params['container_volume_mounts'].append(f'{this_path}:{this_path}:Z') + # Using z allows the dir to mounted by multiple containers + # Uppercase Z restricts access (in weird ways) to 1 container at a time + params['container_volume_mounts'].append(f'{this_path}:{this_path}:z') return params def build_private_data(self, instance, private_data_dir):