VlanManager: nova-network does not assign ip from project's network range
Hi all,
I'm experiencing a problem with dhcp assigned ips in a vlan manager environment. I'm testing a two node setup: both of them are ubuntu 11.04 running Diablo services. Actual diablo milestone version is D4, but I found the problem on D3. The first node runs as cloud controller and nova-network service, the second is a nova-compute node. On my nova.conf I defined the fixed_range this way:
--fixed_range=10.12.0.0/16
On this node I created a first project and then a network with the following command:
root@nova-services2:~# nova-manage network create --label=gcivitella_proj_net --fixed_range_v4=10.12.2.0/24 --num_networks=1 --network_size=256 --vlan=12 --dns1=212.29.129.3 --dns2=212.29.129.2
root@nova-services2:~# nova-manage network list
network netmask start address DNS1 DNS2 VlanID project
10.12.2.0/24 255.255.255.0 10.12.2.3 None None 12 None
As soon as I deploy a vm with my project's credentials, in the nova database I can see: mysql> select * from networks \G; ******** 1. row ******** created_at: 2011-08-25 14:38:38 updated_at: 2011-08-25 16:14:10 deleted_at: NULL deleted: 0 id: 8 injected: 0 cidr: 10.12.2.0/24 netmask: 255.255.255.0 bridge: br102 gateway: 10.12.2.1 broadcast: 10.12.2.255 dns1: NULL vlan: 102 vpn_public_address: 212.29.131.5 vpn_public_port: 1000 vpn_private_address: 10.12.2.2 dhcp_start: 10.12.2.3 project_id: gcivitella_proj host: nova-services2 cidr_v6: NULL gateway_v6: NULL label: gcivitella_proj_net netmask_v6: NULL bridge_interface: eth0 multi_host: 0 dns2: NULL uuid: d1e1eb15-9392-4851-83fa-6528beb3fcc6
AFAIK this means that the network has been associated with the project without any further configuration. From now on the vms deployed by project's users should be linked to that project's network. I would expect thath my first deployed vm woud get an ip between 10.12.2.3 and 10.12.2.255. What really happens is that on both nodes vlans and bridges are created correctly. On nova-network node br102 gets 10.12.2.1 as ip (gateway's ip in this network sql record), but the vm gets as ip 10.12.1.5 and this makes it unreacheable.
In nova-network.log i can see: 2011-08-26 10:15:04,592 DEBUG nova.rpc [-] received {u'_context_request_id': u'1H687SBPN6FE9W766GBC', u'_context_read_deleted': False, u'args': {u'address': u'10.12.1.5'}, u'_context_is_admin': True, u'_context_timestamp': u'2011-08-26T08:15:04Z', u'_context_user': None, u'method': u'release_fixed_ip', u'_context_project': None, u'_context_remote_address': None} from (pid=21738) process_data /usr/lib/pymodules/python2.7/nova/rpc.py:202 2011-08-26 10:15:04,593 DEBUG nova.rpc [-] unpacked context: {'timestamp': u'2011-08-26T08:15:04Z', 'msg_id': None, 'remote_address': None, 'project': None, 'is_admin': True, 'user': None, 'request_id': u'1H687SBPN6FE9W766GBC', 'read_deleted': False} from (pid=21738) _un pack_context /usr/lib/pymodules/python2.7/nova/rpc.py:451 2011-08-26 10:15:04,594 DEBUG nova.network.manager [1H687SBPN6FE9W766GBC None None] Released IP |10.12.1.5| from (pid=21738) release_fixed_ip /usr/lib/pymodules ...