From 012329cb352a18b61abb1b028911ab621eb844f7 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Wed, 3 Oct 2018 17:04:44 +0200 Subject: [PATCH] Provide support for "force_metadata" in dnsmasq Metadata server is important in some deployments and VMs need a way to reach it. Normally, neutron routers include a static route to the metadata server and things work, however, when using external L3 plugins (e.g. ODL) that static route might not be there by default and thus VMs don't have a way to contact the metadata server. For these cases, there is an alternative in which the DHCP server pushes the route to the instances through the 121 message defined in the DHCP standard. To use this alternative in dnsmasq, we need force_metadata = True in its config Change-Id: I2def87c8e7ed4b9ac87b66f825f2766a67a9a802 Signed-off-by: Manuel Buil --- defaults/main.yml | 3 +++ templates/dhcp_agent.ini.j2 | 1 + 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index cb2f0c15..a13100ef 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -402,6 +402,9 @@ neutron_dnsmasq_dns_servers: "" # Limit number of leases to prevent a denial-of-service. neutron_dnsmasq_lease_max: 16777216 +# Specify if dnsmasq should send a route to metadata server through DHCP 121 message to VM +neutron_dnsmasq_force_metadata: False + ### ### Metadata Agent Plugin Configuration ### diff --git a/templates/dhcp_agent.ini.j2 b/templates/dhcp_agent.ini.j2 index 2845ba6d..eeeec60e 100644 --- a/templates/dhcp_agent.ini.j2 +++ b/templates/dhcp_agent.ini.j2 @@ -17,3 +17,4 @@ dnsmasq_lease_max = {{ neutron_dnsmasq_lease_max }} # Metadata enable_isolated_metadata = True +force_metadata = {{ neutron_dnsmasq_force_metadata }}