]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: preserve cephadm user during RPM upgrade 46553/head
authorScott Shambarger <devel@shambarger.net>
Mon, 16 May 2022 00:30:50 +0000 (17:30 -0700)
committerAdam King <adking@redhat.com>
Tue, 7 Jun 2022 16:03:18 +0000 (12:03 -0400)
The cephadm postun macro in the rpm spec file doesn't test for upgrade,
and removes the cephadm user.  The patch changes the macro to only remove
the cephadm user on uninstall.

Fixes: https://tracker.ceph.com/issues/55664
Signed-off-by: Scott Shambarger <devel@shambarger.net>
(cherry picked from commit c881fd97c2e2f73b36028f6002e670ca449c4404)

ceph.spec.in

index cfd993cfa13172e919d12717ea7383e2387ae837..c31f817528149b57cb972592ffee699ad2e230c8 100644 (file)
@@ -1528,8 +1528,7 @@ exit 0
 
 %if ! 0%{?suse_version}
 %postun -n cephadm
-userdel -r cephadm || true
-exit 0
+[ $1 -ne 0 ] || userdel cephadm || :
 %endif
 
 %files -n cephadm