Skip to content

Commit

Permalink
[CI] Fix Tune Runner VM memory.swappiness no such file or directory
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Demogorgon314 authored Dec 14, 2021
1 parent e04b3af commit 26ac049
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/actions/tune-runner-vm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26ac049

Please sign in to comment.