changing enable-sriov=false does not stop or disable sriov

Bug #1859473 reported by Arif Ali
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Neutron Open vSwitch Charm
Triaged
Medium
Unassigned

Bug Description

By default sriov is not enabled in this charm, but can easily enabled by running the following command

    juju config neutron-openvswitch enable-sriov=true

This will install, and enable sriov as per all the templates, and works as expected. However, when we then use the same command to disable sriov, it doesn't seem to change any configuration. So the command for reference is

    juju config neutron-openvswitch enable-sriov=false

Before enabling sriov, there are no files in /etc/ that have sriov in the file, or any files that have sriov in the filename.

After installation and configuration change

The files below have the sriov inside their files

root@juju-5266de-bug-test-1:/etc# egrep -r -i sriov *
default/neutron-openvswitch-networking-sriov:# auto - Set sriov_numvfs to value of sriov_totalvfs for each interface
default/neutron-openvswitch-networking-sriov:# N - Set sriov_numvfs on all interfaces to N or value of sriov_totalvfs
default/neutron-openvswitch-networking-sriov:# if sriov_totalvfs is less than N for that interface
init/neutron-openvswitch-networking-sriov.conf:description "Configure SRIOV Virtual Functions"
init/neutron-openvswitch-networking-sriov.conf: [ -x "/usr/local/bin/neutron-openvswitch-networking-sriov.sh" ] || exit 0
init/neutron-openvswitch-networking-sriov.conf: exec /usr/local/bin/neutron-openvswitch-networking-sriov.sh start
init.d/neutron-sriov-agent:# Provides: neutron-sriov-agent
init.d/neutron-sriov-agent:# Short-Description: Neutron SRIOV Agent
init.d/neutron-sriov-agent:# Description: SRIOV agent for OpenStack Neutron
init.d/neutron-sriov-agent:DESC="OpenStack Neutron SRIOV Plugin Agent"
init.d/neutron-sriov-agent:NAME=${PROJECT_NAME}-sriov-agent
init.d/neutron-sriov-agent:DAEMON=/usr/bin/neutron-sriov-nic-agent
init.d/neutron-sriov-agent:DAEMON_ARGS="--config-file=/etc/neutron/plugins/ml2/sriov_agent.ini"
neutron/plugins/ml2/sriov_agent.ini:[sriov_nic]

and the following files have sriov in their name

root@juju-5266de-bug-test-1:/etc# find | grep -i sriov
./systemd/system/network-online.target.wants/neutron-openvswitch-networking-sriov.service
./systemd/system/multi-user.target.wants/neutron-openvswitch-networking-sriov.service
./systemd/system/multi-user.target.wants/neutron-sriov-agent.service
./rc4.d/S01neutron-sriov-agent
./rc2.d/S01neutron-sriov-agent
./init/neutron-openvswitch-networking-sriov.conf
./rc6.d/K01neutron-sriov-agent
./rc3.d/S01neutron-sriov-agent
./rc1.d/K01neutron-sriov-agent
./default/neutron-openvswitch-networking-sriov
./rc0.d/K01neutron-sriov-agent
./rc5.d/S01neutron-sriov-agent
./neutron/plugins/ml2/sriov_agent.ini
./init.d/neutron-sriov-agent

In order to enable SRIOV /ect/default/neutron-openvswitch-networking-sriov needs to be changed, such that the following change would need to be made

--- /etc/default/neutron-openvswitch-networking-sriov 2020-01-13 11:44:32.769600981 +0000
+++ /etc/default/neutron-openvswitch-networking-sriov.new 2020-01-13 12:34:45.733054783 +0000
@@ -1,5 +1,5 @@
 # Set to 1 to configure Virtual Functions on system startup.
-ENABLE=1
+ENABLE=0
 # Blanket configuration for number of Virtual Functions across all NICs
 #
 # Possible configurations:

Then the service neutron-sriov-agent needs to be disabled and stopped if it's running

For example, if it's been enabled, and then you disable and re-enable, the service for enabling the Neutron SRIOV plugin agent is restarted. There is no indication of the service being stopped when sriov is disabled

Steps to rectify

1. Expect the updated config above config
2. Stop and disable neutron-openvswitch-networking-sriov service
3. Stop and disable neutron-sriov-agent service
4. `/usr/local/bin/neutron-openvswitch-networking-sriov.sh --stop` may need to be run

Revision history for this message
Arif Ali (arif-ali) wrote :
Revision history for this message
Arif Ali (arif-ali) wrote :

Currently the functional tests don't cover the fact that, when the enable-sriov is disabled then the relevant services and the config is changed.

Once this particular is fixed, we ought to update the sriov functional test to test for this

Andrew McLeod (admcleod)
Changed in charm-neutron-openvswitch:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.