Ask Your Question
2

Changing DNS Server ( nameserver ) added to /etc/resolv.conf on instances

asked 2015-02-09 10:15:17 -0500

Poonam Agarwal gravatar image

updated 2015-02-09 10:23:55 -0500

I am using Openstack Havana Ubuntu setup with one Controller Node and 10 Compute Nodes. Its a flat DHCP nova-network setup and neutron is not in use. By default the instances created on any of the compute nodes has the DNS "nameserver" as the flat DHCP Domain & Caching nameserver IP as the gateway IP i.e similar to as below

cat /etc/resolv.conf
nameserver 10.0.0.1
search novalocal

If i have a private DNS Server for my network and I do not want to the use the caching name server created by Nova as an default , are there ways of configuring the DNS Server on the hypervisor so that the instances have the "nameserver" populated as the private DNS entries by default instead of the caching DNS nameserver / Gateway entry?

I have tried adding dns_server = <my private="" dns=""> but it only seems to define the dns servers dnsmasq should be using to update the caching name server. The created instances still seem to point to the caching DNS server/Gateway IP. I was able to change the search parameter by updating the dhcp_domain parameter in /etc/nova/nova.conf. But havent had any luck changing the "nameserver" entry populated on the instances by default.

Anyone else has come across a similar problem?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-02-10 03:03:10 -0500

Poonam Agarwal gravatar image

Hello, Thanks for your feedback. I am not using Neutron Networking . Its a flat DHCP nova network.

edit flag offensive delete link more
4

answered 2015-02-09 13:47:21 -0500

larsks gravatar image

The DNS server information provided to your instances by the DHCP server is set using the --dns-nameserver parameter when you create a subnet with neutron subnet-create.

You can modify this value on an existing subnet by running:

neutron subnet-update <subnet-id> --dns-nameservers list=true <ns_ip_1> <ns_ip_1> ...

E.g.:

neutron subnet-update  3bd2c778-9402-4447-b0ab-b797e7ea289d --dns-nameservers list=true 8.8.8.8
edit flag offensive delete link more

Comments

Thanks a lot. You solved my problem..

imarijitbose gravatar imageimarijitbose ( 2015-11-08 13:34:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-02-09 10:15:17 -0500

Seen: 7,480 times

Last updated: Feb 09 '15