Mounted volume cannot be removed and podman thus exits with non- zero return even though data and internal record were purged. This commit adds mount check on podman data removal and reports error only when volume dir is not empty and not mounted.
This commit also fixes error handling when volume purge was not successful.
What does this PR change?
Mounted volume cannot be removed and podman thus exits with non- zero return even though data and internal record were purged. This commit adds mount check on podman data removal and reports error only when volume dir is not empty and not mounted.
This commit also fixes error handling when volume purge was not successful.
Test coverage
No tests: add explanation
No tests: already covered
Unit tests were added
[ ] DONE
Links
Issue(s): https://github.com/SUSE/spacewalk/issues/24417
Changelogs
Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository
If you don't need a changelog check, please mark this checkbox:
If you uncheck the checkbox after the PR is created, you will need to re-run
changelog_test
(see below)Before you merge
Check How to branch and merge properly!