Install networking-ofagent from StackForge, using DevStack's
external plugins mechanism.
The following line needs to be added to the existing local.conf settings:
enable_plugin networking-ofagent https://git.openstack.org/stackforge/networking-ofagent
Remove neutron_thirdparty/ryu, as Ryu is installed via
networking-ofagent's requirements.
Change-Id: I12287a47eac4689414f70b517ee37fb98b260e60
Partially-implements: blueprint core-vendor-decomposition
Partial-Bug: #1412653
| ... | ... |
@@ -1,100 +1,4 @@ |
| 1 | 1 |
#!/bin/bash |
| 2 |
-# |
|
| 3 |
-# OpenFlow Agent plugin |
|
| 4 |
-# ---------------------- |
|
| 5 | 2 |
|
| 6 |
-# Save trace setting |
|
| 7 |
-OFA_XTRACE=$(set +o | grep xtrace) |
|
| 8 |
-set +o xtrace |
|
| 9 |
- |
|
| 10 |
-source $TOP_DIR/lib/neutron_plugins/ovs_base |
|
| 11 |
-source $TOP_DIR/lib/neutron_thirdparty/ryu # for RYU_DIR, install_ryu, etc |
|
| 12 |
- |
|
| 13 |
-function neutron_plugin_create_nova_conf {
|
|
| 14 |
- _neutron_ovs_base_configure_nova_vif_driver |
|
| 15 |
-} |
|
| 16 |
- |
|
| 17 |
-function neutron_plugin_install_agent_packages {
|
|
| 18 |
- _neutron_ovs_base_install_agent_packages |
|
| 19 |
- |
|
| 20 |
- # This agent uses ryu to talk with switches |
|
| 21 |
- install_package $(get_packages "ryu") |
|
| 22 |
- install_ryu |
|
| 23 |
-} |
|
| 24 |
- |
|
| 25 |
-function neutron_plugin_configure_debug_command {
|
|
| 26 |
- _neutron_ovs_base_configure_debug_command |
|
| 27 |
-} |
|
| 28 |
- |
|
| 29 |
-function neutron_plugin_configure_dhcp_agent {
|
|
| 30 |
- iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport |
|
| 31 |
-} |
|
| 32 |
- |
|
| 33 |
-function neutron_plugin_configure_l3_agent {
|
|
| 34 |
- _neutron_ovs_base_configure_l3_agent |
|
| 35 |
- iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport |
|
| 36 |
-} |
|
| 37 |
- |
|
| 38 |
-function _neutron_ofagent_configure_firewall_driver {
|
|
| 39 |
- if [[ "$Q_USE_SECGROUP" == "True" ]]; then |
|
| 40 |
- iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver |
|
| 41 |
- else |
|
| 42 |
- iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver |
|
| 43 |
- fi |
|
| 44 |
-} |
|
| 45 |
- |
|
| 46 |
-function neutron_plugin_configure_plugin_agent {
|
|
| 47 |
- # Set up integration bridge |
|
| 48 |
- _neutron_ovs_base_setup_bridge $OVS_BRIDGE |
|
| 49 |
- _neutron_ofagent_configure_firewall_driver |
|
| 50 |
- |
|
| 51 |
- # Check a supported openflow version |
|
| 52 |
- OF_VERSION=`ovs-ofctl --version | grep "OpenFlow versions" | awk '{print $3}' | cut -d':' -f2`
|
|
| 53 |
- if [ `vercmp_numbers "$OF_VERSION" "0x3"` -lt "0" ]; then |
|
| 54 |
- die $LINENO "This agent requires OpenFlow 1.3+ capable switch." |
|
| 55 |
- fi |
|
| 56 |
- |
|
| 57 |
- # Enable tunnel networks if selected |
|
| 58 |
- if [[ "$OVS_ENABLE_TUNNELING" == "True" ]]; then |
|
| 59 |
- # Verify tunnels are supported |
|
| 60 |
- # REVISIT - also check kernel module support for GRE and patch ports |
|
| 61 |
- OVS_VERSION=`ovs-vsctl --version | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"` |
|
| 62 |
- if [ `vercmp_numbers "$OVS_VERSION" "1.4"` -lt "0" ]; then |
|
| 63 |
- die $LINENO "You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts." |
|
| 64 |
- fi |
|
| 65 |
- iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $TUNNEL_ENDPOINT_IP |
|
| 66 |
- fi |
|
| 67 |
- |
|
| 68 |
- # Setup physical network bridge mappings. Override |
|
| 69 |
- # ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more |
|
| 70 |
- # complex physical network configurations. |
|
| 71 |
- if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then |
|
| 72 |
- OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE |
|
| 73 |
- |
|
| 74 |
- # Configure bridge manually with physical interface as port for multi-node |
|
| 75 |
- sudo ovs-vsctl --no-wait -- --may-exist add-br $OVS_PHYSICAL_BRIDGE |
|
| 76 |
- fi |
|
| 77 |
- if [[ "$OVS_BRIDGE_MAPPINGS" != "" ]]; then |
|
| 78 |
- iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings $OVS_BRIDGE_MAPPINGS |
|
| 79 |
- fi |
|
| 80 |
- if [[ "$OFAGENT_PHYSICAL_INTERFACE_MAPPINGS" != "" ]]; then |
|
| 81 |
- iniset /$Q_PLUGIN_CONF_FILE agent physical_interface_mappings \ |
|
| 82 |
- $OFAGENT_PHYSICAL_INTERFACE_MAPPINGS |
|
| 83 |
- fi |
|
| 84 |
- AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-ofagent-agent" |
|
| 85 |
- |
|
| 86 |
- iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES |
|
| 87 |
-} |
|
| 88 |
- |
|
| 89 |
-function neutron_plugin_setup_interface_driver {
|
|
| 90 |
- local conf_file=$1 |
|
| 91 |
- iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver |
|
| 92 |
- iniset $conf_file DEFAULT ovs_use_veth True |
|
| 93 |
-} |
|
| 94 |
- |
|
| 95 |
-function neutron_plugin_check_adv_test_requirements {
|
|
| 96 |
- is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 |
|
| 97 |
-} |
|
| 98 |
- |
|
| 99 |
-# Restore xtrace |
|
| 100 |
-$OFA_XTRACE |
|
| 3 |
+# REVISIT(yamamoto): This file is intentionally left empty |
|
| 4 |
+# in order to keep Q_AGENT=ofagent_agent work. |
| 101 | 5 |
deleted file mode 100644 |
| ... | ... |
@@ -1,28 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
-# |
|
| 3 |
-# Ryu SDN Framework |
|
| 4 |
-# ----------------- |
|
| 5 |
- |
|
| 6 |
-# Used by ofagent. |
|
| 7 |
-# TODO(yamamoto): Switch to pip_install once the development was settled |
|
| 8 |
- |
|
| 9 |
-# Save trace setting |
|
| 10 |
-RYU3_XTRACE=$(set +o | grep xtrace) |
|
| 11 |
-set +o xtrace |
|
| 12 |
- |
|
| 13 |
-RYU_DIR=$DEST/ryu |
|
| 14 |
- |
|
| 15 |
-# Make this function idempotent and avoid cloning same repo many times |
|
| 16 |
-# with RECLONE=yes |
|
| 17 |
-_RYU_INSTALLED=${_RYU_INSTALLED:-False}
|
|
| 18 |
-function install_ryu {
|
|
| 19 |
- if [[ "$_RYU_INSTALLED" == "False" ]]; then |
|
| 20 |
- git_clone $RYU_REPO $RYU_DIR $RYU_BRANCH |
|
| 21 |
- export PYTHONPATH=$RYU_DIR:$PYTHONPATH |
|
| 22 |
- pip_install $(cat $RYU_DIR/tools/pip-requires) |
|
| 23 |
- _RYU_INSTALLED=True |
|
| 24 |
- fi |
|
| 25 |
-} |
|
| 26 |
- |
|
| 27 |
-# Restore xtrace |
|
| 28 |
-$RYU3_XTRACE |