Skip to content

Commit

Permalink
disable user slice
Browse files Browse the repository at this point in the history
  • Loading branch information
kannon92 committed Nov 5, 2024
1 parent 1485947 commit 8810056
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions jobs/e2e_node/crio/crio_cgroupv2_swap1g.ign
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion jobs/e2e_node/crio/templates/base/swap-1G.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ systemd:
[Install]
WantedBy=multi-user.target
- name: disable-swap-system.service
- name: disable-swap.service
enabled: true
contents: |
[Unit]
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion jobs/e2e_node/crio/templates/crio_cgroupv2_swap1g.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ systemd:
[Install]
WantedBy=multi-user.target
- name: disable-swap-system.service
- name: disable-swap.service
enabled: true
contents: |
[Unit]
Expand All @@ -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
1 change: 1 addition & 0 deletions jobs/e2e_node/swap/ubuntu-swap-1G-allocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 8810056

Please sign in to comment.