mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
feat(discovery): adjust boot order to find peers
The boot order for peers is -discovery, -peers, log data, forming new cluster itself. Special rules: 1. If discovery succeeds, it would find peers specified by discover URL only. 2. Etcd would fail when meeting bad -discovery, no -peers and log data. Add TestDiscoveryDownNoBackupPeersWithDataDir as the test.
This commit is contained in:
@@ -94,7 +94,9 @@ func (r *Registry) clientURL(name string) (string, bool) {
|
||||
return "", false
|
||||
}
|
||||
|
||||
// Retrieves the host part of peer URL for a given node by name.
|
||||
// TODO(yichengq): have all of the code use a full URL with scheme
|
||||
// and remove this method
|
||||
// PeerHost retrieves the host part of peer URL for a given node by name.
|
||||
func (r *Registry) PeerHost(name string) (string, bool) {
|
||||
rawurl, ok := r.PeerURL(name)
|
||||
if ok {
|
||||
|
||||
Reference in New Issue
Block a user