mirror of https://github.com/hashicorp/consul
Takes the skip out of the client check.
Without this the merge delegate won't check the segment for non-servers a little below here.pull/3451/head
parent
c283dc4202
commit
5c03cb571d
|
@ -54,23 +54,23 @@ func (md *lanMergeDelegate) NotifyMerge(members []*serf.Member) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ok, dc := isConsulNode(*m)
|
if ok, dc := isConsulNode(*m); ok {
|
||||||
if ok {
|
|
||||||
if dc != md.dc {
|
if dc != md.dc {
|
||||||
return fmt.Errorf("Member '%s' part of wrong datacenter '%s'",
|
return fmt.Errorf("Member '%s' part of wrong datacenter '%s'",
|
||||||
m.Name, dc)
|
m.Name, dc)
|
||||||
}
|
}
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ok, parts := metadata.IsConsulServer(*m)
|
if ok, parts := metadata.IsConsulServer(*m); ok {
|
||||||
if ok && parts.Datacenter != md.dc {
|
if parts.Datacenter != md.dc {
|
||||||
return fmt.Errorf("Member '%s' part of wrong datacenter '%s'",
|
return fmt.Errorf("Member '%s' part of wrong datacenter '%s'",
|
||||||
m.Name, parts.Datacenter)
|
m.Name, parts.Datacenter)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if segment := m.Tags["segment"]; segment != md.segment {
|
if segment := m.Tags["segment"]; segment != md.segment {
|
||||||
return fmt.Errorf("Member '%s' part of wrong segment '%s' (expected '%s')", m.Name, segment, md.segment)
|
return fmt.Errorf("Member '%s' part of wrong segment '%s' (expected '%s')",
|
||||||
|
m.Name, segment, md.segment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue