VM receive no IP with FlatDHCP, if there is no network with id=1

Bug #973271 reported by Mathias Nohr
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Unassigned

Bug Description

If i create a network with following command, my VMs get an IP over FlatDHCP:

nova-manage network create private --multi_host=T --fixed_range_v4=192.168.100.0/24 --num_networks=1 --bridge=br100 --bridge_interface=eth0 --network_size=255

If i delete this network and recreate it, new VM's don't get an IP.

If I change manually the network-id in the database to id=1, flatDHCP is working again.

It seems, that a network with id=1 have to be specified in the database.

I use the latest nova release from ubuntu 12.04 repositories (rc2).

My nova.conf:

--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--allow_admin_api=true
--use_deprecated_auth=false
--auth_strategy=keystone
--scheduler_driver=nova.scheduler.simple.SimpleScheduler
--ec2_host=192.168.129.49
--rabbit_host=192.168.129.49
--nova_url=http://192.168.129.49:8774/v2/
--routing_source_ip=192.168.129.49
--glance_api_servers=192.168.129.49:9292
--image_service=nova.image.glance.GlanceImageService
--iscsi_ip_prefix=192.168.100
--sql_connection=mysql://nova:novMYsql@192.168.129.49/nova
--ec2_url=http://192.168.129.49:8773/services/Cloud
--keystone_ec2_url=http://192.168.129.49:5000/v2.0/ec2tokens
--api_paste_config=/etc/nova/api-paste.ini
--libvirt_type=kvm
--libvirt_use_virtio_for_bridges=true
#--start_guests_on_host_boot=true
--resume_guests_state_on_host_boot=true
--vnc_enabled=true
--vncproxy_url=http://192.168.129.49:6080
--vnc_console_proxy_url=http://192.168.129.49:6080
--novncproxy_baseurl=http://192.168.129.49:6080/vnc_auto.html
--network_manager=nova.network.manager.FlatDHCPManager
--public_interface=eth0
--flat_interface=eth0
--flat_network_bridge=br100
--fixed_range=192.168.100.0/24
--network_size=250
--flat_network_dhcp_start=192.168.100.2
--flat_injected=False
--force_dhcp_release
--iscsi_helper=tgtadm
--connection_type=libvirt
--root_helper=sudo nova-rootwrap
--verbose

Revision history for this message
Martin Gerhard Loschwitz (martin-loschwitz) wrote :

I can confirm this problem with a very similar configuration and I can confirm that changing the ID of my former id=9 network to 1 fixed the problem for me.

Revision history for this message
bhuang (bhuanggut) wrote :

 yes,I delete this network and recreate it, new VM's don't get an IP.
Solution:
use nova;
update networks set id='1';

Tom Fifield (fifieldt)
Changed in nova:
status: New → Confirmed
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → High
John Tran (jtran)
Changed in nova:
assignee: nobody → John Tran (jtran)
Revision history for this message
John Tran (jtran) wrote :

I'm unable to reproduce the problem.

Changed in nova:
assignee: John Tran (jtran) → nobody
Revision history for this message
John Tran (jtran) wrote :

For more detail on my attempt to reproduce the problem, I deleted the network, recreated it. Using the same nova.conf settings from above (on TRUNK and on Precise 12.04 amd64):

Verifying that the network was deleted and recreated:

$ mysql -u root -p nova -e 'select id from networks;'
Enter password:
+----+
| id |
+----+
| 2 |
+----+

Newly created instance:

$ nova list
+--------------------------------------+------+--------+----------------+
| ID | Name | Status | Networks |
+--------------------------------------+------+--------+----------------+
| d6782537-c760-4b6a-a450-25d4fcd129cb | test1 | ACTIVE | mynet=192.168.100.2 |
+--------------------------------------+------+--------+----------------+

Revision history for this message
Vish Ishaya (vishvananda) wrote :

This has likely been fixed by a few patches that have been backported to stable, including:

https://review.openstack.org/#/c/6174/

Changed in nova:
status: Confirmed → Fix Released
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.