2015-08-18 16:57:44 +02:00
|
|
|
LIBDIR=$DEST/neutron/devstack/lib
|
|
|
|
|
2021-08-04 14:08:24 +02:00
|
|
|
source $LIBDIR/distributed_dhcp
|
2016-09-22 17:52:25 -07:00
|
|
|
source $LIBDIR/dns
|
2015-09-01 15:27:26 -07:00
|
|
|
source $LIBDIR/flavors
|
2015-08-18 16:57:44 +02:00
|
|
|
source $LIBDIR/l2_agent
|
2015-08-25 15:50:09 +03:00
|
|
|
source $LIBDIR/l2_agent_sriovnicswitch
|
2018-02-23 14:00:08 +08:00
|
|
|
source $LIBDIR/l3_agent
|
2019-06-13 22:06:26 +02:00
|
|
|
source $LIBDIR/l3_conntrack_helper
|
2021-12-27 16:28:53 +08:00
|
|
|
source $LIBDIR/l3_ndp_proxy
|
2015-08-18 16:57:44 +02:00
|
|
|
source $LIBDIR/ml2
|
2019-03-05 18:48:58 +08:00
|
|
|
source $LIBDIR/network_segment_range
|
2017-04-24 19:54:01 +00:00
|
|
|
source $LIBDIR/segments
|
2016-11-10 18:01:35 +07:00
|
|
|
source $LIBDIR/log
|
2018-11-10 00:48:52 +01:00
|
|
|
source $LIBDIR/fip_port_forwarding
|
2018-06-01 22:46:52 +00:00
|
|
|
source $LIBDIR/uplink_status_propagation
|
2020-03-01 18:56:03 -06:00
|
|
|
source $LIBDIR/tag_ports_during_bulk_creation
|
2020-04-06 17:12:03 -04:00
|
|
|
source $LIBDIR/octavia
|
2020-07-02 15:41:39 -04:00
|
|
|
source $LIBDIR/loki
|
2021-11-17 12:43:09 +03:00
|
|
|
source $LIBDIR/local_ip
|
2016-04-12 12:54:48 +02:00
|
|
|
|
2021-05-27 17:23:38 +01:00
|
|
|
# source the OVS/OVN compilation helper methods
|
2021-06-18 16:57:56 +02:00
|
|
|
source $TOP_DIR/lib/neutron_plugins/ovs_source
|
2021-05-27 17:23:38 +01:00
|
|
|
|
2016-04-12 12:54:48 +02:00
|
|
|
Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT)
|
2015-08-18 16:57:44 +02:00
|
|
|
|
2019-11-28 14:35:41 +00:00
|
|
|
function is_ovn_enabled {
|
|
|
|
[[ $NEUTRON_AGENT == "ovn" ]] && return 0
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2017-03-07 21:06:35 +00:00
|
|
|
if [ -f $LIBDIR/${NEUTRON_AGENT}_agent ]; then
|
|
|
|
source $LIBDIR/${NEUTRON_AGENT}_agent
|
2016-04-08 13:25:52 +02:00
|
|
|
fi
|
|
|
|
|
2015-09-10 16:54:31 +09:00
|
|
|
if [[ "$1" == "stack" ]]; then
|
|
|
|
case "$2" in
|
|
|
|
install)
|
2017-02-23 22:32:32 -05:00
|
|
|
;;
|
|
|
|
post-config)
|
2020-03-01 18:56:03 -06:00
|
|
|
if is_service_enabled neutron-tag-ports-during-bulk-creation; then
|
|
|
|
configure_tag_ports_during_bulk_creation_extension
|
|
|
|
fi
|
2018-06-01 22:46:52 +00:00
|
|
|
if is_service_enabled neutron-uplink-status-propagation; then
|
|
|
|
configure_uplink_status_propagation_extension
|
|
|
|
fi
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-flavors neutron-flavors; then
|
2015-09-01 15:27:26 -07:00
|
|
|
configure_flavors
|
|
|
|
fi
|
2016-11-10 18:01:35 +07:00
|
|
|
if is_service_enabled q-log neutron-log; then
|
|
|
|
configure_log
|
|
|
|
fi
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-dns neutron-dns; then
|
2016-09-22 17:52:25 -07:00
|
|
|
configure_dns_extension
|
2017-02-23 22:32:32 -05:00
|
|
|
post_config_dns_extension
|
2017-11-06 16:56:01 +00:00
|
|
|
if is_service_enabled designate; then
|
|
|
|
configure_dns_integration
|
|
|
|
fi
|
2016-09-22 17:52:25 -07:00
|
|
|
fi
|
2017-04-24 19:54:01 +00:00
|
|
|
if is_service_enabled neutron-segments; then
|
|
|
|
configure_segments_extension
|
|
|
|
fi
|
2019-03-05 18:48:58 +08:00
|
|
|
if is_service_enabled neutron-network-segment-range; then
|
|
|
|
configure_network_segment_range
|
|
|
|
fi
|
2021-08-04 14:08:24 +02:00
|
|
|
if is_service_enabled q-distributed-dhcp neutron-distributed-dhcp; then
|
|
|
|
if [ $Q_AGENT = openvswitch ]; then
|
|
|
|
configure_ovs_distributed_dhcp
|
|
|
|
fi
|
|
|
|
fi
|
2021-11-17 12:43:09 +03:00
|
|
|
if is_service_enabled neutron-local-ip; then
|
|
|
|
configure_local_ip
|
|
|
|
fi
|
|
|
|
if is_service_enabled neutron-local-ip-static; then
|
|
|
|
configure_local_ip_static
|
|
|
|
fi
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-agt neutron-agent; then
|
2015-09-10 16:54:31 +09:00
|
|
|
configure_l2_agent
|
|
|
|
fi
|
|
|
|
#Note: sriov agent should run with OVS or linux bridge agent
|
|
|
|
#because they are the mechanisms that bind the DHCP and router ports.
|
|
|
|
#Currently devstack lacks the option to run two agents on the same node.
|
2017-03-07 21:11:31 +00:00
|
|
|
#Therefore we create new service, q-sriov-agt, and the
|
|
|
|
# q-agt/neutron-agent should be OVS or linux bridge.
|
2017-05-02 13:49:34 +09:00
|
|
|
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
|
2015-09-10 16:54:31 +09:00
|
|
|
configure_l2_agent
|
|
|
|
configure_l2_agent_sriovnicswitch
|
|
|
|
fi
|
2018-02-23 14:00:08 +08:00
|
|
|
if is_service_enabled q-l3 neutron-l3; then
|
2018-11-10 00:48:52 +01:00
|
|
|
if is_service_enabled q-port-forwarding neutron-port-forwarding; then
|
|
|
|
configure_port_forwarding
|
|
|
|
fi
|
2019-06-13 22:06:26 +02:00
|
|
|
if is_service_enabled q-conntrack-helper neutron-conntrack-helper; then
|
|
|
|
configure_l3_conntrack_helper
|
|
|
|
fi
|
2021-12-27 16:28:53 +08:00
|
|
|
if is_service_enabled q-ndp-proxy neutron-ndp-proxy; then
|
|
|
|
configure_l3_ndp_proxy
|
|
|
|
fi
|
2018-02-23 14:00:08 +08:00
|
|
|
configure_l3_agent
|
|
|
|
fi
|
2017-02-23 22:32:32 -05:00
|
|
|
if [ $NEUTRON_CORE_PLUGIN = ml2 ]; then
|
|
|
|
configure_ml2_extension_drivers
|
|
|
|
fi
|
2019-11-28 14:35:41 +00:00
|
|
|
if is_ovn_enabled; then
|
2020-04-29 20:26:00 -04:00
|
|
|
if is_service_enabled q-port-forwarding neutron-port-forwarding; then
|
|
|
|
configure_port_forwarding
|
|
|
|
fi
|
2019-11-28 14:35:41 +00:00
|
|
|
fi
|
2020-07-02 15:41:39 -04:00
|
|
|
if is_service_enabled neutron-loki; then
|
|
|
|
configure_loki
|
|
|
|
fi
|
2015-09-10 16:54:31 +09:00
|
|
|
;;
|
|
|
|
extra)
|
2017-05-02 13:49:34 +09:00
|
|
|
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
|
2015-09-10 16:54:31 +09:00
|
|
|
start_l2_agent_sriov
|
|
|
|
fi
|
2020-07-13 11:44:47 +01:00
|
|
|
if is_service_enabled br-ex-tcpdump ; then
|
|
|
|
# tcpdump monitor on br-ex for ARP, reverse ARP and ICMP v4 / v6 packets
|
|
|
|
sudo ip link set dev $PUBLIC_BRIDGE up
|
|
|
|
run_process br-ex-tcpdump "/usr/sbin/tcpdump -i $PUBLIC_BRIDGE arp or rarp or icmp or icmp6 -enlX" "$STACK_GROUP" root
|
|
|
|
fi
|
|
|
|
|
|
|
|
if is_service_enabled br-int-flows ; then
|
|
|
|
run_process br-int-flows "/bin/sh -c \"set +e; while true; do echo ovs-ofctl dump-flows br-int; ovs-ofctl dump-flows br-int ; sleep 30; done; \"" "$STACK_GROUP" root
|
|
|
|
fi
|
2015-09-10 16:54:31 +09:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
elif [[ "$1" == "unstack" ]]; then
|
2017-05-02 13:49:34 +09:00
|
|
|
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
|
2015-08-25 15:50:09 +03:00
|
|
|
stop_l2_agent_sriov
|
|
|
|
fi
|
2017-07-09 15:48:24 +03:00
|
|
|
if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \
|
|
|
|
[[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then
|
|
|
|
stop_new_ovs
|
|
|
|
fi
|
2015-09-01 15:27:26 -07:00
|
|
|
fi
|