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

Swap file not staying absent #70

Open
wstrater opened this issue Sep 3, 2020 · 0 comments
Open

Swap file not staying absent #70

wstrater opened this issue Sep 3, 2020 · 0 comments

Comments

@wstrater
Copy link

wstrater commented Sep 3, 2020

I am marking the swap file as absent and it reappears after a reboot.

I run swapon -show after a reboot.

$ swapon -show
Filename				Type		Size	Used	Priority
/swap.img                              	file    	2097148	0	-2
$ kubectl get nodes
The connection to the server 192.168.1.210:6443 was refused - did you specify the right host or port?

I update my vars/main.yml to include the following. I tried with and without swap_file_path.

swap_file_state: absent
#swap_file_path: /swap.img

When I run my playbook that includes the geerlingguy.swap role the swap is removed and I can access Kubernetes using kubectl.

$ swapon -show
$ kubectl get nodes
NAME            STATUS   ROLES    AGE   VERSION
k8scontroller   Ready    master   17d   v1.18.8
k8sworker1      Ready    node     17d   v1.18.8
k8sworker2      Ready    node     17d   v1.18.8

When I reboot my machine the swap file is back and I can't access Kubernetes.

Wes.

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

1 participant