OpenStack Compute (Nova)

Management of Associations between Networks and Projects fails

Reported by ktesiphas on 2011-12-08
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
High
François Charlier
Diablo
Undecided
Mark McLoughlin

Bug Description

http://forums.openstack.org/viewtopic.php?f=16&t=557

I have a question regarding the nova-manage network create statement. We assumed, that every project / tenant should get its own virtual network segment out of the defined range of ip nets in the fixed-range flag in nova.conf.

When I create a new network with, e.g.

Code: Select all
    nova-manage network create projnet 192.168.5.0/24 2 128

: How does Open Stack knows, that it should belong to the previously created project??

I used "nova-manage network create --help" to find out, that there are some additional options available for the nova-manage network create statement (e.g.):

Code: Select all
      --project_id=<project id>
                            Project id
      --label=<label> Label for network (ex: public)

Whenever I used them in one of my statements the appropriate project field is still empty.

Code: Select all
    root@c2n2:/usr/share/pyshared/nova/network# nova-manage project create proj2 projadmin
    root@c2n2:/usr/share/pyshared/nova/network# nova-manage network create projnet4 192.168.7.0/24 1 128 --project_id=proj2
    root@c2n2:/usr/share/pyshared/nova/network# nova-manage network list
    id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
    1 192.168.4.0/24 None 192.168.4.2 8.8.4.4 None None None None
    2 192.168.5.0/25 None 192.168.5.2 8.8.4.4 None None None None
    3 192.168.5.128/25 None 192.168.5.130 8.8.4.4 None None None None
    4 192.168.6.0/25 None 192.168.6.2 8.8.4.4 None None None None
    5 192.168.7.0/25 None 192.168.7.2 8.8.4.4 None None None None

Also the corresponding fields in the table "networks" are empty.

So how does Openstack manage associations between network and different projects?

Thank you for answering my question in advance.

----------------------

Answer by: mjfork » Thu Dec 08, 2011 7:58 pm
I tried this a few separate ways and it did not work for me as well. I traced the code and, while I see nova-manage passing on project_id to the create_networks call, I do not see where create_networks makes use of it. I would suggest opening a bug report in launchpad. Please post the link if you do in case others with a similar problem come across this.

As a workaround, you could go into the mysql database and do

mysql> SELECT id, vlan from networks;
mysql> UPDATE networks SET project_id=<numerical id> WHERE id = <numerical id from previous call>;

Where to get the project_id will depend on if you are using keystone or nova authentication. I believe this will only work if the network has not been previously used.
Michael Fork

ktesiphas (ktesiphas) on 2011-12-08
description: updated

This also affects me - project_id is being ignored when specifying creation of a fixed IP range.

Ubuntu 11.10, Diablo.

sudo nova-manage project create development kevinj
sudo nova-manage network create --label=development --project_id=development --fixed_range_v4=10.0.1.0/26 --bridge_interface=eth1 --vlan=101
sudo nova-manage network list

id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
1 10.0.0.0/26 None 10.0.0.3 None None 100 example None
4 10.0.1.0/26 None 10.0.1.3 None None 101 None None

Thierry Carrez (ttx) on 2011-12-13
Changed in nova:
importance: Undecided → High
status: New → Confirmed
Changed in nova:
assignee: nobody → François Charlier (francois-charlier)
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/2790
Committed: http://github.com/openstack/nova/commit/52de7e6aba5d0c7dac17f2ff5f1fc534eef7492e
Submitter: Jenkins
Branch: master

commit 52de7e6aba5d0c7dac17f2ff5f1fc534eef7492e
Author: François Charlier <email address hidden>
Date: Wed Jan 4 19:37:32 2012 +0100

    Fix bug 901899

    If project_id is given when a network is created, it has to be saved in
    the database.

    Change-Id: I59a05f55202484cfe7910e159d80cd4b5f51dffa

Changed in nova:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/3079
Committed: http://github.com/openstack/nova/commit/a224f6799ef38fefa85f64837bbe8ac1b2146c14
Submitter: Jenkins
Branch: stable/diablo

commit a224f6799ef38fefa85f64837bbe8ac1b2146c14
Author: François Charlier <email address hidden>
Date: Wed Jan 4 19:37:32 2012 +0100

    Fix bug 901899

    If project_id is given when a network is created, it has to be saved in
    the database.

    (cherry picked from commit 52de7e6aba5d0c7dac17f2ff5f1fc534eef7492e)

    Change-Id: I59a05f55202484cfe7910e159d80cd4b5f51dffa

tags: added: in-stable-diablo
Thierry Carrez (ttx) on 2012-01-25
Changed in nova:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers