Browse Source

etcdserver: add discovery warning message

Jonathan Boulle 11 years ago
parent
commit
682008724d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      etcdserver/server.go

+ 3 - 0
etcdserver/server.go

@@ -122,6 +122,9 @@ func NewServer(cfg *ServerConfig) *EtcdServer {
 		// TODO: add context for PeerURLs
 		// TODO: add context for PeerURLs
 		n = raft.StartNode(m.ID, cfg.Cluster.IDs(), 10, 1)
 		n = raft.StartNode(m.ID, cfg.Cluster.IDs(), 10, 1)
 	} else {
 	} else {
+		if cfg.DiscoveryURL != "" {
+			log.Printf("etcd: warn: ignoring discovery URL: etcd has already been initialized and has a valid log in %q", waldir)
+		}
 		var index int64
 		var index int64
 		snapshot, err := ss.Load()
 		snapshot, err := ss.Load()
 		if err != nil && err != snap.ErrNoSnapshot {
 		if err != nil && err != snap.ErrNoSnapshot {