]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/util: pass real hostname when running in kubernetes/rook container
authorSage Weil <sage@redhat.com>
Wed, 29 Aug 2018 13:04:59 +0000 (08:04 -0500)
committerSage Weil <sage@redhat.com>
Thu, 30 Aug 2018 13:51:04 +0000 (08:51 -0500)
commit44db75462495e8b0b7c4a368e55cffc91b8679d6
tree1713136bb215cd7fb2cc6bf9432f0c2bb0427387
parent9f9b525a039b05984e76b71557a50fa1293bc957
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>
src/common/util.cc