Project

General

Profile

Actions

Bug #72083

open

ubuntu 24: debian/cephadm.postinst fails with: mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory

Added by Casey Bodley 8 months ago. Updated 4 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Backport:
squid tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Tags (freeform):
backport_processed
Fixed In:
v20.3.0-1784-gbffa446a89
Released In:
Upkeep Timestamp:
2025-07-20T10:53:40+00:00

Description

debian package installation fails on ubuntu 24.04 due to a cephadm post-install script:

2025-07-10T20:18:15.684 INFO:teuthology.orchestra.run.smithi006.stdout:Adding system user cephadm....done
2025-07-10T20:18:15.762 INFO:teuthology.orchestra.run.smithi006.stdout:usermod: unlocking the user's password would result in a passwordless account.
2025-07-10T20:18:15.762 INFO:teuthology.orchestra.run.smithi006.stdout:You should set a password with usermod -p to unlock this user's password.
2025-07-10T20:18:15.870 INFO:teuthology.orchestra.run.smithi006.stdout:mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory
2025-07-10T20:18:15.871 INFO:teuthology.orchestra.run.smithi006.stdout:dpkg: error processing package cephadm (--configure):
2025-07-10T20:18:15.871 INFO:teuthology.orchestra.run.smithi006.stdout: installed cephadm package post-installation script subprocess returned error exit status 1
...
2025-07-10T20:18:18.751 INFO:teuthology.orchestra.run.smithi006.stdout:dpkg: dependency problems prevent configuration of ceph-mgr-cephadm:
2025-07-10T20:18:18.751 INFO:teuthology.orchestra.run.smithi006.stdout: ceph-mgr-cephadm depends on cephadm; however:
2025-07-10T20:18:18.751 INFO:teuthology.orchestra.run.smithi006.stdout:  Package cephadm is not configured yet.
2025-07-10T20:18:18.752 INFO:teuthology.orchestra.run.smithi006.stdout:
2025-07-10T20:18:18.752 INFO:teuthology.orchestra.run.smithi006.stdout:dpkg: error processing package ceph-mgr-cephadm (--configure):
2025-07-10T20:18:18.752 INFO:teuthology.orchestra.run.smithi006.stdout: dependency problems - leaving unconfigured
...
2025-07-10T20:18:50.420 INFO:teuthology.orchestra.run.smithi006.stdout:Errors were encountered while processing:
2025-07-10T20:18:50.420 INFO:teuthology.orchestra.run.smithi006.stdout: cephadm
2025-07-10T20:18:50.420 INFO:teuthology.orchestra.run.smithi006.stdout: ceph-mgr-cephadm
2025-07-10T20:18:50.638 INFO:teuthology.orchestra.run.smithi006.stderr:W: --force-yes is deprecated, use one of the options starting with --allow instead.
2025-07-10T20:18:50.638 INFO:teuthology.orchestra.run.smithi006.stderr:E: Sub-process /usr/bin/dpkg returned an error code (1)

seen in https://qa-proxy.ceph.com/teuthology/cbodley-2025-07-10_20:01:15-rgw:verify-wip-72020-distro-default-smithi/8380550/teuthology.log

which was tested with a combination of https://github.com/ceph/ceph/pull/64386 (to resolve another debian packaging issue) and https://github.com/ceph/ceph/pull/63912 to enable ubuntu 24.04 in teuthology suites


Related issues 3 (1 open2 closed)

Related to CI - Bug #66914: start building/testing for Ubuntu 24.04 LTS (Noble Numbat)New

Actions
Copied to Ceph - Backport #72190: squid: ubuntu 24: debian/cephadm.postinst fails with: mkdir: cannot create directory '/nonexistent/.ssh': No such file or directoryResolvedCasey BodleyActions
Copied to Ceph - Backport #72191: tentacle: ubuntu 24: debian/cephadm.postinst fails with: mkdir: cannot create directory '/nonexistent/.ssh': No such file or directoryResolvedCasey BodleyActions
Actions #1

Updated by Casey Bodley 8 months ago

  • Related to Bug #66914: start building/testing for Ubuntu 24.04 LTS (Noble Numbat) added
Actions #2

Updated by Casey Bodley 8 months ago

updates from https://github.com/ceph/ceph/pull/55218..

the adduser command changed between jammy and noble, such that it won't create a home directory for --system users unless the --home argument is supplied

Actions #3

Updated by Casey Bodley 8 months ago

  • Status changed from New to Fix Under Review
  • Assignee set to Casey Bodley
  • Backport set to squid tentacle
  • Pull request ID set to 64459
Actions #4

Updated by Kefu Chai 8 months ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Upkeep Bot 8 months ago

  • Merge Commit set to bffa446a89ddae36eb4419057b0eef1c04dbcc59
  • Fixed In set to v20.3.0-1784-gbffa446a89
  • Upkeep Timestamp set to 2025-07-20T10:53:40+00:00
Actions #6

Updated by Upkeep Bot 8 months ago

  • Copied to Backport #72190: squid: ubuntu 24: debian/cephadm.postinst fails with: mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory added
Actions #7

Updated by Upkeep Bot 8 months ago

  • Copied to Backport #72191: tentacle: ubuntu 24: debian/cephadm.postinst fails with: mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory added
Actions #8

Updated by Upkeep Bot 8 months ago

  • Tags (freeform) set to backport_processed
Actions #9

Updated by Elliot Courant 4 months ago

I'm experiencing this error trying to upgrade to v20.2.0 on Debian 12.

cephadm add-repo --version 20.2.0

Then upon running

sudo apt-get upgrade

I receive the following error, similar to the original issue on Ubuntu 24

...
Setting up cephadm (20.2.0-1bookworm) ...
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
mkdir: cannot create directory ‘/nonexistent/.ssh’: No such file or directory
dpkg: error processing package cephadm (--configure):
 installed cephadm package post-installation script subprocess returned error exit status 1
...
Installing new version of config file /etc/bash_completion.d/radosgw-admin ...
Setting system user ceph properties..usermod: no changes
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
..done
Fixing /var/run/ceph ownership....done
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u13) ...
Errors were encountered while processing:
 cephadm
E: Sub-process /usr/bin/dpkg returned an error code (1)

Are there any details I can provide to help with this? I see there are several PRs regarding this issue or one similar, but at least one was merged and then another subsequent PR change the behavior so it's unclear to me if there is a fix pending for the next Ceph patch release.

Actions #10

Updated by Elliot Courant 4 months ago

Following up sorry if this is the wrong place to put this, but it seems like if cephadm was installed on a system pre February 2024 (before this was added https://github.com/ceph/ceph/commit/90bc0369243077c2aaf67f0de2bab5810b217f4e) then the user would be created without a home directory. The post install script does not account for this.

Would it be safe to add the home directory if the path is already unset for a host? And is that something that the post install script should try to work around or would it be better to just have that scenario documented?

Actions

Also available in: Atom PDF