mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: print out correct restored cluster info
Before this PR, it always prints nil because cluster info has not been covered when print: ``` 2015-10-02 14:00:24.353631 I | etcdserver: loaded cluster information from store: <nil> ```
This commit is contained in:
parent
f8a4d1f01b
commit
18c568bc82
@ -223,6 +223,13 @@ func (c *cluster) Recover() {
|
||||
c.members, c.removed = membersFromStore(c.store)
|
||||
c.version = clusterVersionFromStore(c.store)
|
||||
MustDetectDowngrade(c.version)
|
||||
|
||||
for _, m := range c.members {
|
||||
plog.Infof("added member %s %v to cluster %s from store", m.ID, m.PeerURLs, c.id)
|
||||
}
|
||||
if c.version != nil {
|
||||
plog.Infof("set the cluster version to %v from store", version.Cluster(c.version.String()))
|
||||
}
|
||||
}
|
||||
|
||||
// ValidateConfigurationChange takes a proposed ConfChange and
|
||||
|
@ -292,9 +292,6 @@ func NewServer(cfg *ServerConfig) (*EtcdServer, error) {
|
||||
plog.Infof("recovered store from snapshot at index %d", snapshot.Metadata.Index)
|
||||
}
|
||||
cfg.Print()
|
||||
if snapshot != nil {
|
||||
plog.Infof("loaded cluster information from store: %s", cl)
|
||||
}
|
||||
if !cfg.ForceNewCluster {
|
||||
id, cl, n, s, w = restartNode(cfg, snapshot)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user