-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CPDEV-100486] Support kernel parameters/modules per group/node #639
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ilia1243
force-pushed
the
feature/sysctl_per_node
branch
13 times, most recently
from
April 19, 2024 09:56
dadf6c3
to
6cece6b
Compare
ilia1243
force-pushed
the
feature/sysctl_per_node
branch
2 times, most recently
from
April 19, 2024 16:03
c819bdc
to
cfeb70c
Compare
ilia1243
changed the title
[CPDEV-100486] Support kernel parameters per group/node
[CPDEV-100486] Support kernel parameters/modules per group/node
Apr 19, 2024
@shmo1218 please review JSON schemas in |
ilia1243
commented
Apr 19, 2024
theboringstuff
approved these changes
Apr 23, 2024
Imadzuma
approved these changes
Apr 24, 2024
vlar0816
approved these changes
Apr 26, 2024
ilia1243
force-pushed
the
feature/sysctl_per_node
branch
from
April 26, 2024 08:39
cfeb70c
to
7d9e399
Compare
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Solution
services.modprobe
is extended to support dictionary with propertiesmodulename
,nodes
,groups
,install
.services.sysctl
is extended to support dictionary with propertiesvalue
,nodes
,groups
,install
.to keep them on all nodes, and preserve potential references to them in jinja templates.
patches
section of the inventory that allows to specify different values of kernel parameters for different nodes.sysctl --system
.This allows to perform early validation of parameters.
modprobe.is_modprobe_valid()
that the required modules are present.How to apply
Run
kubemarine migrate_kubemarine --force-apply preserve_compatibility_kernel
Test Cases
TestCase 1
Installation with default kernel parameters/modules per group/node.
Steps:
ER: The parameters / modules are installed only on necessary nodes/groups.
TestCase 2
Migrate inventory.
Steps:
kubemarine migrate_kubemarine --force-apply preserve_compatibility_kernel
using new Kubemarine version.ER: previous default kernel parameters/modules are set in the inventory.
services.sysctl
.install --tasks prepare.system.sysctl
using new Kubemarine version.ER: The parameters / modules are installed on all nodes.
TestCase 3
Installation with kernel parameters/modules per group/node.
Steps:
services.sysctl
/services.modprobe
and specify subset of nodes/groups to install the parameters/modules on.ER: The parameters / modules are installed only on specified nodes/groups.
check_paas --tasks services.system.modprobe,services.system.sysctl
ER: Check is successful.
TestCase 4
Install kernel parameters with different values per group/node using
patches
.Steps:
patches
and specify different kernel parameter values to install on different nodes/groups.ER: Different parameters values are installed as per the configuration.
check_paas --tasks services.system.sysctl
ER: Check is successful.
TestCase 5
PaaS check with changed parameters/modules per group/node.
Steps:
services.sysctl
/services.modprobe
and specify subset of nodes/groups to install the parameters/modules on.check_paas --tasks services.system.modprobe,services.system.sysctl
ER: The checks fail with some nodes having not installed parameters/modules.
TestCase 6
PaaS check with changed kernel parameter values.
patches
with different kernel parameters values.check_paas --tasks services.system.sysctl
ER: The checks fail with some nodes not having the expected parameter values.
TestCase 7
Early sysctl validation without reboot.
/etc/sysctl.d/99-*.conf
.install --exclude-cumulative-points-methods kubemarine.system.reboot_nodes
Results:
check_paas --tasks services.system.sysctl
AR=ER: the check fails.
TestCase 8
Robust PaaS check that kernel modules are valid.
Steps:
check_paas --tasks services.system.modprobe
Results:
Checklist
Unit tests
test_defaults.py - cover new cases with enrichment of integer/boolean values.
test_sysctl.py, test_modprobe.py - new tests to cover enrichment of sysctl and modprobe.