Skip to content

Commit

Permalink
🐛 Make sure bpf is mounted (kairos-io#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler authored Oct 26, 2022
1 parent 6ad8920 commit 7095146
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions overlay/files/system/oem/03_branding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ stages:
net.core.rmem_max: 2500000
vm.max_map_count: 262144
initramfs:
- name: "Default mounts"
if: '[ ! -e "/sbin/systemctl" ] && [ ! -e "/usr/bin/systemctl" ] && [ ! -e "/usr/sbin/systemctl" ] && [ ! -e "/usr/bin/systemctl" ]'
commands:
- mount bpffs -o rw,nosuid,nodev,noexec,relatime,mode=700 /sys/fs/bpf -t bpf
- name: "Default systemd config"
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]'
systemctl:
Expand Down
6 changes: 6 additions & 0 deletions tests/autoinstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ var _ = Describe("kairos autoinstall test", Label("autoinstall-test"), func() {
Expect(out).To(ContainSubstring("foo"))
})

It("has bpf mount", func() {
out, err := Sudo("mount")
Expect(err).ToNot(HaveOccurred())
Expect(out).To(ContainSubstring("bpf"))
})

It("has corresponding state", func() {
out, err := Sudo("kairos-agent state")
Expect(err).ToNot(HaveOccurred())
Expand Down

0 comments on commit 7095146

Please sign in to comment.