Katello-remove doesn't deal well with mounted file systems.
root@apsrd01871:/root # katello-remove -y Starting removal Stopping services Removing RPMs Cleaning up configuration files Cleaning up log files /usr/share/ruby/fileutils.rb:1433:in `rmdir': Device or resource busy - /var/log/candlepin (Errno::EBUSY) from /usr/share/ruby/fileutils.rb:1433:in `block in remove_dir1' from /usr/share/ruby/fileutils.rb:1444:in `platform_support' from /usr/share/ruby/fileutils.rb:1432:in `remove_dir1' from /usr/share/ruby/fileutils.rb:1425:in `remove' from /usr/share/ruby/fileutils.rb:770:in `block in remove_entry' from /usr/share/ruby/fileutils.rb:1481:in `postorder_traverse' from /usr/share/ruby/fileutils.rb:768:in `remove_entry' from /usr/share/ruby/fileutils.rb:626:in `block in rm_r' from /usr/share/ruby/fileutils.rb:622:in `each' from /usr/share/ruby/fileutils.rb:622:in `rm_r' from /sbin/katello-remove:182:in `remove' from /sbin/katello-remove:233:in `<main>'
You also can't run
katello-remove again unless you install
If I umount the 3 mounted file systems then it will run.
root@apsrd01871:/ # umount /var/log/httpd root@apsrd01871:/ # umount /var/log/candlepin root@apsrd01871:/ # umount /var/cache/pulp root@apsrd01871:/ # katello-remove -y Starting removal Stopping services Removing RPMs Cleaning up configuration files Cleaning up log files Cleaning up certs Cleaning up content Removing Databases and Pulp storage on Filesystem /var/lib/mongodb is part of a mounted filesystem, skipping. You will need to remove /var/lib/mongodb manually. /var/lib/pgsql is part of a mounted filesystem, skipping. You will need to remove /var/lib/pgsql manually. /var/lib/pulp is part of a mounted filesystem, skipping. You will need to remove /var/lib/pulp manually. Finished root@apsrd01871:/ # CONTENT = [ '/opt/puppetlabs', '/opt/theforeman', '/root/.cache/apipie_bindings', '/root/.hammer', '/usr/lib/pulp', '/usr/libexec/foreman-proxy', '/usr/share/candlepin', '/usr/share/foreman-installer-katello', '/usr/share/foreman-installer', '/usr/share/foreman-proxy', '/usr/share/foreman', '/usr/share/katello-installer-base', '/usr/share/katello', '/usr/share/pulp', '/usr/share/puppet', '/usr/share/qpid-tools', '/usr/share/qpid', '/usr/share/tomcat', '/var/cache/', '/var/lib/candlepin', '/var/lib/foreman-maintain', '/var/lib/foreman', '/var/lib/katello', '/var/lib/puppet', '/var/lib/qpidd', '/var/lib/tomcat', '/var/opt/theforeman', '/var/tmp/foreman-proxy' ] CONTENT is missing /var/lib/foreman-proxy
I think it should also be able to clean up the contents of the mounted file systems.
It lists them in
MOUNTS = [ '/var/lib/mongodb', '/var/lib/pgsql', '/var/lib/pulp' ]
I would think it should dynamically figure out what is mounted and just clean it out and do the right thing. I would also be okay if it wants to give me a list that I need to manually clean up, just don't fail.
Red Hat Satellite 6.5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.