diff --git a/.github/workflows/k8s-ci.yml b/.github/workflows/k8s-ci.yml index f642e5b9a..fff4db990 100644 --- a/.github/workflows/k8s-ci.yml +++ b/.github/workflows/k8s-ci.yml @@ -1,10 +1,13 @@ name: K8s CI on: workflow_call: + push: + branches: + - pytest jobs: k8s-ci: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-cores steps: - name: Bind mount /dev/sda1 to /nix run: | @@ -50,7 +53,7 @@ jobs: nix-shell ./scripts/k8s/shell.nix --run "kubectl -n mayastor logs -l app=upgrade --all-containers=true" k8s-ci-vm: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-cores steps: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@v11 diff --git a/scripts/k8s/setup-io-prereq.sh b/scripts/k8s/setup-io-prereq.sh index 6bba221d8..b1fb60df9 100755 --- a/scripts/k8s/setup-io-prereq.sh +++ b/scripts/k8s/setup-io-prereq.sh @@ -35,7 +35,13 @@ die() { } setup_hugepages() { - $SYSCTL -w vm.nr_hugepages="$1" + local wanted="$1" + $SYSCTL -w vm.nr_hugepages="$wanted" + local actual + actual=$($SYSCTL -b vm.nr_hugepages) + if [ "$actual" != "$wanted" ]; then + die "Wanted $wanted hugepages, but only allocated $actual hugepages" + fi } modprobe_nvme_tcp() { @@ -99,7 +105,7 @@ while [ "$#" -gt 0 ]; do done if [ -n "$HUGE_PAGES" ]; then - pages=$(sysctl -b vm.nr_hugepages) + pages=$($SYSCTL -b vm.nr_hugepages) if [ "$HUGE_PAGES" -gt "$pages" ]; then setup_hugepages "$HUGE_PAGES"