Bug #25195
closedkatello-remove does not completely remove data on mounted filesystems
Description
Description of problem:
katello-remove does not completely remove the data on mounted directory structures
Version-Release number of selected component (if applicable):
Satellite 6.3.1
RHEL 7.5
How reproducible:
Always
Steps to Reproduce:
1. Install a new RHEL host with mounted filesystems following guidelines [1]:
/var/lib/pgsql
/var/lib/mongodb
2. Install Satellite server bits
- yum install satellite
- satellite-installer
3. Remove [2] Satellite 6.3 server bits:
- katello-remove
4. Change hostname to something else
- hostnamectl set-hostname satname2
5. Install Satellite server bits again
- yum install satellite
- satellite-installer
Actual results:
Since the data does not remove completely, remnants of the old install still stick around, for example, in this scenario, the hostname was changed during the second installation and the capsule id is now "2" instead of "1" for a fresh installation.
/var/lib/pgsql was not cleaned up properly so the new installation took the data from this directory and used it for Satellite 6
Expected results:
katello-remove should remove all the data in these directories
Maybe add some logic to check if the filesystem is mounted, and ask the user if it's OK to remove the data in that path.
We see that /var/lib/pgsql is a mounted filesystem, is it OK to remove /var/lib/pgsql/* ?