-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Installing in a Alpine VM error #1387
Comments
Did you just download the k3s binary and run it with |
Yeah, I let the script install normally. However, I thought that trying to execute it manually again would have an effect(Because I thought the k3s was not running). At first install (via script), it just gave a bunch of errors. So I added the "/boot/cmdline.txt" and the errors got smaller. But the point is, it should install just fine in Alpine? BTW, feels like Alpine doesn't have " But, Alpine has OpenRC, which supports a kind of cgroups. So, the k3s isn't aware of it, it seems. |
Ok, if you installed it with the script then you should not be running My understanding is that the install script just sets up and then starts the service, so even if the service crashed the first time due to missing cgroups, it still started automatically after you rebooted with the right kernel options. You can tell it's running due to your attempt to start a second copy of the server failing to bind to the port -it's already in use by the copy started by the init script. That said, the cluster bootstrap may have only partially completed due to the missing cgroups. I would run |
@MichelDiz Thanks for submitting the issue, I agree with @brandond, the error you are seeing "address already in use" is due to running k3s server manually, please let us know if removing k3s and reinstalling after properly configuring the cgroups works correctly |
Well, I've started if from scratch. But, no success. Also tried by removing it and doing what brandond mentioned. (no success) It seems to me that this is a bug. The installation script supports OpenRC (see https://github.com/rancher/k3s/blob/0374c4f63d056df01c3e9e8cf4d77a6461169070/install.sh#L91). However, on this line https://github.com/rancher/k3s/blob/4cacffd7e64451b6b199c0561562c55510e46db3/contrib/util/check-config.sh#L313 the code does a wrong check. In $cgroupSubsystemDir. I don't know how to add groups correctly in the context of K3s and Alpine. I did research, and couldn't find a solution. So I believe it is a bug, as the Script does not predict this problem with OpenRC (or perhaps it is just with Alpine). Maybe the point is whether or not supporting Alpine. Maybe I just will give up.
Logs from the system
|
@MichelDiz Is this Alpine on a RPI ? also did you make sure to reboot after enabling the cgroups in cmdline |
you'll also want to make sure the rc-update add cgroups boot or you could make the echo 'rc_want=cgroups' > /etc/conf.d/k3s |
No, as I said in the issue comment. It is a VM. I was just trying out before mount a hardware cluster. @dweomer after
it worked fine after a reboot!
The first command you've shared I had tried before. It feels like it needs to go to the script. If not so, feel free to close it. Thank you all for your help! I'm very happy that it is just that simple solution. Cheers. |
#1354 (merged just now) should also fix this by adding |
Nice, I can test it out. Is it live? |
Yes, thank you @MichelDiz! :) |
@erikwilson It worked, but I had to reboot. Wouldn't it be possible to automate this? as we do in |
Thanks for testing @MichelDiz, I don't think it should need a reboot. To test I used the
verified the cgroup error, and re-ran the install with: Sounds like something else is going on, if you are able to reproduce please share the error from
There may be a few seconds after starting with openrc that kubectl will report |
Okay, I believe I was impatient to see the magic happening. I think we done. Thank you again for the effort! Cheers. (I'll let you guys close it) |
This got backported to 1.17. @ShylajaDevadiga testing this is low priority and should not block the 1.17.5 release, but im putting in your queue just so you can minimally give it a read through. |
the cgroup thingy worked for me, but on your logs (and on mine) are other errors:
Is there something we may have to configure or install to get networking especially nat working? some hints anybody? cheers, |
Validated using both the latest k3s version (
|
Version:
Os details:
Describe the bug
It is not a bug, I guess (Maybe a support?), the issue is that the installation failed.
I just wanna install k3s in a VM before mount any hardware structure.
Also, other behavior happens
When I reboot it shows
To Reproduce
Install alpine-virt-3.11.3-x86_64.iso on VirtualBox
Then install k3s.
More details
The text was updated successfully, but these errors were encountered: