Given a ceph.conf that looks like
[osd.42]
host = localhost
mkcephfs used to exit with an obscure error message:
cat: /tmp/mkcephfs.MCBIHvn4Ru/key.*: No such file or directory
"localhost" was never intended to be a valid hostname to use there.
Warn if we see it, and skip the entry. You should use the proper short
hostname of the box.
As init-ceph and mkcephfs share this library, this change affects the
sysvinit scripts too. The behavior *shouldn't* change there (localhost
entries were ignored earlier, too), but you may see this extra
warning. Which is good.
Closes: #3001
Signed-off-by: Tommi Virtanen <tv@inktank.com>
check_host() {
# what host is this daemon assigned to?
host=`$CCONF -c $conf -n $type.$id host`
- [ "$host" = "localhost" ] && host=""
+ if [ "$host" = "localhost" ]; then
+ echo "$0: use a proper short hostname, not 'localhost', in $conf section $type.$id; skipping entry"
+ return 1
+ fi
ssh=""
rootssh=""
sshdir=$PWD