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

Issue on Rasbian x64 #179

Closed
jfbourner opened this issue Mar 10, 2022 · 12 comments
Closed

Issue on Rasbian x64 #179

jfbourner opened this issue Mar 10, 2022 · 12 comments

Comments

@jfbourner
Copy link

When installing on the x64 Rasbian lite I got the below errors

FAILED! => {"changed": false, "msg": "Unable to start service k3s-node: Job for k3s-node.service failed because the control process exited with error code.\nSee "systemctl status k3s-node.service" and "journalctl -xe" for details.\n"}

Mar 10 12:47:57 master-node k3s[11411]: time="2022-03-10T12:47:57Z" level=info msg="Run: k3s kubectl"
Mar 10 12:47:57 master-node k3s[11411]: time="2022-03-10T12:47:57Z" level=fatal msg="failed to find memory cgroup (v2)"
Mar 10 12:47:57 master-node systemd[1]: k3s.service: Main process exited, code=exited, status=1/FAILURE

I used this to resolve the issue. (Caveat that I have no idea what it does, but it resolved the issue for me)
k3s-io/k3s#1825 (comment)

@IanTeda
Copy link

IanTeda commented Mar 12, 2022

Experiencing the same error, suspect the playbook is not setting cgroup_memory=1 cgroup_enable=memory for Rasbian x64.

TASK [raspberrypi : Set detected_distribution to Raspbian (ARM64 on Debian Buster)] **************************************************
Saturday 12 March 2022  11:01:00 +1100 (0:00:00.051)       0:00:55.282 ******** 
skipping: [node-1]
skipping: [node-2]

Manually adding cgroup_memory=1 cgroup_enable=memory to /boot/cmdline.txt and re-running playbook worked.

@gaatnietdoor
Copy link

I have the same issue even after adding the cgroup_memory=1 cgroup_enable=memory to /boot/cmdline.txt.

@JohanNicander
Copy link

I have the same issue even after adding the cgroup_memory=1 cgroup_enable=memory to /boot/cmdline.txt.

For me enabling cgroups and then rebooting did the trick.

@jpconstantineau
Copy link

Although the playbook does have the code to be able to set cgroup support (see here), it doesn't get triggered.

I suspect the way the playbook detects Rasbian doesn't correctly pick up the latest 64 bit release and as such, does not run the necessary tasks.

@dpedersen13
Copy link

enabling cgroups and then rebooting did the trick for me as well

@tstackhouse
Copy link

Looking into this, it's not properly detecting the newest "raspberry pi os" since they renamed raspbian...

https://github.com/k3s-io/k3s-ansible/blob/master/roles/raspberrypi/tasks/main.yml#L20-L34

It seems like they report regular 'ol Debian:

fox@node1:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

@JohanNicander
Copy link

I just want to add that a fix for this is in the works here: PR #185

@francRang
Copy link

having the same issue :(

@nouknouk
Copy link

nouknouk commented Jul 23, 2022

FYI,

1) Same issue here, with RPI4 and raspbian lite ARM64.

  • ansible_facts.lsb.id="Debian"
  • ansible_facts.lsb.description="Debian GNU/Linux 11 (bullseye)"

shouldn't we add Debian as an eligible lsb.id ?

- name: Set detected_distribution to Raspbian
  set_fact:
    detected_distribution: Raspbian
  when: >
    raspberry_pi|default(false) and
    ( ansible_facts.lsb.id|default("") == "Raspbian" or
      ansible_facts.lsb.id|default("") == "Debian" or
      ansible_facts.lsb.description|default("") is match("[Rr]aspbian.*") )

2) Also, I get an issue with iptables-legacy

TASK [raspberrypi : Flush iptables before changing to iptables-legacy] *********************************************************************************
fatal: [rpi4.lan]: FAILED! => {"changed": false, "msg": "Failed to find required executable \"iptables\" in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}

EDIT: forcing installation of iptables seems to do the trick, in Raspbian.yml

- name: Ensure package iptables is installed
  apt:
    pkg:
      - iptables

@KI7ODK
Copy link

KI7ODK commented Jan 29, 2023

I just want to add that a fix for this is in the works here: PR #185

Yep. I used this fix the other day deploying to the latest version of Raspberry Pi OS, and it worked. I believe #185 also fixes the iptables-legacy issue.

Removed requirement for iptables on Rasbpian Bullseye (this is because bullseye comes with nftables preinstalled)

@romelBen
Copy link

romelBen commented Jun 2, 2023

I'm having the same issue with Raspbian Bullseye 64bit with the same error level=fatal msg="failed to find memory cgroup (v2)". Even with the cgroup_memory=1 cgroup_enable=memory added, I'm still receiving this error when setting up k3s.

I hope a fix will be had soon.

@dereknola
Copy link
Member

#151 has now been merged and iptables and cgroups issues around PI should now be resolved. Feel free to reopen if issue still exists.

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