← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1258430] [NEW] DHCP Agent does not use /etc/resolv.conf settings when no dnsmasq_dns_server is set in configuration

 

Public bug reported:

Hi,

Configuration file and code says that Neutron DHCP agent must use DNS settings from /etc/resolv.conf :
dhcp_agent.ini:
# Use another DNS server before any in /etc/resolv.conf.
# dnsmasq_dns_server =

neutron/agent/linux/dhcp.py:
    cfg.StrOpt('dnsmasq_dns_server',
               help=_('Use another DNS server before any in '
                      '/etc/resolv.conf.')),

Reality is that dnsmasq is launched with "--no-resolv" option:
neutron/agent/linux/dhcp.py:
..
   def spawn_process(self):
        """Spawns a Dnsmasq process for the network."""
        env = {
            self.NEUTRON_NETWORK_ID_KEY: self.network.id,
        }

        cmd = [
            'dnsmasq',
            '--no-hosts',
            '--no-resolv',
            '--strict-order',
            '--bind-interfaces',
            '--interface=%s' % self.interface_name,
            '--except-interface=lo',
            '--pid-file=%s' % self.get_conf_file_name(
                'pid', ensure_conf_dir=True),
            '--dhcp-hostsfile=%s' % self._output_hosts_file(),
            '--dhcp-optsfile=%s' % self._output_opts_file(),
            '--leasefile-ro',
        ]

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: dhcp

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1258430

Title:
  DHCP Agent does not use /etc/resolv.conf settings when no
  dnsmasq_dns_server is set in configuration

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  Hi,

  Configuration file and code says that Neutron DHCP agent must use DNS settings from /etc/resolv.conf :
  dhcp_agent.ini:
  # Use another DNS server before any in /etc/resolv.conf.
  # dnsmasq_dns_server =

  neutron/agent/linux/dhcp.py:
      cfg.StrOpt('dnsmasq_dns_server',
                 help=_('Use another DNS server before any in '
                        '/etc/resolv.conf.')),

  Reality is that dnsmasq is launched with "--no-resolv" option:
  neutron/agent/linux/dhcp.py:
  ..
     def spawn_process(self):
          """Spawns a Dnsmasq process for the network."""
          env = {
              self.NEUTRON_NETWORK_ID_KEY: self.network.id,
          }

          cmd = [
              'dnsmasq',
              '--no-hosts',
              '--no-resolv',
              '--strict-order',
              '--bind-interfaces',
              '--interface=%s' % self.interface_name,
              '--except-interface=lo',
              '--pid-file=%s' % self.get_conf_file_name(
                  'pid', ensure_conf_dir=True),
              '--dhcp-hostsfile=%s' % self._output_hosts_file(),
              '--dhcp-optsfile=%s' % self._output_opts_file(),
              '--leasefile-ro',
          ]

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1258430/+subscriptions


Follow ups

References