disable-mlockall setting not being respected

Bug #1925962 reported by Jeff Hillman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Neutron Open vSwitch Charm
Fix Released
High
Corey Bryant

Bug Description

using cs:~openstack-charmers-next/neutron-openvswitch-433

Setting disable-mlockall: true in the bundle for neutron-openvswitch-octavia is not being respected. Per the charm it looked like /etc/default/openvswitch-swtich is supposed to get the '--no-mlockall' configured for the OVS_CTL_OPTS setting.

Post deploy I have also tried resetting the config (per the charm it should detect it is in the octavia container), and still the status sits at '(config-changed) Configuring OVS'

Logs from the unit-neutron-openvswitch-octavia-0 attached to the bug. From the logs you can see that at 18:12:27 it hung at INFO juju-log Creating bridge br-int. 26 minutes later I manually edited /etc/default/openvswitch-switch and restarted ovs-vswitchd.service and immediately this caused the unit to move on. In fact it caused all of octavia to install. Prior to this change all octavia united looked liked this: https://pastebin.canonical.com/p/8x5W8G6x2V/

This issue was originally reported in bug https://bugs.launchpad.net/charm-ovn-chassis/+bug/1906280

Tags: cpe-onsite
Revision history for this message
Jeff Hillman (jhillman) wrote :
Revision history for this message
Jeff Hillman (jhillman) wrote :

This is running bionic-ussuri with OVS

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I'm not sure what the cause of this is, yet, but it is limited to the next charms.

Toggling the charm config option:
juju config neutron-openvswitch-octavia disable-mlockall=false
juju config neutron-openvswitch-octavia disable-mlockall=true

makes no changes to /etc/default/openvswitch-switch with the next charms.

With the stable charms, toggling disable-mlockall will result in either:

ubuntu@juju-e102e5-zaza-ecb4a5b22bc3-25:~$ cat /etc/default/openvswitch-switch
# This is a POSIX shell fragment -*- sh -*-
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
# Configuration managed by neutron-openvswitch charm
# Service restart triggered by remote application:
#
###############################################################################
OVS_CTL_OPTS='--no-mlockall'

or:

ubuntu@juju-e102e5-zaza-ecb4a5b22bc3-25:~$ cat /etc/default/openvswitch-switch
# This is a POSIX shell fragment -*- sh -*-
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
# Configuration managed by neutron-openvswitch charm
# Service restart triggered by remote application:
#
###############################################################################

Changed in charm-neutron-openvswitch:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This might have been introduced by commit ad7f870c which reverted part of the unit test:

diff --git a/unit_tests/test_neutron_ovs_utils.py b/unit_tests/test_neutron_ovs_utils.py
index 17c1ae6..d636b88 100644
--- a/unit_tests/test_neutron_ovs_utils.py
+++ b/unit_tests/test_neutron_ovs_utils.py
         confs = ['/etc/neutron/neutron.conf',
                  '/etc/neutron/plugins/ml2/ml2_conf.ini',
- '/etc/default/openvswitch-switch',
+ # '/etc/default/openvswitch-switch',
                  '/etc/init/os-charm-phy-nic-mtu.conf']

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I think this is the culprit, also part of that change. This prevents OVS_DEFAULT (/etc/default/openvswitch-switch) from getting rendered for non-DPDK:

diff --git a/hooks/neutron_ovs_utils.py b/hooks/neutron_ovs_utils.py
index c0a9208..ab37fe4 100644
--- a/hooks/neutron_ovs_utils.py
+++ b/hooks/neutron_ovs_utils.py
@@ -174,17 +179,6 @@ BASE_RESOURCE_MAP = OrderedDict([
         'services': ['neutron-openvswitch-agent'],
         'contexts': [neutron_ovs_context.OVSPluginContext()],
     }),
- (OVS_DEFAULT, {
- 'services': ['openvswitch-switch'],
- 'contexts': [neutron_ovs_context.OVSDPDKDeviceContext(),
- neutron_ovs_context.OVSPluginContext(),
- neutron_ovs_context.RemoteRestartContext(
- ['neutron-plugin', 'neutron-control'])],
- }),
- (DPDK_INTERFACES, {
- 'services': ['dpdk', 'openvswitch-switch'],
- 'contexts': [neutron_ovs_context.DPDKDeviceContext()],
- }),
     (PHY_NIC_MTU_CONF, {
         'services': ['os-charm-phy-nic-mtu'],
         'contexts': [context.PhyNICMTUContext()],
@@ -222,6 +216,18 @@ DVR_RESOURCE_MAP = OrderedDict([
         'contexts': [context.ExternalPortContext()],
     }),
 ])
+DPDK_RESOURCE_MAP = OrderedDict([
+ (OVS_DEFAULT, {
+ 'services': ['openvswitch-switch'],
+ 'contexts': [DPDKDeviceContext(),
+ neutron_ovs_context.RemoteRestartContext(
+ ['neutron-plugin', 'neutron-control'])],
+ }),
+ (DPDK_INTERFACES, {
+ 'services': ['dpdk', 'openvswitch-switch'],
+ 'contexts': [DPDKDeviceContext()],
+ }),
+])

Revision history for this message
Corey Bryant (corey.bryant) wrote :
Changed in charm-neutron-openvswitch:
status: Triaged → In Progress
assignee: nobody → Corey Bryant (corey.bryant)
Changed in charm-neutron-openvswitch:
milestone: none → 21.04
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-openvswitch (master)

Reviewed: https://review.opendev.org/c/openstack/charm-neutron-openvswitch/+/787820
Committed: https://opendev.org/openstack/charm-neutron-openvswitch/commit/96ba49807c38165bfc838aab569b5ec1804bd08b
Submitter: "Zuul (22348)"
Branch: master

commit 96ba49807c38165bfc838aab569b5ec1804bd08b
Author: Corey Bryant <email address hidden>
Date: Fri Apr 23 16:40:16 2021 -0400

    Fix regression of disable-mlockall

    This restores OVS_DEFAULT to the BASE_RESOURCE_MAP.

    There were some changes in commit ad7f870c that moved OVS_DEFAULT
    out of the BASE_RESOURCE_MAP, which resulted in no more rendering
    of /etc/default/openvswitch-switch for non-DPDK deployments.

    Closes-Bug: #1925962
    Change-Id: I8bc6e0c20e5702db5a44fda531b6a59ada5bee1e

Changed in charm-neutron-openvswitch:
status: In Progress → Fix Committed
Changed in charm-neutron-openvswitch:
status: Fix Committed → Fix Released
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.