← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1579966] Re: dns_name is always wiped out on Neutron port-update

 

** Changed in: neutron
       Status: Incomplete => Invalid

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

Title:
  dns_name is always wiped out on Neutron port-update

Status in neutron:
  Invalid

Bug description:
  DESCRIPTION: Suppose a DNS name is set on a port, either during initial port creation or a subsequent port-update. Whenever a port update is invoked in neutron - whether through the CLI or API - to change some other attribute, the dns_name is wiped out. All other properties of a port are untouched on a port update. As a a result the dns_assignment is also changed from hostname to IP format. This could also happen when a VM gets rescheduled to anotehr hypervisor (say due to network incompatibility/
  resource incompatibility, or other reasons), a port_update is called via Nova's neutron API to change the host ID binding, without dns_name in the request.

  I have rootcaused this to the port_update handler in neutron's DB base
  plugin is always setting the dns_name to an empty '' if the request
  does not have the dns_name. Not consistent with behavior for other
  attributes, or intended behavior of an "UPDATE" operation.

  REPRODUCTION STEPS:

  1. Create any new VM and attach to a tenant network, it will get
  allocated a new port/fixed IP, find this port's UUID. OR, attach a VM
  to an existing neutron port.

  2. For the given port, do a port-update and set the dns_name, verify
  in DB / via show CLI that dns_name and assignment are updated.

  3. Do a port-update and change any other attribute - for example the
  name, or admin state.

  4. Verify that the dns_name got cleared out. All other attributes
  untouched.

  OUTPUT:

  [root@ip-172-31-14-173 ~(admin_admin)]# neutron port-show
  355e5876-c195-443e-bac7-3cf40e032c7c

  | device_owner          | compute:None                                                                          |
  | dns_assignment        | {"hostname": "vmnet2", "ip_address": "192.168.66.5", "fqdn": "vmnet2.example.net."} |
  | dns_name              | vmnet2                                                                                |
  | extra_dhcp_opts       |                                                                                       |
  | fixed_ips             | {"subnet_id": "2b2486c7-2b90-47f1-9109-e93a8b54d073", "ip_address": "192.168.66.5"}   |

  [root@ip-172-31-14-173 ~(admin_admin)]# neutron port-update 355e5876-c195-443e-bac7-3cf40e032c7c --name ARJUN
  Updated port: 355e5876-c195-443e-bac7-3cf40e032c7c

  [root@ip-172-31-14-173 ~(admin_admin)]# neutron port-show
  355e5876-c195-443e-bac7-3cf40e032c7c

  | dns_assignment        | {"hostname": "host-192-168-66-5", "ip_address": "192.168.66.5", "fqdn": "host-192-168-66-5.example.net."} |
  | dns_name              |                                                                                                             |
  | extra_dhcp_opts       |                                                                                                             |
  | fixed_ips             | {"subnet_id": "2b2486c7-2b90-47f1-9109-e93a8b54d073", "ip_address": "192.168.66.5"}                         |

  EXPECTED OUTPUT: dns_name not removed, dns_assignment's hostname does
  not get replaced with "host-IP" format.

  VERSION: Liberty, Centos 7.1, regular deployment with controller node,
  network host, multiple hypervisors

  Severity: High - DNS behavior and DHCP host entries can unexpectedly
  change, killing connectivity or any current traffic. As mentioned,
  port can get updated for multitude of reasons (one being Nova
  migrating the instance to a new host)

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


References