Fix #11081
closedceph.conf - $host always expands to localhost instead of actual hostname
0%
Description
Attempting to use the $host
metavariable in ceph.conf always results in "localhost
"
rather than the system's actual hostname. This prevents simple distribution of configs
via ceph-deploy. Manual substitution or clever automation is required, defeating the
purpose of the metavar.
Excerpt from ceph.conf:
[global]
osd crush location = host=$host root=not-default
Run:ceph-crush-location --id 1 --type osd
ceph-conf --name=osd.1 --lookup=osd_crush_location
Output:host=localhost root=not-default
System definitely knows its hostname:hostname -s
Output: ceph-node-000
Expected:host=ceph-node-000 root=not-default
Environment:
OS: Ubuntu Server 14.04 LTS
Ceph: ceph version 0.87.1 (283c2e7cfa2457799f534744d7d549f83ea1335e)
Code of Interest:
config.cc:93 - #include "common/config_opts.h"
config.cc:1054 - else if (var == "host") out += host;
config_opts.h:16 - OPTION(host, OPT_STR, "localhost")
Updated by Loïc Dachary almost 9 years ago
- Tracker changed from Bug to Fix
- Status changed from New to 12