Project

General

Profile

Actions

Fix #11081

closed

ceph.conf - $host always expands to localhost instead of actual hostname

Added by Thomas Johnson about 9 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
common
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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")

Actions #1

Updated by Loïc Dachary almost 9 years ago

  • Tracker changed from Bug to Fix
  • Status changed from New to 12
Actions #2

Updated by Chang Liu over 7 years ago

I have tested this. It's still exists.

Actions #4

Updated by Sage Weil about 7 years ago

  • Status changed from 12 to Resolved
Actions

Also available in: Atom PDF