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

Add support raspbian bullseye #185

Closed
wants to merge 5 commits into from

Conversation

husjon
Copy link

@husjon husjon commented Apr 9, 2022

This PR adds support for raspbian bullseye.
It has been tested on newly flashed pi3b+ nodes (combination of buster and bullseye) with only SSH enabled.
(I do currently not have pi4 nodes in my possession)

Test run output: https://gist.github.com/husjon/00965e50afffd8865e8ac3db66edb30f

What's been changed:

  • Added check for Raspbian Bullseye
  • Added task switch for Raspbian distribution codenames
  • Removed requirement for iptables on Rasbpian Bullseye (this is because bullseye comes with nftables preinstalled)
  • Removed 'cgroup_enable=cpuset' for bullseye.
    On bullseye using Pi3B+ this seem to bring the server to its knees, seeing average loads up to 15 while agents are added.
    This makes it so that the agents are unable to communicate with the server. (screenshot in comments)

@husjon husjon force-pushed the add_support-raspbian_bullseye branch 2 times, most recently from 77bdcb1 to 9d57bfe Compare April 9, 2022 16:49
@husjon husjon marked this pull request as ready for review April 9, 2022 16:58
Comment on lines 34 to 42
- ansible_facts.lsb.description|default("") is match("Debian.*buster")

- 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")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the detection task a separate task for bullseye to be explicit for bullseye, but if prefered, this can be combined with the buster match.
A few comments on this would be appreciated.

Example change:

Suggested change
- ansible_facts.lsb.description|default("") is match("Debian.*buster")
- 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")
- ansible_facts.lsb.description|default("") is match("Debian.*(buster|bullseye)")

@husjon
Copy link
Author

husjon commented Apr 9, 2022

Here's a screenshot of the load from the server while adding agents.
I was lucky to have the SSH connection open during this, the connection is barely working and htop is updating only every now and then.

image

@JohanNicander
Copy link

Nice work! I would have solved it in nearly the same way. However, adding the codename (which is a one to one map of major version) is redundant imo, and I would suggest we use only one of major version and codename.

@husjon
Copy link
Author

husjon commented May 8, 2022

Thanks for the feedback, I don't mind either solution, I just found it easier to read the codenames rather than version numbers for the task filenames. :)
I do however realize that major_release is used in the prior task setting the facts raspberrypi/tasks/main.yml#L36-L40, so might as well continue this trend.

I'll prepare a commit with the necessary changes.

@husjon husjon force-pushed the add_support-raspbian_bullseye branch from 506adef to 85641a8 Compare May 8, 2022 16:57
Copy link

@ozgurgul ozgurgul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change works!.

@kraihn
Copy link

kraihn commented Jan 4, 2023

@ozgurgul and @JohanNicander, is there a reason this fix is approved but hasn't been merged?

@KI7ODK
Copy link

KI7ODK commented Jan 29, 2023

@ozgurgul and @JohanNicander, is there a reason this fix is approved but hasn't been merged?

I had to implement this fix the other day setting up a new Raspberry Pi cluster with Raspberry Pi OS, so I'm wondering the same thing. This seems like a simple fix that should be merged with little issue.

@ozgurgul
Copy link

@ozgurgul and @JohanNicander, is there a reason this fix is approved but hasn't been merged?

I had to implement this fix the other day setting up a new Raspberry Pi cluster with Raspberry Pi OS, so I'm wondering the same thing. This seems like a simple fix that should be merged with little issue.

I'm not a contributor to this repo. Hence I can't merge this PR but otherwise I share the same thoughts.

@husjon
Copy link
Author

husjon commented Jan 30, 2023

Hi @St0rmingBr4in what is required for this PR to be merged?
Thanks in advance

@berkobob
Copy link

berkobob commented Apr 6, 2023

Please can this PR get merged sooner rather than later. Thanks.

@ericyangchen
Copy link

This is really helpful!
Huge thanks to @husjon

@akrami
Copy link

akrami commented Jul 14, 2023

tested this on my raspberry pi cm4 cluster and totally works 👍

@nullset2
Copy link

nullset2 commented Aug 3, 2023

I'm SO tempted to use this. I tried to spin up my cluster with an aarch64 OS instead of armv7 and it didn't really work out for me, but it seems that this would solve my issue completely.

I say this PR should be merged!

Signed-off-by: Jon Erling Hustadnes <[email protected]>
Signed-off-by: Jon Erling Hustadnes <[email protected]>
Renamed task file to `Raspbian-11` (from `Raspbian-bullseye`)
Removed set_facts for distribution codename

Signed-off-by: Jon Erling Hustadnes <[email protected]>
@dereknola dereknola force-pushed the add_support-raspbian_bullseye branch from 85641a8 to 7ff5fe1 Compare November 7, 2023 18:31
@dereknola
Copy link
Contributor

Closing in favor of changes in #151

@dereknola dereknola closed this Nov 7, 2023
@husjon husjon deleted the add_support-raspbian_bullseye branch November 7, 2023 22:16
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

Successfully merging this pull request may close these issues.

10 participants