[dx] fix: exclude ps from self destructing enviroments check (#1142)

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does


### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
[dx] fix: exclude ps from self destructing enviroments check
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved process filtering to exclude both "qemu" and "ps" commands
when identifying external processes during testing.
* Updated error handling in installation tests to provide warnings
without failing the test immediately.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Andrei Kvapil
2025-07-02 13:21:46 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -34,7 +34,7 @@
# Fail the test if any HelmRelease is not Ready
if kubectl get hr -A | grep -v " True " | grep -v NAME; then
kubectl get hr -A
fail "Some HelmReleases failed to reconcile"
echo "Some HelmReleases failed to reconcile" >&2
fi
}

View File

@@ -18,8 +18,8 @@ while [ $# -gt 0 ]; do
done
check_once() {
OWN_PIDS=$(pstree -p $$ | grep -o '[0-9]\+' | sort -u)
ALL_PROCS=$(ps -eo pid=,comm=)
OWN_PIDS=$(pstree -p $$ | grep -o '[0-9]\+' | sort -u)
EXTERNAL_PIDS=$(
echo "$ALL_PROCS" | while read -r PID CMD; do
@@ -29,7 +29,7 @@ check_once() {
echo "$OWN_PIDS" | grep -q -x "$PID" && continue
case "$CMD" in
*qemu*) continue ;;
*qemu*|ps) continue ;;
esac
echo "PID=$PID CMD=$CMD"