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

added workaround to avoid empty k3s configs in screenshot #660

Merged
merged 2 commits into from Mar 21, 2023

Conversation

bulnv
Copy link
Contributor

@bulnv bulnv commented Mar 17, 2023

Added workaround to preserve k3s configuration files from deletion with k3s-uninstall

@mysticaltech
Copy link
Collaborator

@bulnv Are you sure about this, did this change fix it for you?

Because write_files in cloud-init will create the required path if missing. But maybe indeed, the k3s uninstallation will delete it... If that's the case, it would explain it.

@bulnv
Copy link
Contributor Author

bulnv commented Mar 17, 2023

@bulnv Are you sure about this, did this change fix it for you?

Because write_files in cloud-init will create the required path if missing. But maybe indeed, the k3s uninstallation will delete it... If that's the case, it would explain it.

Well, for me only this one helped. I am pretty sure that folder was missing completely. And I checked cloud-init logs. Cloud-init has written there files with appropriate sizes. But afterward they have gone.

@mysticaltech
Copy link
Collaborator

Then it's a matter of timing depending on the node. Great catch!! Will merge and do final testing later on.

@ifeulner
Copy link
Contributor

Was a few days off, so I just read now this thread - but can't see really what this patch changes? What do you mean with timing? There could indeed be an issue dependent on when the snapshot has been created... unfortunately the current snapshot generation is unreliable - this is not the case anymore when the snapshot is created from the outside, e.g. via packer.

@mysticaltech
Copy link
Collaborator

mysticaltech commented Mar 19, 2023

@ifeulner No worries. Now it's realiable, I just had changed the location of the k3s config file (you had it correct in the first place, tmp was the right location to use), and it got deleted by the k3s uninstall on some nodes depending on the node size I guess, so timing. This PR is correct and removes the bug that I introduced during another fix.

@mysticaltech mysticaltech merged commit cdd5bd3 into kube-hetzner:master Mar 21, 2023
1 check passed
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.

None yet

3 participants