Bug 2013085

Summary: [cephadm] - upgrading cephadm package using yum returns a warning - userdel: cephadm mail spool (/var/spool/mail/cephadm) not found
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: CephadmAssignee: Adam King <adking>
Status: CLOSED ERRATA QA Contact: Manasa <mgowri>
Severity: low Docs Contact: Anjana Suparna Sriram <asriram>
Priority: unspecified    
Version: 5.0CC: adking, akraj, kdreyer, mgowri, scott-fedora, tserlin, vereddy
Target Milestone: ---   
Target Release: 5.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-16.2.8-36.el8cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-09 17:36:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2102272    

Description Vasishta 2021-10-12 04:37:48 UTC
Description of problem:
upgrading cephadm package using yum returns a warning - userdel: cephadm mail spool (/var/spool/mail/cephadm) not found

Version-Release number of selected component (if applicable):
Upgrading from cephadm-2:16.2.0-119.el8cp.noarch 
to cephadm-2:16.2.0-141.el8cp.noarch 

How reproducible:
Tried once

Steps to Reproduce:
1. Install cephadm package
2. Upgrade cephadm package to latest version

Actual results:
  Running scriptlet: cephadm-2:16.2.0-119.el8cp.noarch                                                                                                                                                         2/2
userdel: cephadm mail spool (/var/spool/mail/cephadm) not found

Expected results:
No warnings or handling all requirements of the scripts

Additional info:

Comment 4 Scott Shambarger 2022-05-16 00:57:13 UTC
I submitted a bug and pull request to fix this upstream, but the fixes need to be applied to the RedHat/Fedora spec files as well... there's actually two bugs that break upgrades of cephadm, here are the pull requests for both:

# only remove cephadm user on uninstall:
https://github.com/ceph/ceph/pull/46272

# (not mine, but needed) correctly mark ~cephadm/.ssh/authorized_keys as config(noreplace):
https://github.com/ceph/ceph/pull/45347

There both 1 line fixes, but note that rpm upgrade runs the %postun script from the previous version, so the cephadm user will still be removed the first time the package is upgraded with the fix...

Comment 5 Scott Shambarger 2022-06-01 23:06:54 UTC
Both of the above PRs have been merged... might be useful to apply them to the RH/Fedora spec too.

Comment 16 errata-xmlrpc 2022-08-09 17:36:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Ceph Storage Security, Bug Fix, and Enhancement Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5997