Skip to content

Commit 80b93d6

Browse files
author
gitlab
committed
Merge branch 'fix/ZSTAC-82619' into '5.5.12'
<fix>[conf]: retry rm -rf virtualenv to avoid race with zstack_service_exporter See merge request zstackio/zstack!9365
2 parents 262e92a + ed8c99b commit 80b93d6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

conf/tools/install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ ensure_python3_venv() {
3939
if [ -d "$venv_path" ] && [ -x "$venv_path/bin/python3.11" ]; then
4040
return 0
4141
fi
42-
rm -rf "$venv_path" && python3.11 -m venv "$venv_path" || exit 1
42+
# retry once: rm -rf may fail if zstack_service_exporter is regenerating .pyc concurrently
43+
rm -rf "$venv_path" || rm -rf "$venv_path" || exit 1
44+
python3.11 -m venv "$venv_path" || exit 1
4345
}
4446

4547

0 commit comments

Comments
 (0)