Skip to content

Commit

Permalink
skip process isolation check for transmit and process
Browse files Browse the repository at this point in the history
moving down the process isolation executable so that transmit and
process no longer checks for its existance

ansible-runner worker will still run the check since it will invoke
ansible-runner run with process-isolation-executable and it will still
be checked properly

Co-Authored-By: Jeff Bradberry <685957+jbradberry@users.noreply.github.com>
Signed-off-by: Hao Liu <haoli@redhat.com>
  • Loading branch information
TheRealHaoLiu and jbradberry committed Jun 1, 2022
1 parent a349921 commit 5370620
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ansible_runner/interface.py
Expand Up @@ -83,12 +83,6 @@ def init_runner(**kwargs):
if logfile:
output.set_logfile(logfile)

if kwargs.get("process_isolation", False):
pi_executable = kwargs.get("process_isolation_executable", "podman")
if not check_isolation_executable_installed(pi_executable):
print(f'Unable to find process isolation executable: {pi_executable}')
sys.exit(1)

event_callback_handler = kwargs.pop('event_handler', None)
status_callback_handler = kwargs.pop('status_handler', None)
artifacts_handler = kwargs.pop('artifacts_handler', None)
Expand Down Expand Up @@ -118,6 +112,12 @@ def init_runner(**kwargs):
**kwargs)
return stream_processor

if kwargs.get("process_isolation", False):
pi_executable = kwargs.get("process_isolation_executable", "podman")
if not check_isolation_executable_installed(pi_executable):
print(f'Unable to find process isolation executable: {pi_executable}')
sys.exit(1)

kwargs.pop('_input', None)
kwargs.pop('_output', None)
rc = RunnerConfig(**kwargs)
Expand Down

0 comments on commit 5370620

Please sign in to comment.