From f5796f650fbc31b7cdc0a605bcb2e457c2633001 Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Mon, 2 Oct 2023 12:16:28 +0200 Subject: [PATCH] Fix is_dvr_enabled method when OVN is configured The configuration parameter that provides the information about DVR when ML2/OVN is used is different from the parameter used by ML2/OVS. 1) In case of OVS: /etc/neutron/neutron.conf [DEFAULT] enable_dvr 2) In case of OVN: /etc/neutron/plugins/ml2/ml2_conf.ini [ovn] enable_distributed_floating_ip Change-Id: Id5e099a3fea21261339e049b53063613ea4667c2 --- tobiko/tripleo/_overcloud.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tobiko/tripleo/_overcloud.py b/tobiko/tripleo/_overcloud.py index 5e5a6a1a4..51d6b288e 100644 --- a/tobiko/tripleo/_overcloud.py +++ b/tobiko/tripleo/_overcloud.py @@ -451,8 +451,16 @@ def setup_overcloud_keystone_credentials(): def is_dvr_enabled(): controller0 = topology.list_openstack_nodes(group='controller')[0] container_runtime = tripleo.get_container_runtime_name() - command = (f"{container_runtime} exec neutron_api crudini --get " - "/etc/neutron/neutron.conf DEFAULT enable_dvr") + neutron_crudini_get = f"{container_runtime} exec neutron_api crudini --get" + if neutron.has_ovn(): + filename = "/etc/neutron/plugins/ml2/ml2_conf.ini" + section = "ovn" + param = "enable_distributed_floating_ip" + else: + filename = "/etc/neutron/neutron.conf" + section = "DEFAULT" + param = "enable_dvr" + command = ' '.join((neutron_crudini_get, filename, section, param)) enable_dvr = sh.execute(command, ssh_client=controller0.ssh_client, sudo=True).stdout.lower()