ceph-common postinst does not check for ceph user existing externally
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Server |
Fix Released
|
Undecided
|
Eric Desrochers | ||
ceph (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
If the $SERVER_USER name exists in LDAP outside the server the user will not exist in /etc/passwd. This will cause the postinst script to attempt to create the user, which will fail. This user creation/
Current workaround is to define $SERVER_USER in /etc/default/ceph or otherwise export a custom value for this into the environment, so that the postinst script uses a username that does not exist in LDAP, and can be created within the local system. Ideally there would be a more robust check for the existence of the $SERVER_USER perhaps using the 'id' command.
Snippets from /var/lib/
---
[ -f "/etc/default/ceph" ] && . /etc/default/ceph
[ -z "$SERVER_HOME" ] && SERVER_
[ -z "$SERVER_USER" ] && SERVER_USER=ceph
[ -z "$SERVER_NAME" ] && SERVER_NAME="Ceph storage service"
[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph
[ -z "$SERVER_UID" ] && SERVER_UID=64045 # alloc by Debian base-passwd maintainer
[ -z "$SERVER_GID" ] && SERVER_
---
---
case "$1" in
configure)
# create user to avoid running server as root
# 1. create group if not existing
if ! getent group | grep -q "^$SERVER_GROUP:" ; then
addgroup --quiet --system --gid $SERVER_GID \
fi
# 2. create user if not existing
if ! getent passwd | grep -q "^$SERVER_USER:"; then
adduser --quiet \
fi
# 3. adjust passwd entry
usermod -c "$SERVER_NAME" \
-d $SERVER_HOME \
-g $SERVER_GROUP \
---
[Observe impacted scenario]
* lanscape-server installation may fail when the ceph user/group already exists on the system with non-default UID/GID particularly when the user exists in LDAP outside the local system.
tags: | added: sts |
Changed in landscape: | |
status: | New → Confirmed |
assignee: | nobody → Eric Desrochers (slashd) |
status: | Confirmed → In Progress |
description: | updated |
description: | updated |
description: | updated |
Changed in landscape: | |
status: | In Progress → Fix Released |
Changed in landscape: | |
status: | Fix Released → Fix Committed |
Changed in landscape: | |
milestone: | none → 19.11 |
Changed in landscape: | |
milestone: | 19.11 → 19.10.1 |
Changed in landscape: | |
status: | Fix Committed → Fix Released |
While this installation problem occurs .... what your "/etc/nsswitch. conf" looks like ?