nova-network doesn't set promisc mode on bridge interface

Bug #930926 reported by Ante Karamatić
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

When br100 is not manually configured and nova.conf (network related part) is configured as:

--flat_network_bridge=br100
--network_manager=nova.network.manager.FlatDHCPManager
--flat_interface=eth0
--public_interface=eth0
--flat_network_dhcp_start=192.168.99.2
--network_host=10.10.10.10
--fixed_range=192.168.99.0/24
--flat-injected

nova-network fails to set promisc mode for br100:

2012-02-10 07:41:34,398 DEBUG nova.utils [req-749b0e68-fe1f-4442-9771-3f0297716b40 None None] Running cmd (subprocess): sudo nova-rootwrap ip addr add 192.168.99.1/24 brd 192.168.99.255 dev br100 from (pid=928) execute /usr/lib/python2.7/dist-packages/nova/utils.py:208
2012-02-10 07:41:34,431 DEBUG nova.utils [req-749b0e68-fe1f-4442-9771-3f0297716b40 None None] Running cmd (subprocess): sudo nova-rootwrap ip addr add 10.10.10.10/16 brd 10.10.255.255 scope global dev br100 from (pid=928) execute /usr/lib/python2.7/dist-packages/nova/utils.py:208
2012-02-10 07:41:34,464 DEBUG nova.utils [req-749b0e68-fe1f-4442-9771-3f0297716b40 None None] Running cmd (subprocess): sudo nova-rootwrap route add default gw 10.10.0.1 from (pid=928) execute /usr/lib/python2.7/dist-packages/nova/utils.py:208
2012-02-10 07:41:34,574 DEBUG nova.utils [req-749b0e68-fe1f-4442-9771-3f0297716b40 None None] Attempting to grab semaphore "dnsmasq_start" for method "restart_dhcp"... from (pid=928) inner /usr/lib/python2.7/dist-packages/nova/utils.py:813

Looking at the code (nova/network/linux_net.py):

    if(FLAGS.public_interface == dev):
        _execute('ip', 'link', 'set',
                     'dev', dev, 'promisc', 'on', run_as_root=True)

it looks like this will never be true, since public_interface is eth0, and 'dev' is br100. On the other hand, this works fine:

    if(FLAGS.public_interface == FLAGS.flat_interface):
        _execute('ip', 'link', 'set',
                     'dev', dev, 'promisc', 'on', run_as_root=True)

Revision history for this message
Vish Ishaya (vishvananda) wrote :

I don't think the settings above are correct.

--flat_network_bridge=br100
--flat_interface=eth0
--public_interface=eth0

The problem is that it does not work to add ips to a bridged interface, so floating ips will not work properly. I think nova will move the ips onto the bridge at certain points, so it will probably work most of the time, but lead to strange issues. The floating ips should be added to the bridge, so you actually want:

--flat_network_bridge=br100
--flat_interface=eth0
--public_interface=br100

It looks like devstack defaults to the first, so we have proposed a change to default to the second set here:

https://review.openstack.org/#change,2428

I think we can go ahead and mark this invalid. Feel free to reopen if you disagree.

Changed in nova:
status: New → Invalid
Revision history for this message
Ante Karamatić (ivoks) wrote :

I don't disagree, it does make sense and it works that way. But this means that lots of docs need to be fixed too. For example:

http://docs.openstack.org/diablo/openstack-compute/install/content/compute-minimum-configuration-settings.html
http://docs.openstack.org/diablo/openstack-compute/starter/content/Nova_conf-d2s367.html

Thanks!

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.