Ask Your Question
1

vm can not ping outer world with domain name

asked 2013-06-09 03:27:49 -0600

yuanyangen gravatar image

updated 2013-06-09 06:09:43 -0600

darragh-oreilly gravatar image

hi guys: I am new to openstack , I deploy openstack folsom on three nodes as following:

http://docs.openstack.org/folsom/basic-install/content/index.html

I success create a instance, everything works well, in this vm ,I can ping others via ip, but when I use a domain name ,i got the following:

ubuntu@inception:~$ ping www.google.com ping: unknown host www.google.com

of course, it is the dns problem, but I can't change the file /etc/resolv.conf in vm,cause it always change to the default one, the /etc/resolv.conf in the vm is like this:

nameserver 50.50.10.2

domain openstacklocal

search openstacklocal

in the vm ,i can ping 50.50.10.2, but in controller i can not ping to 50.50.10.2

I have the dnsmasq run on netwrok node:

network@network:~$ ps auxf | grep dns network 32695 0.0 0.0 8104 928 pts/0 S+ 15:26 0:00 _ grep --color=auto dns nobody 15651 0.0 0.0 27540 1100 ? S Jun08 0:00 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tapb3e23716-ae --except-interface=lo --domain=openstacklocal --pid-file=/var/lib/quantum/dhcp/47d751a7-130e-412e-911a-d52525d83e21/pid --dhcp-hostsfile=/var/lib/quantum/dhcp/47d751a7-130e-412e-911a-d52525d83e21/host --dhcp-optsfile=/var/lib/quantum/dhcp/47d751a7-130e-412e-911a-d52525d83e21/opts --dhcp-script=/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update --leasefile-ro --dhcp-range=set:tag0,50.50.10.0,static,120s root 15652 0.0 0.0 27512 468 ? S Jun08 0:00 _ dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tapb3e23716-ae --except-interface=lo --domain=openstacklocal --pid-file=/var/lib/quantum/dhcp/47d751a7-130e-412e-911a-d52525d83e21/pid --dhcp-hostsfile=/var/lib/quantum/dhcp/47d751a7-130e-412e-911a-d52525d83e21/host --dhcp-optsfile=/var/lib/quantum/dhcp/47d751a7-130e-412e-911a-d52525d83e21/opts --dhcp-script=/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update --leasefile-ro --dhcp-range=set:tag0,50.50.10.0,static,120s

In both controller and network , I also add the nameserver 8.8.8.8 into the file : /etc/resolv.conf

here is my question: how could i solve this question and why this situation happens?

Thanks in advance

yuanyangen

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2013-06-09 03:46:25 -0600

fifieldt gravatar image

If you wish to change the DNS server used by the virtual machines, you can read two methods on this page:

http://docs.openstack.org/folsom/openstack-compute/admin/content/dnsmasq.html

  1. set dns_server=8.8.8.8 in /etc/nova/nova.conf
  2. Create a custom DNSMasq configuration file by setting dnsmasq_config_file=/etc/dnsmasq-nova.conf in /etc/nova/nova.conf and configuring it using the example linked from the documentation.
edit flag offensive delete link more
5

answered 2013-06-09 06:07:34 -0600

darragh-oreilly gravatar image

When you have not specified anything for the optional dns_nameservers attribute of the Quantum subnet, then the Quantum dhcp agent configures dnsmasq to push out the dnsmasq IP - in your case 50.50.10.2. Have a look at /var/lib/quantum/dhcp/47d751a7-130e-412e-911a-d52525d83e21/opts. This happens about once per minute when the lease time is at the default 120 seconds. If dnsmasq is isolated in a IP namespace, then it will not be able to relay dns requests to upstream servers.

So the solution is to update the subnet with this attribute and DHCP will push it out to the instances. This can be done in Horizon or with the CLI eg:

quantum subnet-update <subnet id or name> --dns_nameservers 8.8.4.4 8.8.8.8
edit flag offensive delete link more

Comments

really appreciate for your answers ,thanks for darragh-oreilly's, you help me out of my questions

yuanyangen

yuanyangen gravatar imageyuanyangen ( 2013-06-12 22:06:37 -0600 )edit

This works on neutron ! Thanks a lot

calm07 gravatar imagecalm07 ( 2015-02-27 00:12:10 -0600 )edit
0

answered 2015-03-12 07:11:25 -0600

AMIT SAHA gravatar image

Appreciate the answer - it working over NEUTRON. But need to check only the command would solve as a permamanent one.

edit flag offensive delete link more

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: 2013-06-09 03:27:49 -0600

Seen: 3,828 times

Last updated: Mar 12 '15