New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: common: get real hostname from container/pod environment #23916

Merged
merged 5 commits into from Oct 29, 2018

Conversation

Projects
None yet
5 participants
@liewegas
Copy link
Member

liewegas commented Sep 4, 2018

Backport of #23798

liewegas added some commits Aug 29, 2018

common/util: pass real hostname when running in kubernetes/rook conta…
…iner

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 44db754)
mon: pay attention to MMonSubscribe's hostname
We weren't populating remote_host anywhere!

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 0acb5cb)
common/hostname: use NODE_NAME environment variable insetad, if set
This is set by rook to the physical node.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e583f80)
mon/MonClient: set hostname in MMonSubscribe message
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit bd7e27d)

# Conflicts:
#	src/mon/MonClient.cc
- conflict with sub_want refactor in master
unittest_config: $host expands to ceph_get_short_hostname(), not host…
…name -s

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

@liewegas liewegas added this to the mimic milestone Sep 4, 2018

@liewegas liewegas requested a review from tchaikov Sep 4, 2018

@smithfarm smithfarm added the common label Sep 4, 2018

@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Oct 23, 2018

@yuriw yuriw merged commit 3238ff6 into ceph:mimic Oct 29, 2018

4 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment