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

New Install fails due to missing cgroup (v2) #219

Closed
DonBower opened this issue Apr 11, 2023 · 5 comments
Closed

New Install fails due to missing cgroup (v2) #219

DonBower opened this issue Apr 11, 2023 · 5 comments

Comments

@DonBower
Copy link

I have 4 brand new Raspberry Pi CM4s, running 64 bit Raspberry Pi OS Lite (no GUI), on the nodes, and with GUI on the master.
all 4 failed to start the service:
level=fatal msg="failed to find memory cgroup (v2)"

Your documentation should provide this as a pre-req, or add this code to your prereq/tasks/main.yml file:

- name: Enable container features
  replace:
    path: /boot/cmdline.txt
    regexp: '^([\w](?!.*\b{{ item }}\b).*)$'
    replace: '\1 {{ item }}'
  with_items:
  - "cgroup_enable=cpuset"
  - "cgroup_memory=1"
  - "cgroup_enable=memory"

- name: Reboot the Machine to have container features in affect
  ansible.builtin.reboot:
    reboot_timeout: 300
@DonBower DonBower changed the title New Install fails due to missing cgroup New Install fails due to missing cgroup (v2) Apr 11, 2023
@cwayne18
Copy link
Member

It's called out here: https://docs.k3s.io/advanced#raspberry-pi

@DonBower
Copy link
Author

DonBower commented Apr 11, 2023

Modified: roles/raspberrypi/tasks/main.yml
Add after Set detected_distribution to Raspbian (ARM64 on Debian Buster) task:

- name: Set detected_distribution to Raspbian (ARM64 on Debian Bullseye)
  set_fact:
    detected_distribution: Raspbian
  when:
    - ansible_facts.architecture is search("aarch64")
    - raspberry_pi|default(false)
    - ansible_facts.lsb.description|default("") is match("Debian.*bullseye")

I would do a PR, but I don't have privileges...

@JoeNyland
Copy link

I've just hit this, too. It's fixed in #185 but it's been waiting to be merged for over a year 😞 It seems this project is dead.

@daugherr
Copy link

I experienced this issue yesterday installing on my Turing Pi V2 cluster. I noted that it's in the configuration but it didn't work. I manually added the configuration as the fastest way to resolve the issue.

One other thing... the last instruction in README.md didn't make sense to me. kube.cfg was copied by Ansible to the master node. What didn't make sense to me was the difference between source and target. As written, wouldn't that copy in the same folder? I didn't do that step. Haven't deployed any containers yet but kubectl get nodes sees all my nodes just fine.

@dereknola
Copy link
Member

Resolved with #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants