Revision history [back]

click to hide/show revision 1
initial version

Instance is not taking correct DNS servers

I am trying to create an instance as:
nova boot --flavor SL6.1-1-4-20 --image sl61-4-20 --nic net-id=c3e1ab70-a8ed-4f08-bc35-5f3b120f291f,v4-fixed-ip=10.5.0.140 --user-data ./sl61-4-20.sh --availability-zone nova os-61-test.sd.my-domain.com

My network is:
mysql> use nova
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select label,vlan,cidr,netmask,bridge,bridge_interface,gateway,dns1,dns2 from networks where label='L01';
+-------+------+-------------+---------------+--------+------------------+----------+-----------+-----------+
| label | vlan | cidr        | netmask       | bridge | bridge_interface | gateway  | dns1      | dns2      |
+-------+------+-------------+---------------+--------+------------------+----------+-----------+-----------+
| L01   |  V01 | 10.5.0.0/24 | 255.255.255.0 | br106  | eth2.105         | 10.5.0.1 | 10.66.8.2 | 10.66.8.3 |
+-------+------+-------------+---------------+--------+------------------+----------+-----------+-----------+
1 row in set (0.00 sec)

On my controller host I have in /etc/nova/nova.conf :
dns_server = 10.66.8.2,10.66.8.3
use_network_dns_servers = true
dhcp_domain = sd.my-domain.com

Instance is also created with correct IP. However after instance is created I see /etc/resolve.conf as:
;generated by /sbin/dhclient-script
search novalocal
nameserver 10.5.0.3

Where as it should be:
search sd.my-domain.com
nameserver 10.66.8.2
nameserver 10.66.8.3 

Due to incorrect DNS resolution shell script I want to run as user data is not running.

What am I missing?