devstack: Add neutron-sriov-agent alias for lib/neutron

Change-Id: Id6f7cf1d859f4884aae5cbb950c91e136f5be669
This commit is contained in:
YAMAMOTO Takashi 2017-05-02 13:49:34 +09:00
parent 3c014b854a
commit 38feb491dd
2 changed files with 17 additions and 5 deletions

View File

@ -15,9 +15,21 @@ function configure_l2_agent_sriovnicswitch {
}
function start_l2_agent_sriov {
run_process q-sriov-agt "$SRIOV_AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$SRIOV_AGENT_CONF"
local SERVICE_NAME
if is_neutron_legacy_enabled; then
SERVICE_NAME=q-sriov-agt
else
SERVICE_NAME=neutron-sriov-agent
fi
run_process $SERVICE_NAME "$SRIOV_AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$SRIOV_AGENT_CONF"
}
function stop_l2_agent_sriov {
stop_process q-sriov-agt
local SERVICE_NAME
if is_neutron_legacy_enabled; then
SERVICE_NAME=q-sriov-agt
else
SERVICE_NAME=neutron-sriov-agent
fi
stop_process $SERVICE_NAME
}

View File

@ -49,20 +49,20 @@ if [[ "$1" == "stack" ]]; then
#Currently devstack lacks the option to run two agents on the same node.
#Therefore we create new service, q-sriov-agt, and the
# q-agt/neutron-agent should be OVS or linux bridge.
if is_service_enabled q-sriov-agt; then
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
configure_$NEUTRON_CORE_PLUGIN
configure_l2_agent
configure_l2_agent_sriovnicswitch
fi
;;
extra)
if is_service_enabled q-sriov-agt; then
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
start_l2_agent_sriov
fi
;;
esac
elif [[ "$1" == "unstack" ]]; then
if is_service_enabled q-sriov-agt; then
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
stop_l2_agent_sriov
fi
fi