Comment 7 for bug 1831935

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

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
templates/icehouse/dhcp_agent.ini:enable_isolated_metadata = True
templates/mitaka/dhcp_agent.ini:enable_isolated_metadata = True

In the Neutron DHCP agent code itself:

neutron/agent/linux/dhcp.py

METADATA_DEFAULT_PREFIX = 16
METADATA_DEFAULT_IP = '169.254.169.254'
METADATA_DEFAULT_CIDR = '%s/%d' % (METADATA_DEFAULT_IP,
                                   METADATA_DEFAULT_PREFIX)

# ...
        if self.conf.force_metadata or self.conf.enable_isolated_metadata:
            ip_cidrs.append(METADATA_DEFAULT_CIDR)

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]
      interface_driver = openvswitch
      enable_isolated_metadata = True
      force_metadata = True

   .. 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):
https://github.com/openstack/neutron/blob/stable/queens/neutron/conf/agent/dhcp.py#L41-L57