diff --git a/recipes/neutron-l3-agent.rb b/recipes/neutron-l3-agent.rb index ea6fa43..be1df64 100644 --- a/recipes/neutron-l3-agent.rb +++ b/recipes/neutron-l3-agent.rb @@ -70,6 +70,8 @@ "neutron_external_bridge" => node["neutron"][plugin]["external_bridge"], "nova_metadata_ip" => metadata_ip, "neutron_plugin" => node["neutron"]["plugin"], + "l3_router_id" => (node["neutron"]["l3"]["router_id"] rescue nil), + "l3_gateway_net_id" => (node["neutron"]["l3"]["gateway_external_net_id"] rescue nil), "send_arp_for_ha" => node["neutron"]["send_arp_for_ha"] ) notifies :restart, "service[neutron-l3-agent]", :delayed diff --git a/templates/default/l3_agent.ini.erb b/templates/default/l3_agent.ini.erb index c2c9ce5..8842217 100644 --- a/templates/default/l3_agent.ini.erb +++ b/templates/default/l3_agent.ini.erb @@ -1,6 +1,10 @@ [DEFAULT] external_network_bridge = <%= @neutron_external_bridge %> +# Once networks are created please update the environment variables neutron[l3][router_id], neutron[l3][gateway_external_net_id] +router_id = <%= @l3_router_id %> +gateway_external_network_id = <%= @l3_gateway_net_id %> + metadata_ip = <%= @nova_metadata_ip %> metadata_port = 8775