From 45b1091d110d8576514bfb8495e5dacd644b94d7 Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Fri, 9 Sep 2022 09:05:30 +0530 Subject: [PATCH] Use hostNetwork for ephemeral heat pod All other containers running in undercloud use host network. This would avoid all future issues wrt netavark and ipv6 would work seamlessly without any configuration of the podman bridge. Change-Id: I1d01e149e11cdea1589c90df80445af3db359f6e --- templates/ephemeral-heat/heat-pod.yaml.j2 | 5 +---- tripleoclient/heat_launcher.py | 2 -- tripleoclient/tests/test_heat_launcher.py | 4 ---- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/templates/ephemeral-heat/heat-pod.yaml.j2 b/templates/ephemeral-heat/heat-pod.yaml.j2 index ff643a721..73e844229 100644 --- a/templates/ephemeral-heat/heat-pod.yaml.j2 +++ b/templates/ephemeral-heat/heat-pod.yaml.j2 @@ -5,6 +5,7 @@ metadata: app: {{ heat_pod_name }} name: {{ heat_pod_name }} spec: + hostNetwork: true containers: - command: - heat-engine @@ -41,10 +42,6 @@ spec: - heat-api - --config-file - /etc/heat/heat.conf - ports: - - containerPort: {{ api_port }} - hostPort: {{ api_port }} - hostIP: {{ ctlplane_ip }} env: - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin diff --git a/tripleoclient/heat_launcher.py b/tripleoclient/heat_launcher.py index 7e303e8d6..4fdcda20f 100644 --- a/tripleoclient/heat_launcher.py +++ b/tripleoclient/heat_launcher.py @@ -778,8 +778,6 @@ class HeatPodLauncher(HeatContainerLauncher): pod_vars = { "install_dir": self.install_dir, "heat_dir": self.heat_dir, - "ctlplane_ip": self.host, - "api_port": self.api_port, "api_image": self.api_container_image, "engine_image": self.engine_container_image, "heat_pod_name": EPHEMERAL_HEAT_POD_NAME diff --git a/tripleoclient/tests/test_heat_launcher.py b/tripleoclient/tests/test_heat_launcher.py index ac37b7603..830ddb19b 100644 --- a/tripleoclient/tests/test_heat_launcher.py +++ b/tripleoclient/tests/test_heat_launcher.py @@ -549,15 +549,11 @@ class TestHeatPodLauncher(base.TestCase): def test_write_heat_pod(self): launcher = self.get_launcher() launcher.install_dir = 'install-dir' - launcher.host = '1.1.1.1' - launcher.api_port = '1234' launcher.api_container_image = 'api-image' launcher.engine_container_image = 'engine-image' launcher._write_heat_pod() with open(os.path.join(launcher.heat_dir, 'heat-pod.yaml')) as f: pod = f.read() - self.assertIn('hostPort: 1234', pod) - self.assertIn('hostIP: 1.1.1.1', pod) self.assertIn('image: api-image', pod) self.assertIn('image: engine-image', pod)