dns order should be honored

Bug #1218629 reported by James Carey
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
changzhi

Bug Description

When a subnet is created with more than one DNS the order they were specified is not retained.

One reason this is an issue is that the user wants to split the DNS usage evenly across the available DNS nameservers to lessen the probability of the DNS lookups causing a performance bottleneck.

Here's the commands to recreate:

[root@rhel62 neutron]# neutron net-create mynet
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 4844005a-88b5-4c33-91de-3a116b2aea97 |
| name | mynet |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 1018bf40fe164937956983bf78b3288d |
+---------------------------+--------------------------------------+

[root@rhel62 neutron]# neutron subnet-create --dns-nameserver 192.168.8.1 --dns-nameserver 192.168.1.1 mynet 192.168.1.0/24
Created a new subnet:
+------------------+--------------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------------+
| allocation_pools | {"start": "192.168.1.2", "end": "192.168.1.254"} |
| cidr | 192.168.1.0/24 |
| dns_nameservers | 192.168.1.1 |
| | 192.168.8.1 |
| enable_dhcp | True |
| gateway_ip | 192.168.1.1 |
| host_routes | |
| id | 4448954b-d676-451b-a34c-4e76c8616397 |
| ip_version | 4 |
| name | |
| network_id | 4844005a-88b5-4c33-91de-3a116b2aea97 |
| tenant_id | 1018bf40fe164937956983bf78b3288d |
+------------------+--------------------------------------------------+

[root@rhel62 neutron]# neutron subnet-show 4448954b-d676-451b-a34c-4e76c8616397
+------------------+--------------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------------+
| allocation_pools | {"start": "192.168.1.2", "end": "192.168.1.254"} |
| cidr | 192.168.1.0/24 |
| dns_nameservers | 192.168.1.1 |
| | 192.168.8.1 |
| enable_dhcp | True |
| gateway_ip | 192.168.1.1 |
| host_routes | |
| id | 4448954b-d676-451b-a34c-4e76c8616397 |
| ip_version | 4 |
| name | |
| network_id | 4844005a-88b5-4c33-91de-3a116b2aea97 |
| tenant_id | 1018bf40fe164937956983bf78b3288d |
+------------------+--------------------------------------------------+

Changed in neutron:
assignee: nobody → Sean McCully (sean-mccully)
Revision history for this message
Mark McClain (markmcclain) wrote :

dns_nameservers ordering has never been guaranteed. This seems like a feature to consider for Icehouse.

Changed in neutron:
importance: Undecided → Wishlist
status: New → Triaged
Changed in neutron:
assignee: Sean McCully (sean-mccully) → nobody
Romil Gupta (romilg)
Changed in neutron:
assignee: nobody → Romil Gupta (romilg)
Changed in neutron:
assignee: Romil Gupta (romilg) → Cedric Brandily (cbrandily)
Revision history for this message
changzhi (changzhi) wrote :
Changed in neutron:
assignee: Cedric Brandily (cbrandily) → changzhi (changzhi)
status: Triaged → In Progress
changzhi (changzhi)
tags: added: rfe
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/203542

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Zhi Chang (<email address hidden>) on branch: master
Review: https://review.openstack.org/203542

