Bug #11389
open
should not "rm -rf /etc/ceph" when uninstalling ceph-common
Added by Kefu Chai about 9 years ago.
Updated over 4 years ago.
Description
we have
%postun -n ceph-common
# Package removal cleanup
if [ "$1" -eq "0" ] ; then
rm -rf /var/log/ceph
rm -rf /etc/ceph
fi
in our ceph.spec.
which basically nuke user's config file when user "rpm -e ceph-common".
but "rpm -e" should persist this file, per http://www.rpm.org/max-rpm/ch-rpm-erase.html .
the quoted code was actually added in the fix of #4415.
i am not sure how to fix this without reverting the "rm -rf /etc/ceph" change. because, unlike "apt-get", "rpm" does not have a purge command. so we might want to
- update teuthology to remove the /var/log/ceph and /etc/ceph when removing ceph from the system.
or
- ship an empty ceph.conf in the ceph-common
- mark the ceph.conf as "%config" (N.B, not "%config(noreplace)"), so the empty ceph.conf will overwrite the user-edited one. and the changed ceph.conf will be saved as ceph.conf.rpmsave .
- Assignee deleted (
Kefu Chai)
FWIW ceph-deploy has an explicit purgedata that does zap /var/lib/ceph and /etc/ceph. I think teuthology has the same, and if it doesn't, we can add it.
I always wondered why Ceph's packages did this? Was it a way of cleaning up during test runs, like a backup for teuthology-nuke's functionality?
We should stop deleting files in /etc
in any case. The ceph.spec file from Fedora/EPEL does not do this.
- Status changed from 12 to New
Also available in: Atom
PDF