← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1583769] [NEW] DHCP agent still refers to deprecated dhcp_domain

 

Public bug reported:

DESCRIPTION:

VMs were coming up with a hostname configured as
"vm_name.openstacklocal" despite having configured a dns_domain in
neutron.conf. However, the DHCP host file had the correct entry with the
domain, "vm_name.testdomain.net". Also, ping connectivity worked using
just DNS name, and with testdomain.net

Agent was using dhcp_domain (a deprecated field), when spawning dnsmasq
process with a "--domain" argument. If dhcp_domain is never set in the
dhcp_agent.ini file, it picks up the default value openstacklocal. The
reason the DHCP hosts file is correct, is because it is sent as the
dns_assignment field in the neutron port. Neutron server correctly uses
the newer dns_domain, and the port's dns_name/assignment is not used in
spawning dnsmasq.

Setting dhcp_domain in dhcp_agent.ini fixed issue locally. But since
this field has been deprecated since liberty, all references to
dhcp_domain should be changed to dns_domain.

I have fixed this locally on my deployment which uses liberty, will
apply fix to master and send out for a review


Pre-conditions:

 - Have the neutron and nova side changes for setting dns_name and dns_assignment on the port (present in master)
 - Set the dns_domain in neutron.conf


Reproduction Steps:

Create a VM like normal. Port it gets attached to should have dns_name
set according to instance_name, and dns_assignment should have correct
hostname and domain. Verify DHCP host file on network node has correct
entry.

Then login to VM, and do "hostname -f". Verify it displays with a
.openstacklocal


Version:

Tested and discovered on Liberty, Centos 7.1 hosts and Centos 7.1 VMs.
Upon code inspection, bug also exists in master
(neutron/agent/linux/dhcp.py has a few references to conf.dhcp_domain)

** Affects: neutron
     Importance: Undecided
     Assignee: xagent (xagent-9)
         Status: In Progress


** Tags: dns

** Changed in: neutron
       Status: New => In Progress

** Changed in: neutron
     Assignee: (unassigned) => xagent (xagent-9)

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

Title:
  DHCP agent still refers to deprecated dhcp_domain

Status in neutron:
  In Progress

Bug description:
  DESCRIPTION:

  VMs were coming up with a hostname configured as
  "vm_name.openstacklocal" despite having configured a dns_domain in
  neutron.conf. However, the DHCP host file had the correct entry with
  the domain, "vm_name.testdomain.net". Also, ping connectivity worked
  using just DNS name, and with testdomain.net

  Agent was using dhcp_domain (a deprecated field), when spawning
  dnsmasq process with a "--domain" argument. If dhcp_domain is never
  set in the dhcp_agent.ini file, it picks up the default value
  openstacklocal. The reason the DHCP hosts file is correct, is because
  it is sent as the dns_assignment field in the neutron port. Neutron
  server correctly uses the newer dns_domain, and the port's
  dns_name/assignment is not used in spawning dnsmasq.

  Setting dhcp_domain in dhcp_agent.ini fixed issue locally. But since
  this field has been deprecated since liberty, all references to
  dhcp_domain should be changed to dns_domain.

  I have fixed this locally on my deployment which uses liberty, will
  apply fix to master and send out for a review

  
  Pre-conditions:

   - Have the neutron and nova side changes for setting dns_name and dns_assignment on the port (present in master)
   - Set the dns_domain in neutron.conf

  
  Reproduction Steps:

  Create a VM like normal. Port it gets attached to should have dns_name
  set according to instance_name, and dns_assignment should have correct
  hostname and domain. Verify DHCP host file on network node has correct
  entry.

  Then login to VM, and do "hostname -f". Verify it displays with a
  .openstacklocal

  
  Version:

  Tested and discovered on Liberty, Centos 7.1 hosts and Centos 7.1 VMs.
  Upon code inspection, bug also exists in master
  (neutron/agent/linux/dhcp.py has a few references to conf.dhcp_domain)

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


Follow ups