mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-05 12:45:38 +01:00
elasticetcd: set PURLs instead of CURLs when volunteering
The initial-cluster must be formed using the Peer URLs, and not the Client URLs. The initial-cluster is formed by the urls of the nominees, which are inturn set to the urls set on volunteering. Till now, I was setting the CURLs on nomination mistakenly, and somehow this worked. I have no idea how.
This commit is contained in:
@@ -10,12 +10,12 @@ import (
|
||||
func (ee *ElasticEtcd) volunteerSelf() error {
|
||||
key := volunteerPrefix + ee.conf.Name
|
||||
var val string
|
||||
// Need to set advertisable CURLs here as the initial cluster lists for new
|
||||
// servers will be formed from this, the default CURL is not advertisable.
|
||||
if isDefaultCURL(ee.conf.CURLs) {
|
||||
val = defaultACURLs.String()
|
||||
// Need to set advertisable PURLs here as the initial cluster lists for new
|
||||
// servers will be formed from this, the default PURL is not advertisable.
|
||||
if isDefaultPURL(ee.conf.PURLs) {
|
||||
val = defaultAPURLs.String()
|
||||
} else {
|
||||
val = ee.conf.CURLs.String()
|
||||
val = ee.conf.PURLs.String()
|
||||
}
|
||||
|
||||
_, err := ee.cli.Put(ee.cli.Ctx(), key, val, clientv3.WithLease(ee.session.Lease()))
|
||||
|
||||
Reference in New Issue
Block a user