diff --git a/devstack/lib/l2_agent_sriovnicswitch b/devstack/lib/l2_agent_sriovnicswitch index f6cc63f91dc..41f6aeac171 100755 --- a/devstack/lib/l2_agent_sriovnicswitch +++ b/devstack/lib/l2_agent_sriovnicswitch @@ -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 } diff --git a/devstack/plugin.sh b/devstack/plugin.sh index fe175314863..cfa8097bdf7 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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