IP Doesn't Match DHCP for new Instances

Bug #1077441 reported by Kyle Brandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
High
Jian Wen
OpenStack Dashboard (Horizon)
Won't Fix
Undecided
Gabriel Hurley

Bug Description

With FlatDHCPManager, when I provision a new VM via Horizon, my router provides the Instance with an IP. However, Horizon seems to think it has a different IP. Until I manually change the IP of the instance to match what Horizon shows the ip as, networking doesn't work to and from the VM.

Host:
nova-manage network create my_flat3 --fixed_range_v4=192.168.1.0/24 --num_networks=1 --bridge=br100 --bridge_interface=eth0 --multi_host=T

# NETWORK
network_manager=nova.network.manager.FlatDHCPManager
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
force_dhcp_release=True
flat_interface=eth0
flat_network_bridge=br100
connection_type=libvirt
fixed_range=192.168.1.0/24
flat_network_dhcp_start=192.168.1.19
flat_injected=False
multi_host=True

Inside a VM:
Starting network...
udhcpc (v1.18.5) started
Sending discover...
Sending select for 192.168.1.143...
Lease of 192.168.1.143 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.1.1

Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Horizon shows exactly what Nova reports via the API. Any problem here is on Nova's side of the fence.

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
status: New → Won't Fix
Jian Wen (wenjianhn)
Changed in nova:
assignee: nobody → Jian Wen (wenjianhn)
Revision history for this message
Jian Wen (wenjianhn) wrote :

The VM ip 192.168.1.143 was leased from your router instead of dnsmasq on your network-node.
ebtables rules are used to protect the network from ip spoof. If the source ip of a packet
sent from a VM is not the ip dnsmasq released, it will be dropped. As a result, the networking
of the VM doesn't work.

You shouldn't let your router be the DHCP server.
Maybe you need to disable DHCP server of the router in a develop environment.

Changed in nova:
status: Triaged → Invalid
Revision history for this message
Kyle Brandt (kyle-kbrandt) wrote :

Agreed. I ended up in some weird places trying to get FlatDHCP working. I eventually discovered it was the bug I described in:

http://serverfault.com/questions/448347/instances-in-openstack-are-not-getting-dhcp-leases/448348#448348

Which was pretty nasty to find. Feel free to close this, no way it is a bug IMO. If anything, it would be a feature request (support external DHCP servers).

Revision history for this message
Jian Wen (wenjianhn) wrote :

I will fix that bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.