]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: preserve cephadm user during RPM upgrade 46790/head
authorScott Shambarger <devel@shambarger.net>
Mon, 16 May 2022 00:30:50 +0000 (17:30 -0700)
committerAdam King <adking@redhat.com>
Wed, 22 Jun 2022 00:03:20 +0000 (20: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 9f522a750b7866d1dfe490536e52c24fed1e1175..608f495b37b5f09787faa14f23ff0503bd4e3f84 100644 (file)
@@ -1575,8 +1575,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