File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ func (p *ValidateHosts) Run() error {
2828 for _ , h := range p .Config .Spec .Hosts {
2929 p .hncount [h .Metadata .Hostname ]++
3030 p .machineidcount [h .Metadata .MachineID ]++
31- p .privateaddrcount [h .PrivateAddress ]++
31+ if h .PrivateAddress != "" {
32+ p .privateaddrcount [h .PrivateAddress ]++
33+ }
3234 }
3335
3436 return p .parallelDo (
@@ -50,7 +52,7 @@ func (p *ValidateHosts) validateUniqueHostname(h *cluster.Host) error {
5052
5153func (p * ValidateHosts ) validateUniquePrivateAddress (h * cluster.Host ) error {
5254 if p .privateaddrcount [h .PrivateAddress ] > 1 {
53- return fmt .Errorf ("privateAddress %s is not unique: %s" , h .PrivateAddress , h .Metadata .Hostname )
55+ return fmt .Errorf ("privateAddress %q is not unique: %s" , h .PrivateAddress , h .Metadata .Hostname )
5456 }
5557
5658 return nil
You can’t perform that action at this time.
0 commit comments