driver.init_host() moved in abstract NetworkManager, is this a regression?

Asked by Salvatore Orlando

The call to driver.init_host() has been moved to the generic NetworkManager class in a recent merge (I believe rev658).
This implies the init_host() routine in linux_net which sets up forwarding and natting with iptables is invoked even for the Flat network model, where this setup is not required.

Not sure whether this is a regression bug or a desired behaviour.

Question information

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

hmm, good point. This probably shouldn't happen in flat mode. I'm guessing floating ips will fail in flat mode anyway because the source natting will not work, so perhaps the solution is to make FlatManager not inherit from the NetworkManager at all.

Revision history for this message
Ewan Mellor (ewanmellor) said :
#2

What is NetworkManager, if not a base class for all network managers?

Revision history for this message
Salvatore Orlando (salvatore-orlando) said :
#3

Is there a use case for supporting floating IPs in all network managers?
If yes, we should probably keep the call to driver.init_host in the base class, and then somehow fix SNAT in flat mode.
Otherwise, I reckon it would be better to move driver.init_host in VlanManager; but there is still value in having FlatManager inheriting from NetworkManager

Revision history for this message
Vish Ishaya (vishvananda) said :
#4

The code for floating ips is currently shared between FlatDHCPManager and VlanManager, so it is in the base class. There is some shared code between the various classes, so removing FlatManager from the hierarchy is probably a bad idea. Perhaps we overload __init__ in FlatManager to not call super.__init__, and we raise NotImplemented() for the floating ip commands for now? These can be implemented at some future date if someone figures out how to make floating ips work properly in flat mode.

Vish

On Feb 11, 2011, at 10:48 AM, Salvatore Orlando wrote:

> Question #144979 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/144979
>
> Status: Needs information => Open
>
> Salvatore Orlando gave more information on the question:
> Is there a use case for supporting floating IPs in all network managers?
> If yes, we should probably keep the call to driver.init_host in the base class, and then somehow fix SNAT in flat mode.
> Otherwise, I reckon it would be better to move driver.init_host in VlanManager; but there is still value in having FlatManager inheriting from NetworkManager
>
> --
> 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
Salvatore Orlando (salvatore-orlando) said :
#5

Hi Vish,

I think the approach you are proposing should solve the issue. Shall I raise a bug for that and assign it to you?
Alternatively, I can take care of that.

Salvatore

Revision history for this message
Vish Ishaya (vishvananda) said :
#6

If you have time, please go ahead and make a bug and a branch to propose.

Vish

On Feb 22, 2011, at 7:26 AM, Salvatore Orlando wrote:

> Question #144979 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/144979
>
> Status: Answered => Open
>
> Salvatore Orlando is still having a problem:
> Hi Vish,
>
> I think the approach you are proposing should solve the issue. Shall I raise a bug for that and assign it to you?
> Alternatively, I can take care of that.
>
> Salvatore
>
> --
> 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
Salvatore Orlando (salvatore-orlando) said :
#7

Sure Vish!

I'll do that ASAP.