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

VMs not reboot persistent - kubelet not starting because of swap #146

Closed
twillert opened this issue May 9, 2019 · 2 comments
Closed

VMs not reboot persistent - kubelet not starting because of swap #146

twillert opened this issue May 9, 2019 · 2 comments

Comments

@twillert
Copy link
Contributor

twillert commented May 9, 2019

Hi,
thanks for sharing this!

After setting up a working cluster the individual VMs are not reboot safe. After a reboot the kubelet was not start because of swap being enabled. The playbooks does a 'swapoff -a' which is not persistent.

One way of diabling swap in a persistent way would be to create a SystemD service to turn it off before starting Kubelet. Like this:

# /etc/systemd/system/swapoff.service

[Unit]
Description=Swapoff, kubelet requirement
After=network.target
Before=kubelet.service

[Service]
Type=oneshot
ExecStart=/sbin/swapoff -a
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

Where would be the best place in the code to implement this? I would be happy to give a pull request a shot.

Cheers,
Thomas

@kairen
Copy link
Owner

kairen commented May 10, 2019

Hi @twillert, thank you for your report, I think you can implement this in k8s-setup role.

@kairen
Copy link
Owner

kairen commented May 14, 2019

fixed #147 .

@kairen kairen closed this as completed May 14, 2019
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

No branches or pull requests

2 participants