You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by eo...@apache.org on 2021/12/14 13:02:47 UTC
[pulsar] branch branch-2.8 updated: [CI] Fix Tune Runner VM memory.swappiness no such file or directory
This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.8 by this push:
new 1d76b34 [CI] Fix Tune Runner VM memory.swappiness no such file or directory
1d76b34 is described below
commit 1d76b34e0f951fbba8cb77a97c24bb897d8663d0
Author: Kai Wang <kw...@streamnative.io>
AuthorDate: Tue Dec 14 11:24:08 2021 +0800
[CI] Fix Tune Runner VM memory.swappiness no such file or directory
Failed CI: https://github.com/apache/pulsar/runs/4501006108?check_suite_focus=true#step:3:1
### Motivation
The Tune Runner VM is flaky.
Sometimes, the parent directory of memory.swappiness can't find, we should check it first.
```
Run if [[ "$OSTYPE" == "linux-gnu"* ]]; then
10.1.0.235 fv-az198-145.gjkxsqtjg41etoza45cw35jkyb.bx.internal.cloudapp.net fv-az198-145
1
tee: /sys/fs/cgroup/memory/system.slice/snap-snapd-13640.mount/memory.swappiness: No such file or directory
Error: Process completed with exit code 1.
```
### Modifications
Add a check of the parent directory of memory.swappiness
(cherry picked from commit 26ac049997bf10d82c344e7db77f503740280d82)
---
.github/actions/tune-runner-vm/action.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/actions/tune-runner-vm/action.yml b/.github/actions/tune-runner-vm/action.yml
index 30cf183..e8914db 100644
--- a/.github/actions/tune-runner-vm/action.yml
+++ b/.github/actions/tune-runner-vm/action.yml
@@ -33,8 +33,10 @@ runs:
# Set vm.swappiness=1 to avoid swapping and allow high RAM usage
echo 1 | sudo tee /proc/sys/vm/swappiness
# Set swappiness to 1 for all cgroups and sub-groups
- for swappiness_file in /sys/fs/cgroup/memory/*/memory.swappiness /sys/fs/cgroup/memory/*/*/memory.swappiness; do
- echo 1 | sudo tee $swappiness_file > /dev/null
+ for swappiness_dir in /sys/fs/cgroup/memory/*/ /sys/fs/cgroup/memory/*/*/; do
+ if [ -d "swappiness_dir" ]; then
+ echo 1 | sudo tee $(swappiness_dir)memory.swappiness > /dev/null
+ fi
done
# use "madvise" Linux Transparent HugePages (THP) setting