Use host network for db_sync

Let's use host network for all containers doing db_sync.
This would avoid any issues from the netavark network
stack which is the default with podman.

Resolves: rhbz#2123252
Change-Id: Ifc72293052e8719cd519400c76c548910a741ff3
(cherry picked from commit a197198b7c)
This commit is contained in:
Rabi Mishra 2022-09-07 09:12:05 +05:30 committed by rabi
parent 17de18b40e
commit 98fdd237e5

View File

@ -383,6 +383,7 @@ class HeatContainerLauncher(HeatBaseLauncher):
cmd = [
'podman', 'run', '--rm',
'--net', 'host',
'--user', self.user,
'--volume', '%(conf)s:/etc/heat/heat.conf:Z' % {'conf':
self.config_file},
@ -396,6 +397,7 @@ class HeatContainerLauncher(HeatBaseLauncher):
def get_heat_uid(self):
cmd = [
'podman', 'run', '--rm',
'--net', 'host',
self.all_container_image,
'getent', 'passwd', self.user
]
@ -410,6 +412,7 @@ class HeatContainerLauncher(HeatBaseLauncher):
def get_heat_gid(self):
cmd = [
'podman', 'run', '--rm',
'--net', 'host',
self.all_container_image,
'getent', 'group', self.user
]
@ -546,6 +549,7 @@ class HeatPodLauncher(HeatContainerLauncher):
cmd = [
'sudo', 'podman', 'run', '--rm',
'--user', 'heat',
'--net', 'host',
'--volume', '%(conf)s:/etc/heat/heat.conf:z' % {'conf':
self.config_file},
'--volume', '%(inst_tmp)s:%(inst_tmp)s:z' % {'inst_tmp':