From 427f14909acedbe740fb279c62ef1c00af452435 Mon Sep 17 00:00:00 2001 From: dbcocle-ts Date: Tue, 18 Apr 2023 08:31:22 +0000 Subject: [PATCH] Fix the issue that ovn metadata not work in muti-node enviroment Neutron-ovn-medatadata-agent should run on compute nodes. Closes-Bug: #2016849 Change-Id: Ia8d291bff59459214032a29dbb4ad6098766fc6c --- neutron/Chart.yaml | 2 +- neutron/templates/bin/_neutron-ovn-metadata-agent.sh.tpl | 1 + neutron/values.yaml | 2 +- neutron/values_overrides/ovn.yaml | 2 ++ releasenotes/notes/neutron.yaml | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/neutron/Chart.yaml b/neutron/Chart.yaml index 9b43e1f333..c3af071022 100644 --- a/neutron/Chart.yaml +++ b/neutron/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Neutron name: neutron -version: 0.3.5 +version: 0.3.6 home: https://docs.openstack.org/neutron/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png sources: diff --git a/neutron/templates/bin/_neutron-ovn-metadata-agent.sh.tpl b/neutron/templates/bin/_neutron-ovn-metadata-agent.sh.tpl index e4ce5fc29d..b559b072fc 100644 --- a/neutron/templates/bin/_neutron-ovn-metadata-agent.sh.tpl +++ b/neutron/templates/bin/_neutron-ovn-metadata-agent.sh.tpl @@ -23,6 +23,7 @@ sed -i -e "s|__OVN_NB_DB_SERVICE_HOST__|$OVN_NB_DB_SERVICE_HOST|g" /tmp/ovn_meta sed -i -e "s|__OVN_NB_DB_SERVICE_PORT__|$OVN_NB_DB_SERVICE_PORT|g" /tmp/ovn_metadata_agent.ini sed -i -e "s|__OVN_SB_DB_SERVICE_HOST__|$OVN_SB_DB_SERVICE_HOST|g" /tmp/ovn_metadata_agent.ini sed -i -e "s|__OVN_SB_DB_SERVICE_PORT__|$OVN_SB_DB_SERVICE_PORT|g" /tmp/ovn_metadata_agent.ini +sed -i -e "s|__NOVA_METADATA_SERVICE_HOST__|$NOVA_METADATA_SERVICE_HOST|g" /tmp/ovn_metadata_agent.ini exec neutron-ovn-metadata-agent \ --config-file /etc/neutron/neutron.conf \ diff --git a/neutron/values.yaml b/neutron/values.yaml index 709ea7c76b..2fdca391c1 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -64,7 +64,7 @@ labels: node_selector_key: openstack-control-plane node_selector_value: enabled ovn_metadata: - node_selector_key: openstack-control-plane + node_selector_key: openstack-compute-node node_selector_value: enabled l2gw: node_selector_key: openstack-control-plane diff --git a/neutron/values_overrides/ovn.yaml b/neutron/values_overrides/ovn.yaml index d7d9914066..68759df6ce 100644 --- a/neutron/values_overrides/ovn.yaml +++ b/neutron/values_overrides/ovn.yaml @@ -28,6 +28,7 @@ conf: ovn_nb_connection: tcp:__OVN_NB_DB_SERVICE_HOST__:__OVN_NB_DB_SERVICE_PORT__ ovn_sb_connection: tcp:__OVN_SB_DB_SERVICE_HOST__:__OVN_SB_DB_SERVICE_PORT__ enable_distributed_floating_ip: True + ovn_metadata_enabled: True ovn_l3_scheduler: leastloaded dns_servers: 8.8.8.8,1.1.1.1 ovn_metadata_agent: @@ -37,6 +38,7 @@ conf: metadata_proxy_socket: /var/lib/neutron/openstack-helm/metadata_proxy metadata_proxy_shared_secret: "password" metadata_workers: 2 + nova_metadata_host: __NOVA_METADATA_SERVICE_HOST__ cache: enabled: true backend: dogpile.cache.memcached diff --git a/releasenotes/notes/neutron.yaml b/releasenotes/notes/neutron.yaml index 8a2811c6b8..0c59a672f9 100644 --- a/releasenotes/notes/neutron.yaml +++ b/releasenotes/notes/neutron.yaml @@ -47,4 +47,5 @@ neutron: - 0.3.3 Add OVN Support - 0.3.4 Replace node-role.kubernetes.io/master with control-plane - 0.3.5 Fix health probe for OVN metadata agent + - 0.3.6 Fix the issue that ovn metadata not work in muti-node enviroment ...