charm-neutron-gateway/unit_tests
Mauricio Faria de Oliveira 4bf26683d1 Add option to auto-load kernel modules for sysctl
The nf_conntrack module is not loaded early enough on boot,
thus when sysctl options are applied, its settings are not.

This results in the correct sysctl settings seen on deploy
time (because nf_conntrack was loaded previously by others)
but not after reboot, despite configured in /etc/sysctl.d/.

So, insert it in /etc/modules for module auto-load on boot
(available on Trusty via /etc/init/kmod.conf, then Xenial+
via systemd-sysctl.service).

Since users can configure the sysctl option and thus need
more modules, introduce the config option 'kernel-modules'
(with 'nf_conntrack' as default.)

It's handled before sysctl in the config-changed hook in
case some sysctl option(s) needs not yet loaded module(s).

In case of failure to load modules, log a warning message.

Closes-Bug: #1885192
Change-Id: I661a4fe2d9284455e536b073dc93696355baf122
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
2020-06-30 17:57:25 -03:00
..
__init__.py Modify paths to ensure that charms' charmhelpers is first 2019-07-30 15:17:58 +01:00
test_actions.py Remove load-time mocking from unit tests 2019-08-23 17:02:20 +01:00
test_actions_openstack_upgrade.py Remove load-time mocking from unit tests 2019-08-23 17:02:20 +01:00
test_neutron_contexts.py Make ovs_use_veth a config option 2020-01-29 18:24:45 -08:00
test_neutron_hooks.py Add option to auto-load kernel modules for sysctl 2020-06-30 17:57:25 -03:00
test_neutron_utils.py Deprecate nova-api-metadata nrpe check 2020-06-01 08:47:01 +02:00
test_utils.py Remove load-time mocking from unit tests 2019-08-23 17:02:20 +01:00