From 5e51cfdd9e1d1ee3e9df06ff2ee7bd8c7e4b5841 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Mon, 15 Aug 2016 11:11:37 -0700 Subject: [PATCH] etcdmain: report default advertise detection / fallback --- etcdmain/etcd.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etcdmain/etcd.go b/etcdmain/etcd.go index 21e9854a53fa..19e870cb45d1 100644 --- a/etcdmain/etcd.go +++ b/etcdmain/etcd.go @@ -184,6 +184,15 @@ func startEtcdOrProxyV2() { // startEtcd runs StartEtcd in addition to hooks needed for standalone etcd. func startEtcd(cfg *embed.Config) (<-chan struct{}, <-chan error, error) { + defaultHost, dhErr := cfg.IsDefaultHost() + if defaultHost != "" { + if dhErr == nil { + plog.Infof("advertising using default host %q", defaultHost) + } else { + plog.Noticef("failed to detect default host, advertise falling back to %q (%v)", defaultHost, dhErr) + } + } + e, err := embed.StartEtcd(cfg) if err != nil { return nil, nil, err