Why can't I use Neutron L3 agent with provider network?

asked 2015-10-11 02:11:56 -0500

aksmj8855 gravatar image

updated 2015-10-11 10:56:33 -0500

Hi, I'm using DevStack stable/kilo All-in-One Neutron network.

I want to use Neutron L3 agent(ENABLED_SERVICES+=,q-l3) with provider network.

So, my local.conf for DevStack is like below.

# Neutron Setup
disable_service n-net
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-meta,q-l3,neutron
ENABLED_SERVICES+=,q-lbaas

Q_USE_PROVIDER_NETWORKING=True
Q_L3_ENABLED=False
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_INTERFACE=p3p1
PHYSICAL_NETWORK=default
PROVIDER_NETWORK_TYPE=flat

# Network Setup
PUBLIC_NETWORK_GATEWAY=192.168.0.200
FLOATING_RANGE=192.168.0.0/24

I added Q_USE_PROVIDER_NETWORKING=True and Q_L3_ENABLED=False to use provider network.

But, the value of Q_L3_ENABLED is changed to True by line 973 of lib/neutron-legacy.

function _configure_neutron_l3_agent {
...
     Q_L3_ENABLED=True

So, the function is_provider_network in lib/neutron-legacy doesn't detect the provider network setting.

function is_provider_network {
     if [ "$Q_USE_PROVIDER_NETWORKING" == "True" ] && [ "$Q_L3_ENABLED" == "False" ]; then
         return 0
     fi
     return 1
}

How can I use the Neutron L3 agent with provider network?

Is the function is_provider_network correct?


@dbaxps UPDATE1

l3_agent.ini

[DEFAULT]
l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport
external_network_bridge = br-ex
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
ovs_use_veth = False
[agent]
root_helper_daemon = sudo /usr/local/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
root_helper = sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
use_namespaces = True
debug = True
verbose = True

I can't find openvswitch directory in /etc/neutron/plugins. So, I can't find ovs_neutron_plugin.conf.

ml2_conf.ini

[ml2]
tenant_network_types = vxlan
type_drivers = local,flat,vlan,gre,vxlan
mechanism_drivers = openvswitch,linuxbridge
[ml2_type_flat]
flat_networks =
[ml2_type_vlan]
network_vlan_ranges = default
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
vni_ranges = 1001:2000
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
[ovs]
bridge_mappings = default:br-ex
local_ip = 192.168.0.3
[agent]
tunnel_types = vxlan
root_helper_daemon = sudo /usr/local/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
root_helper = sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
edit retag flag offensive close merge delete

Comments

Could you post l3_agent.ini , ovs_neutron_plugin.ini, ml2_conf.ini as UPDATE 1 for question been asked.

dbaxps gravatar imagedbaxps ( 2015-10-11 04:11:46 -0500 )edit
1

Just take a look at configuration files :
1. http://blog.oddbit.com/2014/05/28/mul...
If you want understand how provider external networks works see :
2. http://lxer.com/module/newswire/view/...

dbaxps gravatar imagedbaxps ( 2015-10-11 11:05:28 -0500 )edit

@dbaxps Thanks :)

aksmj8855 gravatar imageaksmj8855 ( 2015-10-11 11:10:56 -0500 )edit