Skip to content
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

Allow setting Linux kernel parameters (sysctl) via settings #1158

Merged
merged 3 commits into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GLOSSARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* [**bork**](sources/api/bork): A setting generator called by sundog to generate the random seed for updog, determining where the host falls in the update order.
* [**buildsys**](tools/buildsys): A build tool that runs package and image builds inside containers.
cargo-make starts the build of each package, each of which calls buildsys, which in turn starts a Docker-based build using the SDK image.
* [**corndog**](sources/api/corndog): A program that sets kernel sysctl values based on API settings.
tjkirch marked this conversation as resolved.
Show resolved Hide resolved
* [**early-boot-config**](sources/api/early-boot-config): A program run at boot to read platform-specific data, such as EC2 user data, and send requested configuration to the API.
* **gptprio:** A structure of bits in GPT partition headers that specifies priority, tries remaining, and whether the partition booted successfully before.
signpost sets these and GRUB uses them to determine which partition set to boot.
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,18 @@ These settings can be changed at any time.

* `settings.ntp.time-servers`: A list of NTP servers used to set and verify the system time.

#### Kernel settings

* `settings.kernel.sysctl`: Key/value pairs representing Linux kernel parameters.
Remember to quote keys (since they often contain ".") and to quote all values.
* Example user data for setting up sysctl:
```
[settings.kernel.sysctl]
"user.max_user_namespaces" = "16384"
"vm.max_map_count" = "262144"
```


#### Host containers settings
* `settings.host-containers.admin.source`: The URI of the [admin container](#admin-container).
* `settings.host-containers.admin.enabled`: Whether the admin container is enabled.
Expand Down
12 changes: 11 additions & 1 deletion packages/os/os.spec
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ Summary: Dynamic setting generator for updog
%description -n %{_cross_os}bork
%{summary}.

%package -n %{_cross_os}corndog
Summary: Bottlerocket sysctl helper
Requires: %{_cross_os}apiserver = %{version}-%{release}
%description -n %{_cross_os}corndog
%{summary}.

%package -n %{_cross_os}schnauzer
Summary: Setting generator for templated settings values.
%description -n %{_cross_os}schnauzer
Expand Down Expand Up @@ -185,6 +191,7 @@ mkdir bin
-p updog \
-p logdog \
-p growpart \
-p corndog \
%if "%{_cross_variant}" == "aws-ecs-1"
-p ecs-settings-applier \
%endif
Expand All @@ -203,7 +210,7 @@ done
install -d %{buildroot}%{_cross_bindir}
for p in \
apiserver \
early-boot-config netdog sundog schnauzer pluto bork \
early-boot-config netdog sundog schnauzer pluto bork corndog \
thar-be-settings thar-be-updates servicedog host-containers \
storewolf settings-committer \
migrator \
Expand Down Expand Up @@ -287,6 +294,9 @@ install -p -m 0644 %{S:202} %{buildroot}%{_cross_tmpfilesdir}/thar-be-updates.co
%files -n %{_cross_os}netdog
%{_cross_bindir}/netdog

%files -n %{_cross_os}corndog
%{_cross_bindir}/corndog

%files -n %{_cross_os}sundog
%{_cross_bindir}/sundog
%{_cross_unitdir}/sundog.service
Expand Down
1 change: 1 addition & 0 deletions packages/release/release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Requires: %{_cross_os}bork
Requires: %{_cross_os}early-boot-config
Requires: %{_cross_os}schnauzer
Requires: %{_cross_os}netdog
Requires: %{_cross_os}corndog
Requires: %{_cross_os}selinux-policy
Requires: %{_cross_os}policycoreutils
Requires: %{_cross_os}signpost
Expand Down
Loading