devstack/lib/quantum_plugins/services/agent_loadbalancer
Maru Newby d7150e9bbc Add configurable use of veths with Quantum+OVS.
* This patch adds the ability to configure use of veths with
   OVS via the Q_OVS_USE_VETH variable.  The use of veths with OVS
   is required to support namespaces on RHEL.
 * Supports bug 1171727

Change-Id: I5f557d659684ead99a3e5e2b4df787699d9d3f05
2013-04-30 05:57:25 +00:00

51 lines
1.6 KiB
Plaintext

# Quantum loadbalancer plugin
# ---------------------------
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
set +o xtrace
AGENT_LBAAS_BINARY="$QUANTUM_DIR/bin/quantum-lbaas-agent"
AGENT_LBAAS_PLUGIN=quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin
function quantum_agent_lbaas_install_agent_packages() {
if is_ubuntu || is_fedora; then
install_package haproxy
elif is_suse; then
### FIXME: Find out if package can be pushed to Factory
echo "HAProxy packages can be installed from server:http project in OBS"
fi
}
function quantum_agent_lbaas_configure_common() {
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
Q_SERVICE_PLUGIN_CLASSES=$AGENT_LBAAS_PLUGIN
else
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$AGENT_LBAAS_PLUGIN"
fi
}
function quantum_agent_lbaas_configure_agent() {
LBAAS_AGENT_CONF_PATH=/etc/quantum/plugins/services/agent_loadbalancer
mkdir -p $LBAAS_AGENT_CONF_PATH
LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini"
cp $QUANTUM_DIR/etc/lbaas_agent.ini $LBAAS_AGENT_CONF_FILENAME
iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT use_namespaces $Q_USE_NAMESPACE
# ovs_use_veth needs to be set before the plugin configuration
# occurs to allow plugins to override the setting.
iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT ovs_use_veth $Q_OVS_USE_VETH
quantum_plugin_setup_interface_driver $LBAAS_AGENT_CONF_FILENAME
if is_fedora; then
iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody"
fi
}
# Restore xtrace
$MY_XTRACE