Skip to content

Commit

Permalink
Merge pull request bottlerocket-os#3935 from bcressey/cgroup-no-bootc…
Browse files Browse the repository at this point in the history
…onfig

switch to systemd defaults and kernel parameters for systemd's cgroup hierarchy
  • Loading branch information
bcressey authored May 3, 2024
2 parents f272abe + d9b580a commit 0a9ee4e
Show file tree
Hide file tree
Showing 34 changed files with 9 additions and 57 deletions.
1 change: 0 additions & 1 deletion packages/systemd/bootconfig-unified-cgroup-hierarchy.conf

This file was deleted.

33 changes: 1 addition & 32 deletions packages/systemd/systemd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Source3: journald.conf
Source4: issue
Source5: systemd-journald.conf
Source6: systemd-sysusers.conf
Source7: bootconfig-unified-cgroup-hierarchy.conf

# Backport of upstream patches that make the netlink default timeout
# configurable. Bottlerocket carries this patch and configures the timeout in
Expand Down Expand Up @@ -103,10 +102,6 @@ Requires: %{_cross_os}libselinux
Requires: %{_cross_os}libuuid
Requires: %{_cross_os}libxcrypt

# Only require a cgroup hierarchy package when building an image, not
# for packages that need systemd-devel as a build dependency.
Requires: (%{name}(cgroup-hierarchy) if %{_cross_os}metadata)

%description
%{summary}.

Expand Down Expand Up @@ -135,24 +130,6 @@ Summary: Files for resolved
%description resolved
%{summary}.

%package hybrid-cgroup-hierarchy
Summary: No-op dependency for hybrid cgroup hierarchy
Provides: %{name}(cgroup-hierarchy)
Requires: (%{_cross_os}image-feature(no-unified-cgroup-hierarchy) and %{name})
Conflicts: (%{_cross_os}image-feature(unified-cgroup-hierarchy) or %{name}-unified-cgroup-hierarchy)

%description hybrid-cgroup-hierarchy
%{summary}.

%package unified-cgroup-hierarchy
Summary: Bootconfig snippet for unified cgroup hierarchy
Provides: %{name}(cgroup-hierarchy)
Requires: (%{_cross_os}image-feature(unified-cgroup-hierarchy) and %{name})
Conflicts: (%{_cross_os}image-feature(no-unified-cgroup-hierarchy) or %{name}-hybrid-cgroup-hierarchy)

%description unified-cgroup-hierarchy
%{summary}.

%prep
%autosetup -n systemd-stable-%{version} -p1

Expand Down Expand Up @@ -227,7 +204,7 @@ CONFIGURE_OPTS=(
-Dpkgconfigdatadir='%{_cross_pkgconfigdir}'
-Dpkgconfiglibdir='%{_cross_pkgconfigdir}'

-Ddefault-hierarchy=hybrid
-Ddefault-hierarchy=unified

-Dadm-group=false
-Dwheel-group=false
Expand Down Expand Up @@ -340,9 +317,6 @@ rm -f %{buildroot}%{_cross_libdir}/systemd/{system,user}/graphical.target
install -d %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}
install -p -m 0644 %{S:4} %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}/issue

install -d %{buildroot}%{_cross_bootconfigdir}
install -p -m 0644 %{S:7} %{buildroot}%{_cross_bootconfigdir}/10-unified-cgroup-hierarchy.conf

%files
%license LICENSE.GPL2 LICENSE.LGPL2.1
%{_cross_attribution_file}
Expand Down Expand Up @@ -531,9 +505,4 @@ install -p -m 0644 %{S:7} %{buildroot}%{_cross_bootconfigdir}/10-unified-cgroup-
%exclude %{_cross_bindir}/systemd-resolve
%exclude %{_cross_sbindir}/resolvconf

%files hybrid-cgroup-hierarchy

%files unified-cgroup-hierarchy
%{_cross_bootconfigdir}/10-unified-cgroup-hierarchy.conf

%changelog
1 change: 0 additions & 1 deletion variants/aws-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ exclude = ["README.md"]

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
xfs-data-partition = true
uefi-secure-boot = true
systemd-networkd = true
Expand Down
1 change: 1 addition & 0 deletions variants/aws-ecs-1-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]
included-packages = [
Expand Down
1 change: 1 addition & 0 deletions variants/aws-ecs-1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]
included-packages = [
Expand Down
1 change: 0 additions & 1 deletion variants/aws-ecs-2-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ build = "../build.rs"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/aws-ecs-2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ exclude = ["README.md"]

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 1 addition & 0 deletions variants/aws-k8s-1.23-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]

Expand Down
1 change: 1 addition & 0 deletions variants/aws-k8s-1.23/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]

Expand Down
1 change: 1 addition & 0 deletions variants/aws-k8s-1.24-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]

Expand Down
1 change: 1 addition & 0 deletions variants/aws-k8s-1.24/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]

Expand Down
1 change: 1 addition & 0 deletions variants/aws-k8s-1.25-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]

Expand Down
1 change: 1 addition & 0 deletions variants/aws-k8s-1.25/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ kernel-parameters = [
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"systemd.unified_cgroup_hierarchy=0",
"quiet",
]

Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.26-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ os-image-size-gib = 4

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
included-packages = [
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.26/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude = ["README.md"]

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
included-packages = [
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.27-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ os-image-size-gib = 4

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
included-packages = [
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.27/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude = ["README.md"]

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
included-packages = [
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.28-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ os-image-size-gib = 4

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.28/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude = ["README.md"]

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.29-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ os-image-size-gib = 4

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.29/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude = ["README.md"]

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.30-nvidia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ os-image-size-gib = 4

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/aws-k8s-1.30/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude = ["README.md"]

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/metal-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
xfs-data-partition = true
uefi-secure-boot = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/metal-k8s-1.26/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
image-format = "raw"
Expand Down
1 change: 0 additions & 1 deletion variants/metal-k8s-1.27/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
image-format = "raw"
Expand Down
1 change: 0 additions & 1 deletion variants/metal-k8s-1.28/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/metal-k8s-1.29/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/vmware-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
xfs-data-partition = true
uefi-secure-boot = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/vmware-k8s-1.26/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
image-format = "vmdk"
Expand Down
1 change: 0 additions & 1 deletion variants/vmware-k8s-1.27/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true

[package.metadata.build-variant]
image-format = "vmdk"
Expand Down
1 change: 0 additions & 1 deletion variants/vmware-k8s-1.28/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/vmware-k8s-1.29/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down
1 change: 0 additions & 1 deletion variants/vmware-k8s-1.30/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ partition-plan = "unified"

[package.metadata.build-variant.image-features]
grub-set-private-var = true
unified-cgroup-hierarchy = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
Expand Down

0 comments on commit 0a9ee4e

Please sign in to comment.