Reviewed:  https://review.openstack.org/313291
Committed: 
https://git.openstack.org/cgit/openstack/neutron/commit/?id=64f5fc82596ec6b78b76ca5d9cfc1d4b5a0b975d
Submitter: Jenkins
Branch:    master

commit 64f5fc82596ec6b78b76ca5d9cfc1d4b5a0b975d
Author: Bin Yu <froyo....@gmail.com>
Date:   Fri May 6 17:20:04 2016 +0800

    Refactor DNS integration out of DB core plugin
    
    This patch set aims to move all the code related to DNS integration
    from the DB core plugin to the DNS ML2 extension module.
    
    By doing this, this patchset removes the dns related code in
    db_base_plugin_v2 and the dns exteions module talks with core plugin
    only through the method extension_manager and apply_dict_extend_functions
    
    By properly implementing the generation of the dns_assignment attribute
    for ports in the DNS ML2 extension module, this patchset also fixes
    https://bugs.launchpad.net/neutron/+bug/1579977
    
    Change-Id: I63afb1a1bfeeb14eefb54681dc64959144deeb25
    Closes-Bug: #1579601
    Closes-Bug: #1579977


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  dns_assignment is lost during port creation after VIF binding

Status in neutron:
  Fix Released

Bug description:
  DESCRIPTION: The dns_assignment attribute is not actually part of the
  port's DB schema. It is a field that is populated on the fly during
  port creation (if dns_domain is set in neutron.conf and the port has a
  dns_name set), in order to send port information to DHCP agent, for
  example. This occurs in create_port in db_base_plugin_v2.py

  In our ML2 plugin for create_port (create_port in
  plugins/ml2/plugin.py), However, DNS assignment lost when attempting
  VIF binding. If VIF binding is committed, a new context created from
  Port DB - dns_assignment not a DB field. As such, any dns_assignment
  that was previously populated is lost.

  Please see:
  
https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#1130

  The dns_assignment from incoming mech_context needs to be copied over
  to the new bound_context. Else DHCP will receive an empty
  dns_assignment and VM DNS resolution will not work.

  
  PRE-CONDITIONS: 

  1. I have a small local changes to Nova's network/neutronv2/api.py
  (allocate_for_instance), in which it sends the dns_name as the
  instance's name, in the port_req_body during VM instance creation.
  This part of the Nova neutron API code triggers a port_create via
  neutron client.

  This enables setting DNS automatically during instance creation

  2. In neutron.conf, must set the dns_domain to some non-default value.
  Else, DNS resolution is disabled.

  
  REPRODUCTION STEPS:

  I just created a VM like normal (via GUI or NOVA CLI), and don't
  attach it to exist port. I verified that neutron server API for port
  creation was correctly getting the instance hostname as the dns_name
  in the port request payload. However, DHCP agent was receiving an
  empty dns_assignment.

  
  EXPECTED OUTPUT: Creating a VM should set DNS for the port, the DHCP agent 
and hosts file should have correct entries.

  ACTUAL OUTPUT: the DHCP host file entry has default "host-IP-
  openstack.local" format, and does not use DNS resolution of
  "hostname.domain.com"

  Version: Liberty, Centos 7.1

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to