FlatManager and db.project_get_network

Asked by Armando Migliaccio

When using (network)FlatManager what is the relationship between a network and a project? Should the project_id column of the network table always be null (i.e. no relationship)?

Let's say I have started afresh (new DB) I have created a flat network.

When db.project_get_network is called (regardless of the networking model), a call to associate_network is made, which then cause the project_id field of the only network entry in the table to be set to the project_id given in input.

Is this correct? What happens when I have multiple projects when using Flat networking? Every time I launch an instance using a different project id, will I overwrite the project_id field of the network entry in the DB?

Hope I was able to get the point across!

Thanks,
Armando

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Vish Ishaya
Solved:
Last query:
Last reply:
Revision history for this message
Best Vish Ishaya (vishvananda) said :
#1

This is definitely a bug. Projects should only be associated with networks in vlan mode. I believe I have fixed all of the relevant places where it is associating a network to a project in my branch here:

lp:~vishvananda/nova/move-ip-allocation

(the main change in the virt layer is to use db.network_get_by_instance instead of db.project_get_network)

There is one other one that happens when you try to get vpn data for a project which is fixed in this branch:

lp:~vishvananda/nova/project-vpns

Vish

On Dec 21, 2010, at 7:03 AM, Armando Migliaccio wrote:

> New question #138614 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/138614
>
> When using (network)FlatManager what is the relationship between a network and a project? Should the project_id column of the network table always be null (i.e. no relationship)?
>
> Let's say I have started afresh (new DB) I have created a flat network.
>
> When db.project_get_network is called (regardless of the networking model), a call to associate_network is made, which then cause the project_id field of the only network entry in the table to be set to the project_id given in input.
>
> Is this correct? What happens when I have multiple projects when using Flat networking? Every time I launch an instance using a different project id, will I overwrite the project_id field of the network entry in the DB?
>
> Hope I was able to get the point across!
>
> Thanks,
> Armando
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Armando Migliaccio (armando-migliaccio) said :
#2

Thanks Vish Ishaya, that solved my question.

Revision history for this message
Armando Migliaccio (armando-migliaccio) said :
#3

That was quite an impersonal reply message automatically generated by lp.

Thanks for fixing this in the xenapi module too!

Armando