This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new b49fb908c7 [INLONG-12077][CI] Make swapfile setup idempotent to avoid
Text file busy failures (#12078)
b49fb908c7 is described below
commit b49fb908c742c91530748cc07d1981787b24d220
Author: healchow <[email protected]>
AuthorDate: Tue Feb 24 17:21:42 2026 +0800
[INLONG-12077][CI] Make swapfile setup idempotent to avoid Text file busy
failures (#12078)
---
.github/workflows/ci_ut.yml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.github/workflows/ci_ut.yml b/.github/workflows/ci_ut.yml
index 2d9c157893..fcc4cdb665 100644
--- a/.github/workflows/ci_ut.yml
+++ b/.github/workflows/ci_ut.yml
@@ -109,6 +109,15 @@ jobs:
run: |
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w fs.file-max=65536
+ if swapon --show=NAME | grep -q '^/swapfile$'; then
+ echo "Swapfile already active, skipping creation"
+ exit 0
+ fi
+ if [ -f /swapfile ]; then
+ echo "Swapfile exists but not active, recreating"
+ sudo swapoff /swapfile || true
+ sudo rm -f /swapfile
+ fi
sudo fallocate -l 5G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile