Skip to content
Snippets Groups Projects
Unverified Commit e90769c8 authored by Spencer Smith's avatar Spencer Smith Committed by GitHub
Browse files

Merge pull request #1888 from chapsuk/issue_1885

Disable swap in vagrant vms
parents fe81bba0 2c7c956b
No related branches found
No related tags found
No related merge requests found
...@@ -129,6 +129,9 @@ Vagrant.configure("2") do |config| ...@@ -129,6 +129,9 @@ Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: "service network restart", run: "always" config.vm.provision "shell", inline: "service network restart", run: "always"
end end
# Disable swap for each vm
config.vm.provision "shell", inline: "swapoff -a"
# Only execute once the Ansible provisioner, # Only execute once the Ansible provisioner,
# when all the machines are up and ready. # when all the machines are up and ready.
if i == $num_instances if i == $num_instances
......
...@@ -71,3 +71,9 @@ ...@@ -71,3 +71,9 @@
command: ping -c1 {{ access_ip }} command: ping -c1 {{ access_ip }}
when: access_ip is defined when: access_ip is defined
ignore_errors: "{{ ignore_assert_errors }}" ignore_errors: "{{ ignore_assert_errors }}"
- name: Stop if swap enabled
assert:
that: ansible_swaptotal_mb == 0
when: kubelet_fail_swap_on|default(true)
ignore_errors: "{{ ignore_assert_errors }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment