can not ping or ssh to the instance, "no route to the host"

Asked by Haitao Jiang

Hi

I followed the instructions in http://wiki.openstack.org/NovaInstall/DevInstallScript. Everything seems ok, however, I've created a instance but I can not ssh nor ping. All gave me "no route to the host" error. I am providing related information here, hoping that someone can help me out since I already spent several days on this.

Please let me know if I should provide anything more.

Thanks in advance!

Haitao
---------------------------------------------
Installation: OpenStack on Ubuntu 10.04 on top of the Virtual Box running under Windows 7.

# euca-describe-instances
RESERVATION r-bi6s8f73 project-haitaoj default
INSTANCE i-00000001 ami-2e5741a0 10.0.0.3 10.0.0.3 running project-haitaoj (project-haitaoj, haitaoj-laptop-vb) 0 m1.tiny 2011-06-14T20:10:40Z nova

# ping 10.0.0.3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
From 10.0.0.1 icmp_seq=1 Destination Host Unreachable

# cat /etc/network/interfaces
auto lo
iface lo inet loopback

netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.0.0 0.0.0.0 255.255.255.224 U 0 0 0 br100
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0

# ps ax | grep dnsmasq
2167 ? S 0:00 dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/opt/nova/networks/nova-br100.pid --listen-address=10.0.0.1 --except-interface=lo --dhcp-range=10.0.0.3,static,120s --dhcp-lease-max=32 --dhcp-hostsfile=/opt/nova/networks/nova-br100.conf --dhcp-script=/opt/nova/bin/nova-dhcpbridge --leasefile-ro

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Davor Cubranic (cubranic) said :
#1

Haitao, can you look for:
1) your instance's console output (euca-get-console-output i-00000001)
2) DHCP messages in syslog?

I have a similar problem to you, and see error entries in syslog from dnsmasq-dhcp about "no address range available for DHCP request via br100", as well as errors in the instance console about the metadata server being unreachable. I wonder if we're dealing with the same problem.

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

Generally that no address range available is because
--flat_network_dhcp_start
is not set properly or you have an extra dnsmasq running

Try setting it, killall dnsmasq, restart nova-network

Vish

On Jun 24, 2011, at 3:06 PM, Davor Cubranic wrote:

> Question #161446 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/161446
>
> Davor Cubranic posted a new comment:
> Haitao, can you look for:
> 1) your instance's console output (euca-get-console-output i-00000001)
> 2) DHCP messages in syslog?
>
> I have a similar problem to you, and see error entries in syslog from
> dnsmasq-dhcp about "no address range available for DHCP request via
> br100", as well as errors in the instance console about the metadata
> server being unreachable. I wonder if we're dealing with the same
> problem.
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Davor Cubranic (cubranic) said :
#3

Vish, thank you! Once I set "flat_network_dhcp_start" and restarted nova-network, it all works fine.

Interestingly, I do have an extra dnsmasq running that's listening on 192.168.122.1. That appears to be run by libvirt, and is *not* the cause of my errors so I left it running.

Now, what I don't understand is this: the docs say the default value for flat_network_dhcp_start is 10.0.0.2, and this is what showed up in OpenStack's dnsmasq process's parameters. My VMs are assigned addresses starting with 10.0.1.2, and once I set that in nova.conf as the value of flat_network_dhcp_start, everything startd working. But, I already had "network_size" set to 6000, so even if the range dnsmasq was using started at 10.0.0.2, why was 10.0.1.2 outside it?

Revision history for this message
Vish Ishaya (vishvananda) said :
#4

6000 isn't really a valid parameter for network_size. It should be a power of two. Also, you need to specify the same network size when creating the network using nova-manage.

Vish
On Jun 24, 2011, at 11:11 PM, Davor Cubranic wrote:

> Question #161446 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/161446
>
> Davor Cubranic posted a new comment:
> Vish, thank you! Once I set "flat_network_dhcp_start" and restarted
> nova-network, it all works fine.
>
> Interestingly, I do have an extra dnsmasq running that's listening on
> 192.168.122.1. That appears to be run by libvirt, and is *not* the cause
> of my errors so I left it running.
>
> Now, what I don't understand is this: the docs say the default value for
> flat_network_dhcp_start is 10.0.0.2, and this is what showed up in
> OpenStack's dnsmasq process's parameters. My VMs are assigned addresses
> starting with 10.0.1.2, and once I set that in nova.conf as the value of
> flat_network_dhcp_start, everything startd working. But, I already had
> "network_size" set to 6000, so even if the range dnsmasq was using
> started at 10.0.0.2, why was 10.0.1.2 outside it?
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Davor Cubranic (cubranic) said :
#5

Vish, I'll do this in a new deployment, but having an odd network_size and using a different (smaller) value in nova-manage doesn't seem to hurt the current (prototype) cluster.

And I don't mean to hijack this question from Haitao, but while I still have your attention:
1. does this apply if I use Vlan manager?
2. if so, there is no way to have different size subnets assigned to projects?
3. if this is supposed to be the same value, is there no way to only specify it once (i.e., in nova.conf) and let nova-manage pick it up from there instead of needing a command line parameter

Revision history for this message
Vish Ishaya (vishvananda) said :
#6

Below:

On Jun 28, 2011, at 3:16 PM, Davor Cubranic wrote:

> Question #161446 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/161446
>
> Davor Cubranic posted a new comment:
> Vish, I'll do this in a new deployment, but having an odd network_size
> and using a different (smaller) value in nova-manage doesn't seem to
> hurt the current (prototype) cluster.
>
> And I don't mean to hijack this question from Haitao, but while I still have your attention:
> 1. does this apply if I use Vlan manager?

Yes

> 2. if so, there is no way to have different size subnets assigned to projects?

Not automatically. You could manually create different size subnets for different projects in the database

> 3. if this is supposed to be the same value, is there no way to only specify it once (i.e., in nova.conf) and let nova-manage pick it up from there instead of needing a command line parameter

If you don't specify a value it will use the --network_size flag. same for --num_networks

>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Davor Cubranic (cubranic) said :
#7

So is it that the size of the network given in nova.conf and nova-manage can be different, it's just a bad practice to do so?

Revision history for this message
Vish Ishaya (vishvananda) said :
#8

Yes. The existence of both is mostly legacy. We initially created them automatically based on flags, then later decided they should be manually created via command.

Vish

On Jun 29, 2011, at 10:11 AM, Davor Cubranic wrote:

> Question #161446 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/161446
>
> Davor Cubranic posted a new comment:
> So is it that the size of the network given in nova.conf and nova-manage
> can be different, it's just a bad practice to do so?
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Can you help with this problem?

Provide an answer of your own, or ask Haitao Jiang for more information if necessary.

To post a message you must log in.