8000 Avoid operation not supported mounting failure on macos by ssbarnea · Pull Request #1146 · ansible/ansible-runner · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Avoid operation not supported mounting failure on macos #1146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions ansible_runner/config/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import stat
import tempfile
import shutil
from sys import platform


from base64 import b64encode
from uuid import uuid4
Expand Down Expand Up @@ -456,6 +458,13 @@ def _handle_ansible_cmd_options_bind_mounts(self, args_list, cmdline_args):
self._update_volume_mount_paths(args_list, optional_arg_value)

def wrap_args_for_containerization(self, args, execution_mode, cmdline_args):

if platform == "darwin":
# See https://github.com/ansible/ansible-runner/issues/1145
labels = None
else:
labels = ":Z"

new_args = [self.process_isolation_executable]
new_args.extend(['run', '--rm'])

Expand Down Expand Up @@ -503,7 +512,8 @@ def wrap_args_for_containerization(self, args, execution_mode, cmdline_args):
self._update_volume_mount_paths(new_args,
"{}/artifacts".format(self.private_data_dir),
dst_mount_path="/runner/artifacts",
labels=":Z")
labels=labels
)

else:
subdir_path = os.path.join(self.private_data_dir, 'artifacts')
Expand All @@ -512,7 +522,7 @@ def wrap_args_for_containerization(self, args, execution_mode, cmdline_args):

# Mount the entire private_data_dir
# custom show paths inside private_data_dir do not make sense
self._update_volume_mount_paths(new_args, "{}".format(self.private_data_dir), dst_mount_path="/runner", labels=":Z")
self._update_volume_mount_paths(new_args, "{}".format(self.private_data_dir), dst_mount_path="/runner", labels=labels)

if self.container_auth_data:
# Pull in the necessary registry auth info, if there is a container cred
Expand Down
0