dns_assignment is lost during port creation after VIF binding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
bin Yu |
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_
In our ML2 plugin for create_port (create_port in plugins/
Please see: https:/
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/
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-
Version: Liberty, Centos 7.1
Changed in neutron: | |
assignee: | nobody → xagent (xagent-9) |
Changed in neutron: | |
assignee: | nobody → bin Yu (froyo-bin) |
Changed in neutron: | |
assignee: | bin Yu (froyo-bin) → Carl Baldwin (carl-baldwin) |
Changed in neutron: | |
assignee: | Carl Baldwin (carl-baldwin) → bin Yu (froyo-bin) |
Changed in neutron: | |
assignee: | bin Yu (froyo-bin) → Manjeet Singh Bhatia (manjeet-s-bhatia) |
Changed in neutron: | |
assignee: | Manjeet Singh Bhatia (manjeet-s-bhatia) → bin Yu (froyo-bin) |
Miguel, another one for you to triage - thanks.