diff --git a/robottelo/hosts.py b/robottelo/hosts.py index 9fab16fb85f..e4dd901f32f 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -920,12 +920,12 @@ def enable_ipv6_podman_proxy(self): container_cfg = '/etc/containers/containers.conf' proxy_url = settings.http_proxy.http_proxy_ipv6_url if self.execute(f'grep -q "https_proxy" {container_cfg}').status != 0: - assert ( - self.execute( - f'echo -e "[engine]\\nenv = [\'https_proxy={proxy_url}\']" >> {container_cfg}' - ).status - == 0 + proxy_env = ( + '[engine]\\nenv = [' + f'\\"https_proxy={proxy_url}\\"]\\n' + '[containers]\\nhttp_proxy=false' ) + assert self.execute(f'echo -e "{proxy_env}" >> {container_cfg}').status == 0 def disable_rhsm_proxy(self): """Disables HTTP proxy for subscription manager""" @@ -2138,6 +2138,8 @@ def install_satellite_foremanctl( # Add IPv6 proxy for IPv6 communication self.enable_ipv6_dnf_and_rhsm_proxy() self.enable_ipv6_system_proxy() + # Add IPv6 proxy for podman to pull from registry & install podman if not pre-installed + self.ensure_podman_installed(enable_ipv6_proxy=True) # Enable RHEL and Satellite repos self.register_to_cdn() self.setup_rhel_repos() @@ -2150,6 +2152,7 @@ def install_satellite_foremanctl( job_template='upstream-pr-install', target_vm=self.name, pull_requests=pull_requests, + deploy_network_type=settings.server.network_type, ).execute() # Install podman (required for foremanctl container operations) diff --git a/tests/foreman/installer/test_install_foremanctl.py b/tests/foreman/installer/test_install_foremanctl.py index 4bda3be7942..96910affd29 100644 --- a/tests/foreman/installer/test_install_foremanctl.py +++ b/tests/foreman/installer/test_install_foremanctl.py @@ -274,9 +274,8 @@ def test_foremanctl_deploy_certificate_cname(module_sat_ready_rhel): assert result.status == 0, ( f'foremanctl deploy with --certificate-cname failed:\n{result.stderr}' ) - result = satellite.execute( - 'curl --fail --silent --show-error --head ' + 'curl --noproxy "*" --fail --silent --show-error --head ' f'--cacert {FOREMANCTL_CERTS_DIR}/ca.crt ' f'--resolve "{cname}:443:127.0.0.1" ' f'https://{cname}/users/login'