Skip to content

Commit 8810056

Browse files
committed
disable user slice
1 parent 1485947 commit 8810056

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

jobs/e2e_node/crio/crio_cgroupv2_swap1g.ign

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
"name": "swap-enable.service"
8484
},
8585
{
86-
"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",
86+
"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",
8787
"enabled": true,
88-
"name": "disable-swap-system.service"
88+
"name": "disable-swap.service"
8989
}
9090
]
9191
}

jobs/e2e_node/crio/templates/base/swap-1G.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ systemd:
1414
1515
[Install]
1616
WantedBy=multi-user.target
17-
- name: disable-swap-system.service
17+
- name: disable-swap.service
1818
enabled: true
1919
contents: |
2020
[Unit]
@@ -24,6 +24,7 @@ systemd:
2424
[Service]
2525
Type=oneshot
2626
ExecStart=/bin/sh -c "sudo systemctl set-property system.slice MemorySwapMax=0"
27+
ExecStart=/bin/sh -c "sudo systemctl set-property user.slice MemorySwapMax=0"
2728
2829
[Install]
2930
WantedBy=multi-user.target

jobs/e2e_node/crio/templates/crio_cgroupv2_swap1g.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ systemd:
135135
136136
[Install]
137137
WantedBy=multi-user.target
138-
- name: disable-swap-system.service
138+
- name: disable-swap.service
139139
enabled: true
140140
contents: |
141141
[Unit]
@@ -145,6 +145,7 @@ systemd:
145145
[Service]
146146
Type=oneshot
147147
ExecStart=/bin/sh -c "sudo systemctl set-property system.slice MemorySwapMax=0"
148+
ExecStart=/bin/sh -c "sudo systemctl set-property user.slice MemorySwapMax=0"
148149
149150
[Install]
150151
WantedBy=multi-user.target

jobs/e2e_node/swap/ubuntu-swap-1G-allocation.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ runcmd:
1818
- 'mkswap /swapfile'
1919
- 'swapon /swapfile'
2020
- 'sudo systemctl set-property system.slice MemorySwapMax=0'
21+
- 'sudo systemctl set-property user.slice MemorySwapMax=0'
2122
- 'echo "/swapfile swap swap defaults 0 0" | tee -a /etc/fstab'
2223
- 'echo swap files'
2324
- 'swapon --show'

0 commit comments

Comments
 (0)