File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
name : K8s CI
2
2
on :
3
3
workflow_call :
4
+ push :
5
+ branches :
6
+ - pytest
4
7
5
8
jobs :
6
9
k8s-ci :
Original file line number Diff line number Diff line change @@ -35,7 +35,13 @@ die() {
35
35
}
36
36
37
37
setup_hugepages () {
38
- $SYSCTL -w vm.nr_hugepages=" $1 "
38
+ local wanted=" $1 "
39
+ $SYSCTL -w vm.nr_hugepages=" $wanted "
40
+ local actual
41
+ actual=$( $SYSCTL -b vm.nr_hugepages)
42
+ if [ " $actual " != " $wanted " ]; then
43
+ die " Wanted $wanted hugepages, but only allocated $actual hugepages"
44
+ fi
39
45
}
40
46
41
47
modprobe_nvme_tcp () {
@@ -99,7 +105,7 @@ while [ "$#" -gt 0 ]; do
99
105
done
100
106
101
107
if [ -n " $HUGE_PAGES " ]; then
102
- pages=$( sysctl -b vm.nr_hugepages)
108
+ pages=$( $SYSCTL -b vm.nr_hugepages)
103
109
104
110
if [ " $HUGE_PAGES " -gt " $pages " ]; then
105
111
setup_hugepages " $HUGE_PAGES "
You can’t perform that action at this time.
0 commit comments