Changed in neutron:
assignee: changzhi (changzhi) → YAMAMOTO Takashi (yamamoto)
changzhi (changzhi)
Changed in neutron:
assignee: YAMAMOTO Takashi (yamamoto) → changzhi (changzhi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit cb60d0bb4e0cc0cba68f59fdf5f4e89d6ec52950
Author: changzhi <email address hidden>
Date: Thu Jul 16 10:14:16 2015 +0800

    Keep dns nameserver order consistency

    Currently, there is no dns servers prioritization for subnets
    for Neutron.

    Generally speaking, it is useful to keep the order of dns
    nameservers consistent. Add a new column named 'order' in table
    'dnsnameservers' and add nameserver into DB one by one.

    Closes-Bug: #1218629
    Implements: blueprint keep-dns-nameserver-orderconsistency
    Change-Id: Id937aea411397d39370368a4eb45be26c4eefa9e

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (feature/pecan)

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/207903

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (feature/pecan)
Download full text (70.7 KiB)

Reviewed: https://review.openstack.org/207903
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9badcd249dab2d3330f0cd608496b59c9f44499a
Submitter: Jenkins
Branch: feature/pecan

commit 991ea00e6c115343eabecc62e86072175823f81f
Author: Moshe Levi <email address hidden>
Date: Thu Jul 30 12:04:15 2015 +0300

    SR-IOV: Fix SR-IOV agent to run ip link commands as root

    Commit https://review.openstack.org/#/c/155523/
    remove the remaining root_helper args, but didn't
    update the SR-IOV agent to execute them as root.

    This patch updates the agent to execute ip link commands
    as root and pass options argument as a list in the
    self._as_root method.

    Closes-Bug: #1479694
    Change-Id: I53cafd61845a69fae3a759fb7526950d655ffa20

commit 5b3bacedf6c014815bef03c2e821b5eb8ef92dcb
Author: Saksham Varma <email address hidden>
Date: Thu Jul 23 22:46:23 2015 -0700

    Moved out cisco n1kv mech driver and db models

    Moving out Cisco N1Kv database models and the mech driver
    to the openstack/networking-cisco repo as part of the second
    phase vendor-core decomposition

    Partial-Bug: #1479123
    Partial-implements: blueprint core-vendor-decomposition

    Change-Id: I65a704b238d8cbe2951a6912fa4f1e8518c6f412

commit 65ac8cd0a80548e115b8ec1d4cfd47a94422fddf
Author: OpenStack Proposal Bot <email address hidden>
Date: Wed Jul 29 20:44:01 2015 +0000

    Updated from global requirements

    Change-Id: I3a884a73d51df0f93b5cc88b3e3250d81bb1f455

commit f0e8356d04d04600c072a1c0f0bdf274ff19ab8c
Author: sridhargaddam <email address hidden>
Date: Mon Jul 27 03:46:48 2015 +0000

    Update dhcp agent cache for network:dhcp ports

    When a network with a dhcp_enabled subnet is scheduled on a dhcp
    agent, dhcp driver creates the network:dhcp port for the subnet.
    However, the port info is not updated in dhcp agents internal cache.
    Subsequently if the user deletes the network:dhcp port, the port is
    properly deleted on the server side (i.e., in the database) and when
    the port_delete_end notification is sent to the dhcp agent, it simply
    ignores it as the port entry would be missing in the cache. This patch
    fixes this issue by updating the dhcp agents cache when dhcp driver
    creates the network:dhcp port for the subnets.

    Closes-Bug: #1478426
    Change-Id: I69f5834dd964a4320c606c4e0aa2cdba70416943

commit cb60d0bb4e0cc0cba68f59fdf5f4e89d6ec52950
Author: changzhi <email address hidden>
Date: Thu Jul 16 10:14:16 2015 +0800

    Keep dns nameserver order consistency

    Currently, there is no dns servers prioritization for subnets
    for Neutron.

    Generally speaking, it is useful to keep the order of dns
    nameservers consistent. Add a new column named 'order' in table
    'dnsnameservers' and add nameserver into DB one by one.

    Closes-Bug: #1218629
    Implements: blueprint keep-dns-nameserver-orderconsistency
    Change-Id: Id937aea411397d39370368a4eb45be26c4eefa9e

commit b39e1469e824bc8bc79e1ecafa98825a94811c0b
Author: Salvatore Orlando <email address hidden>
Date: Tue Jun 23 04:54:2...

tags: added: in-feature-pecan
Revision history for this message
gustavo panizzo (gfa) wrote :

how can i round robin dns servers now?

Revision history for this message
changzhi (changzhi) wrote :

neutron subnet-update xxx --dns_nameservers 1.1.1.1 2.2.2.2 3.3.3.3
the order will be: 1.1.1.1 2.2.2.2 3.3.3.3

Revision history for this message
gustavo panizzo (gfa) wrote :

all my vm will get 1.1.1.1 as first dns server, then 2.2.2.2 then 3.3.3.3. so 1.1.1.1 will get a lot more traffic than the others.

today 1.1.1.1, 2.2.2.2 and 3.3.3.3 have about the same amount of traffic

Revision history for this message
gustavo panizzo (gfa) wrote :

nevermind, i can fix it on the vm using

*rotate*
 sets RES_ROTATE in _res.options, which causes round-robin selection of name servers from among those listed. This has the effect of
spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

in resolv.conf

Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-3 → 7.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers