vitobotta / hetzner-k3s

The easiest and fastest way to create and manage Kubernetes clusters in Hetzner Cloud using the lightweight distribution k3s by Rancher.
MIT License
1.91k stars 143 forks source link

Cloud init and Timeout from 30 to 60 #393

Closed axgkl closed 3 months ago

axgkl commented 3 months ago

Hi, sorry, 2 things in one PR.

The cloud init improvements we discussed in #389.

BUT also: Today I get consistently timeout errors at k3s install time.

[Instance ax-master2] Waiting for successful ssh connectivity with instance ax-master2...
[Instance ax-master1] Instance ax-master1 already exists, skipping create
[Instance ax-master3] Instance status: running
[Instance ax-master3] Waiting for successful ssh connectivity with instance ax-master3...
[Instance ax-master1] Instance status: running
[Instance ax-master1] Waiting for successful ssh connectivity with instance ax-master1...
[Instance ax-master2] ...instance ax-master2 is now up.
[Instance ax-master2] ...instance ax-master2 created
[Instance ax-master2] ...instance ax-master2 is now up.
Error creating instance: timeout after 00:00:30
Instance creation for ax-master3 failed. Try rerunning the create command.
Error creating instance: timeout after 00:00:30
Instance creation for ax-master1 failed. Try rerunning the create command.
[Instance ax-master1] ...instance ax-master1 is now up.
[Instance ax-master2] ...instance ax-master2 is now up.
[Instance ax-master3] ...instance ax-master3 is now up.
[Instance ax-master3] ...instance ax-master3 is now up.

and it does not recover from there - would have to restart the installer, then it would run through.

The only fix which allows consistently working single shot installs was to increase those 30 to 60 - then it runs through.

Interesting is that after waiting that long the cloud init is done, when master_install runs, i.e. I don't even see the ""đź•’ Awaiting cloud config (may take a minute...)" message today, just the success message from "Cloud init finished: $(cat $fn_cloud)"

Cheers, Gunther

PS: I can confirm the ssh port problem @jpetazzo reports in the other PR, works only with port 22 with ubuntu.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

vitobotta commented 3 months ago

Thanks for the PR! I think it's fine to increase the timeout to take into account delays with the cloud init setup.

I am aware of the SSH port issue with Ubuntu 24 and will look into it as soon as I have a chance.