kernel: allow to override modules & sysctl settings

Allow to easily personalize Kernel modules and sysctl settings with two new parameters.
ExtraKernelModules and ExtraSysctlSettings are dictionaries that will take precedence
over the defaults settings provided in the composable service.

Closes-Bug: #1742440
Change-Id: I9cd43331e5e9a6074cd47040c29815ca32c61693
This commit is contained in:
Emilien Macchi 2018-01-10 05:35:34 -08:00
parent 88759da151
commit ec1be1f4cd
2 changed files with 81 additions and 63 deletions

View File

@ -64,6 +64,14 @@ parameters:
default: 1024
description: Configures sysctl fs.inotify.max_user_instances key
type: number
ExtraKernelModules:
default: {}
description: Hash of extra Kernel modules to load.
type: json
ExtraSysctlSettings:
default: {}
description: Hash of extra sysctl settings to apply.
type: json
outputs:
@ -73,10 +81,13 @@ outputs:
service_name: kernel
config_settings:
kernel_modules:
nf_conntrack: {}
map_merge:
- nf_conntrack: {}
nf_conntrack_proto_sctp: {}
- {get_param: ExtraKernelModules}
sysctl_settings:
net.ipv4.tcp_keepalive_intvl:
map_merge:
- net.ipv4.tcp_keepalive_intvl:
value: 1
net.ipv4.tcp_keepalive_probes:
value: 5
@ -137,6 +148,7 @@ outputs:
# set inotify value for neutron/dnsmasq scale
fs.inotify.max_user_instances:
value: {get_param: InotifyIntancesMax}
- {get_param: ExtraSysctlSettings}
step_config: |
include ::tripleo::profile::base::kernel

View File

@ -0,0 +1,6 @@
---
features:
- |
Allow to easily personalize Kernel modules and sysctl settings with two new parameters.
ExtraKernelModules and ExtraSysctlSettings are dictionaries that will take precedence
over the defaults settings provided in the composable service.