]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/util: pass real hostname when running in kubernetes/rook container
authorSage Weil <sage@redhat.com>
Tue, 4 Sep 2018 16:25:54 +0000 (11:25 -0500)
committerSage Weil <sage@redhat.com>
Tue, 4 Sep 2018 16:26:06 +0000 (11:26 -0500)
commitdaaa1d33c70ba7f2690c9ab095943f54234f29ff
tree2d814ca05ced3f592990902d7cb3fb89d37f26b8
parentae699615bac534ea496ee965ac6192cb7e0e07c0
common/util: pass real hostname when running in kubernetes/rook container

Rook will set up some environment variables to tell us what pod, pod
namespace, and physical host we are running on.  If we see them, set
'hostname' according to the hardware host, and include the pod info
in our metadata.

This allows the usual host-based logic on Ceph to work correctly, like
placing OSDs automatically in the CRUSH map.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 44db75462495e8b0b7c4a368e55cffc91b8679d6)

# Conflicts:
# src/common/util.cc
- conflict with APPLE special case in newer code
src/common/util.cc