calling "nova-manage network create" creates a lot of 10.0.X.0/24 networks

Bug #723591 reported by Christian Berendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Josh Kleinpeter

Bug Description

While calling "nova-manage network create" without arguments it creates a lot of networks.

I think the problem is the usage of the default values of some flags in bin/nova-manage in NetworkCommands-->create(). Because I don't set those flags in nova.conf the method creates a lot of useless networks.

I thought that I will receive some information about the possible arguments of create while calling "nova-manage network create". That's the case for example for "nova-manage user create". I think all methods called without arguments should print some useful help and not fill up my database with useless stuff. All methods in nova-manage doing the same stuff (creation of something for example) should do it in the same way.

---snip---
ares:~ # nova-manage user create
Possible wrong number of arguments supplied
user create: creates a new user and prints exports
        arguments: name [access] [secret]
---snap---

default values used in NetworkCommands-->create()
---snip---
        if not fixed_range:
            fixed_range = FLAGS.fixed_range
        if not num_networks:
            num_networks = FLAGS.num_networks
        if not network_size:
            network_size = FLAGS.network_size
        if not vlan_start:
            vlan_start = FLAGS.vlan_start
        if not vpn_start:
            vpn_start = FLAGS.vpn_start
        if not fixed_range_v6:
            fixed_range_v6 = FLAGS.fixed_range_v6
---snap---

ares:~ # nova-manage network create
[CTRL+C]

Cares:~ # nova-manage network list
network netmask start address DNS
192.168.3.0/24 255.255.255.0 192.168.3.3 4.2.2.5
10.0.0.0/24 255.255.255.0 10.0.0.2 None
10.0.1.0/24 255.255.255.0 10.0.1.2 None
10.0.2.0/24 255.255.255.0 10.0.2.2 None
10.0.3.0/24 255.255.255.0 10.0.3.2 None
10.0.4.0/24 255.255.255.0 10.0.4.2 None
[...]

use nova;
select * from fixed_ips;
[...]
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11431 | 10.0.40.166 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11432 | 10.0.40.167 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11433 | 10.0.40.168 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11434 | 10.0.40.169 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11435 | 10.0.40.170 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11436 | 10.0.40.171 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11437 | 10.0.40.172 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11438 | 10.0.40.173 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11439 | 10.0.40.174 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11440 | 10.0.40.175 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11441 | 10.0.40.176 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11442 | 10.0.40.177 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11443 | 10.0.40.178 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11444 | 10.0.40.179 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11445 | 10.0.40.180 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11446 | 10.0.40.181 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11447 | 10.0.40.182 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11448 | 10.0.40.183 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11449 | 10.0.40.184 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11450 | 10.0.40.185 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11451 | 10.0.40.186 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11452 | 10.0.40.187 | 47 | NULL | 0 | 0 | 0 |
| 2011-02-23 08:43:59 | NULL | NULL | 0 | 11453 | 10.0.40.188 | 47 | NULL | 0 | 0 | 0 |
+---------------------+---------------------+------------+---------+-------+---------------+------------+-------------+-----------+--------+----------+

Related branches

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Changed in nova:
assignee: nobody → Josh Kleinpeter (jkleinpeter)
status: Confirmed → Fix Committed
Revision history for this message
Christian Berendt (berendt) wrote :

fix not commited at the moment, there is a pending merge propsal. I think "In Progress" is the correct state.

Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
Josh Kleinpeter (jkleinpeter) wrote :

Thanks Christian. Wasn't exactly sure which state was best.

Revision history for this message
Josh Kleinpeter (jkleinpeter) wrote :

I added the i18n code around the exception's error message. Glad to know what that bit does now!

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → 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.