nova flat networking will not accept non-default ips

Bug #658762 reported by Ryan Lucio

This bug report was converted into a question: question #129521: nova flat networking will not accept non-default ips.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

I updated to HOL this morning, 10/11. Using my previous test config:

rlucio@box3:/etc/nova$ cat nova-network.conf
--networks_path=/var/lib/nova/networks
--logfile=/var/log/nova/nova-network.log
--sql_connection=mysql://root:nova@192.168.0.63/nova
--dhcpbridge=/usr/bin/nova-dhcpbridge
--s3_host=192.168.0.63
--rabbit_host=192.168.0.63
--redis_host=127.0.0.1
--verbose
--cc_host=192.168.0.63
--flat_network=true
--flat_network_gateway=192.168.2.1
--flat_network_netmask=255.255.255.0
--flat_network_network=192.168.2.0
--flat_network_ips=192.168.2.220,192.168.2.221,192.168.2.222
--flat_network_bridge=br0
--flat_network_broadcast=192.168.2.255

I was getting instances launching with 10.0.0.X addresses. I took a quick look at the flags in nova/network/manager.py and saw that there was a new flag for a private IP range. I updated my file to include the private_range flag in place of the flat_network_ips flag and restarted the nova-network daemon:

--private_range=192.168.2.64/26

However I still get my instances being allocated with the default ip range:

rlucio@box3:/etc/nova$ euca-describe-instances
RESERVATION r-n6mq4b6o admin
INSTANCE i-powbiy ami-t9yxzfpy 10.0.0.12 10.0.0.12 scheduling None (admin, None) 0 m1.small 2010-10-11 21:49:59
RESERVATION r-9zf556s9 admin
INSTANCE i-h4pzd0 ami-t9yxzfpy 10.0.0.7 10.0.0.7 shutdown None (admin, p2n1) 0 m1.small 2010-10-08 22:05:41

Ryan Lucio (rlucio)
description: updated
Revision history for this message
Ryan Lucio (rlucio) wrote :

Closing this, as the codebase has already moved forward.

To create a flat network you must do the following (10/14/2010):

1) define the following flag for use by nova-network, nova-manage, and nova-compute:

--network_manager=nova.network.manager.FlatManager

2) define the following flags for use by nova-network and nova-manage:

--fixed_range=<network/prefix> # ex 192.168.2.64/26
--network_size=<number of addrs> # ex 64

3) run nova-manage to create the network (assuming you installed via ppa debs, so that the flag file is in /etc/nova/nova-manage.conf):
/usr/bin/python /usr/bin/nova-manage network create

** Note that the script currently assumes that the first IP address is your network (like 192.168.0.0), that the 2nd ip is your gateway (192.168.0.1), and that the broadcast is the very last IP in the range you defined (192.168.0.255). If this is not the case you will need to manually edit the sql db 'networks' table.

** Also note that as an alternative to using flags for nova-manage you can specify the arguments on the command line, like this:
nova-manage network create 10.0.0.0/8 3 16

4) restart nova-network service.

Revision history for this message
Ryan Lucio (rlucio) wrote :

Nova networking does accept non-default ips; but the flags and the methods used to create a new flat networking configuration have all changed recently. This confusion led to the bug being logged.

Changed in nova:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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