From a7ca2a096a95d24d4d5010263c90fb93204ac790 Mon Sep 17 00:00:00 2001 From: Tom Denham Date: Thu, 7 Dec 2017 09:49:13 -0500 Subject: [PATCH] subnet/etcdv2/local_manager.go: Fix startup log Print "None" instead of 0.0.0.0/0 if there's no previous subnet to use Fixes #767 --- subnet/etcdv2/local_manager.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subnet/etcdv2/local_manager.go b/subnet/etcdv2/local_manager.go index 6b3b75962f..3fa50b9c5b 100644 --- a/subnet/etcdv2/local_manager.go +++ b/subnet/etcdv2/local_manager.go @@ -378,5 +378,9 @@ func isSubnetConfigCompat(config *Config, sn ip.IP4Net) bool { } func (m *LocalManager) Name() string { - return fmt.Sprintf("Etcd Local Manager with Previous Subnet: %s", m.previousSubnet.String()) + previousSubnet := m.previousSubnet.String() + if m.previousSubnet.Empty() { + previousSubnet = "None" + } + return fmt.Sprintf("Etcd Local Manager with Previous Subnet: %s", previousSubnet) }