-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix cgroups cmdline path #456
Fix cgroups cmdline path #456
Conversation
Need to add check so that we edit the right file on older Raspbian systems. |
Thank you! |
@timothystewart6 of course! Although I'm not sure why the molecule test is failing. I tried locally with the file in both locations. |
@yebo29 thank you! Not your fault. The ipv6 test is flaky, not sure of the root cause but I will get this merged in. |
This worked for me. I think there is a couple of issues that may want to be considered.
I manually deleted |
Those are valid points. An LSB release check would be beneficial here. I think that would resolve both points, since Bookworm will use the new location if it was a new install or an upgrade, I would think. But that would require further digging/research to confirm. I'm okay with putting this back in draft mode and adding the additional check if we agree on that. I'll let @timothystewart6 provide further input. EDIT: Typo fix |
@yebo29 that sounds good to me, the safer the better. No rush at all to get this merged in! |
Converted back to draft mode. Will push new changes when ready! |
Added commit, but I still need to test. Due to time, I will test tomorrow. |
I just tested on my Pi cluster and it successfully deployed when a |
Thank you for testing! I've had a jam-packed morning so just getting to this. Going to do my own round of testing and then mark as ready when I'm done and if there are no issues. |
Ah, I also have a lint error. Forgot to run |
Pushed new changes. Was able to test locally. Marked as ready for review again. Idea for another PR and/or issue: Add tags to tasks to speed up testing: |
Darn IPv6 molecule test failed again. Anything I can do to help there? |
I just checked a new install on a fresh install of dietpi and they have not moved the cmdline.txt. Diet Pi probably should move it, however, I wonder if the detection should use Raspberry Pi OSpico-k3s@worker-8:~ $ find /boot -name cmdline.txt
/boot/cmdline.txt
/boot/firmware/cmdline.txt
pico-k3s@worker-8:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/" Diet PIroot@control-1:~# find /boot -name cmdline.txt
/boot/cmdline.txt
root@control-1:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/" |
Did you try to run these code changes against that OS and observe what happens? |
Not yet. I will try this evening (PST) after work. |
I just re-imaged Pi OS to one Pi 4. I can see both pico-k3s@worker-1:~ $ cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=ff374c2a-02 rootfstype=ext4 fsck.repair=yes rootwait pico-k3s@worker-1:~ $ cat /boot/firmware/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=ff374c2a-02 rootfstype=ext4 fsck.repair=yes rootwait So, I am wondering if the existing check by grepping the file for
Thoughts? |
Sure, we can flip the logic around. It makes sense to me. |
…nt per contributor suggestion
Done. I changed the test to |
@yebo29 Thank you for actually implementing the changes. I have to purchase Jeff's |
Hit a snag with diet pi and I think this PR should be tested / merged separately. The snag I ran into is that diet pi is a minimal distro. Diet Pi does not install "ansible_lsb": {}, With my limited ansible experience, I tried to add some tasks to ensure this was installed but failed to get it working as expected. This is what I tried to add near the beginning of # some distro like diet pi do not install lsb-release by default
- name: Install lsb-release
apt:
name: lsb-release
state: present
register: lsb_release
when: ansible_facts.lsb.description is not defined
# if lsb-release was installed, re-gather the lsb facts
- name: Gather lsb if lsb_release installed
setup:
gather_subset:
- "lsb"
when: lsb_release is changed Even without lsb-release, Diet Pi does have the distribution properties, "ansible_distribution": "Debian",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "Debian",
"ansible_distribution_major_version": "12",
"ansible_distribution_minor_version": "5",
"ansible_distribution_release": "bookworm",
"ansible_distribution_version": "12.5", |
Added #463 to track diet pi compatibility. |
Thank you all! |
Proposed Changes
When replacing a node, I noticed that the cgroups task has an old path. Old Raspbian had
/boot/cmdline.txt
, but that file has been moved to/boot/firmware/cmdline.txt
. Upon updating that path, configuration completed successfully and k3s service started without error. When I originally built the cluster, I made that change manually. Replacing a node and using the playbook exposed this issue.References
Checklist
site.yml
playbookreset.yml
playbook