3
0
Эх сурвалжийг харах

Warn if no lighthouses were configured on a non lighthouse node (#587)

Nate Brown 3 жил өмнө
parent
commit
48c47f5841
2 өөрчлөгдсөн 8 нэмэгдсэн , 0 устгасан
  1. 4 0
      CHANGELOG.md
  2. 4 0
      main.go

+ 4 - 0
CHANGELOG.md

@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 
 ## [Unreleased]
 ## [Unreleased]
 
 
+### Added
+
+- Warn when a non lighthouse node does not have lighthouse hosts configured. (#587)
+
 ## [1.5.0] - 2021-11-11
 ## [1.5.0] - 2021-11-11
 
 
 ### Added
 ### Added

+ 4 - 0
main.go

@@ -249,6 +249,10 @@ func Main(c *config.C, configTest bool, buildVersion string, logger *logrus.Logg
 		lighthouseHosts[i] = iputil.Ip2VpnIp(ip)
 		lighthouseHosts[i] = iputil.Ip2VpnIp(ip)
 	}
 	}
 
 
+	if !amLighthouse && len(lighthouseHosts) == 0 {
+		l.Warn("No lighthouses.hosts configured, this host will only be able to initiate tunnels with static_host_map entries")
+	}
+
 	lightHouse := NewLightHouse(
 	lightHouse := NewLightHouse(
 		l,
 		l,
 		amLighthouse,
 		amLighthouse,