The ``force_metadata`` option forces the DHCP agent to provide
a host route to the metadata service on ``169.254.169.254``
regardless of whether the subnet contains an interface on a
router, thus maintaining similar and predictable metadata behavior
among subnets.
Frode,
Just a side comment: there is no neutron gateway in Jeff's deployment and neutron-openvswitch has it enabled for the dhcp agent unconditionally:
➜ charm-neutron- openvswitch git:(stable/19.04) grep -RiP enable_ isolated_ metadata icehouse/ dhcp_agent. ini:enable_ isolated_ metadata = True mitaka/ dhcp_agent. ini:enable_ isolated_ metadata = True
templates/
templates/
In the Neutron DHCP agent code itself:
neutron/ agent/linux/ dhcp.py
METADATA_ DEFAULT_ PREFIX = 16 DEFAULT_ CIDR = '%s/%d' % (METADATA_ DEFAULT_ IP,
METADATA_ DEFAULT_ PREFIX)
METADATA_DEFAULT_IP = '169.254.169.254'
METADATA_
# ... force_metadata or self.conf. enable_ isolated_ metadata:
ip_ cidrs.append( METADATA_ DEFAULT_ CIDR)
if self.conf.
In the doc for provider networks:
neutron/ doc/source/ admin/deploy- ovs-provider. rst
#. In the ``dhcp_agent.ini`` file, configure the DHCP agent:
.. code-block:: ini
[DEFAULT] _driver = openvswitch isolated_ metadata = True metadata = True
interface
enable_
force_
.. note::
The ``force_metadata`` option forces the DHCP agent to provide
a host route to the metadata service on ``169.254.169.254``
regardless of whether the subnet contains an interface on a
router, thus maintaining similar and predictable metadata behavior
among subnets.
However, looking at the option documentation descriptions I can see that there is no need to use both options because force_metadata is the stronger one (it enables metadata services unconditionally, not only for router-less networks): /github. com/openstack/ neutron/ blob/stable/ queens/ neutron/ conf/agent/ dhcp.py# L41-L57
https:/