diff --git a/jobs/e2e_node/crio/crio_cgroupv2_swap1g.ign b/jobs/e2e_node/crio/crio_cgroupv2_swap1g.ign index 7551658af1f8..bcbfd920eb01 100644 --- a/jobs/e2e_node/crio/crio_cgroupv2_swap1g.ign +++ b/jobs/e2e_node/crio/crio_cgroupv2_swap1g.ign @@ -83,9 +83,9 @@ "name": "swap-enable.service" }, { - "contents": "[Unit]\nDescription=Disable swap\nAfter=disableswap-system.service\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c \"sudo systemctl set-property system.slice MemorySwapMax=0\"\n\n[Install]\nWantedBy=multi-user.target\n", + "contents": "[Unit]\nDescription=Disable swap\nAfter=disableswap-system.service\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c \"sudo systemctl set-property system.slice MemorySwapMax=0\"\nExecStart=/bin/sh -c \"sudo systemctl set-property user.slice MemorySwapMax=0\"\n\n[Install]\nWantedBy=multi-user.target\n", "enabled": true, - "name": "disable-swap-system.service" + "name": "disable-swap.service" } ] } diff --git a/jobs/e2e_node/crio/templates/base/swap-1G.yaml b/jobs/e2e_node/crio/templates/base/swap-1G.yaml index cdd3f7b7a6e3..088a3c4c340a 100644 --- a/jobs/e2e_node/crio/templates/base/swap-1G.yaml +++ b/jobs/e2e_node/crio/templates/base/swap-1G.yaml @@ -14,7 +14,7 @@ systemd: [Install] WantedBy=multi-user.target - - name: disable-swap-system.service + - name: disable-swap.service enabled: true contents: | [Unit] @@ -24,6 +24,7 @@ systemd: [Service] Type=oneshot ExecStart=/bin/sh -c "sudo systemctl set-property system.slice MemorySwapMax=0" + ExecStart=/bin/sh -c "sudo systemctl set-property user.slice MemorySwapMax=0" [Install] WantedBy=multi-user.target diff --git a/jobs/e2e_node/crio/templates/crio_cgroupv2_swap1g.yaml b/jobs/e2e_node/crio/templates/crio_cgroupv2_swap1g.yaml index b640b64ad755..e625ba752e96 100644 --- a/jobs/e2e_node/crio/templates/crio_cgroupv2_swap1g.yaml +++ b/jobs/e2e_node/crio/templates/crio_cgroupv2_swap1g.yaml @@ -135,7 +135,7 @@ systemd: [Install] WantedBy=multi-user.target - - name: disable-swap-system.service + - name: disable-swap.service enabled: true contents: | [Unit] @@ -145,6 +145,7 @@ systemd: [Service] Type=oneshot ExecStart=/bin/sh -c "sudo systemctl set-property system.slice MemorySwapMax=0" + ExecStart=/bin/sh -c "sudo systemctl set-property user.slice MemorySwapMax=0" [Install] WantedBy=multi-user.target diff --git a/jobs/e2e_node/swap/ubuntu-swap-1G-allocation.yaml b/jobs/e2e_node/swap/ubuntu-swap-1G-allocation.yaml index 521149159d17..3ea9712c1e46 100644 --- a/jobs/e2e_node/swap/ubuntu-swap-1G-allocation.yaml +++ b/jobs/e2e_node/swap/ubuntu-swap-1G-allocation.yaml @@ -18,6 +18,7 @@ runcmd: - 'mkswap /swapfile' - 'swapon /swapfile' - 'sudo systemctl set-property system.slice MemorySwapMax=0' + - 'sudo systemctl set-property user.slice MemorySwapMax=0' - 'echo "/swapfile swap swap defaults 0 0" | tee -a /etc/fstab' - 'echo swap files' - 'swapon --show'