Project

General

Profile

Actions

Bug #55451

open

cephadm: error trying to create /home/cephadm which is automounted

Added by Matthew Richardson about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The postinst script for the cephadm deb (from download.ceph.com) has the following:

```
  1. set up (initially empty) .ssh/authorized_keys file
    if ! test -d /home/cephadm/.ssh; then
    mkdir /home/cephadm/.ssh
    chown --reference /home/cephadm /home/cephadm/.ssh
    chmod 0700 /home/cephadm/.ssh
    fi
    if ! test -e /home/cephadm/.ssh/authorized_keys; then
    touch /home/cephadm/.ssh/authorized_keys
    chown --reference /home/cephadm /home/cephadm/.ssh/authorized_keys
    chmod 0600 /home/cephadm/.ssh/authorized_keys
    fi
    ```
    Our hosts have /home automounted, which results in an error as that directory cannot be created.

Most other Ubuntu debs seem to use /var/lib/NAME for service users to avoid this. Could this be done here? Or at least catch the errors if /home isn't writeable?

As an aside, I'm not sure what the benefit of creating an .ssh dir and empty authorized_keys file is here, as opposed to being done in cephadm bootstrap when keys are actually created for the user running cephadm, but that's probably a separate issue!

This looks like a variation on https://tracker.ceph.com/issues/43285

No data to display

Actions

Also available in: Atom PDF