From dc0531e62a8328710974a8f6738d848f79cad643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Wed, 9 Dec 2020 07:57:19 +0100 Subject: [PATCH] Bug 1894539: Allow node-ip to function without attachment to VIP network Fall back to IP addresses associated with the default route in the when the node is not on a subnet containing any of the VIPs. Restore the feature implemented in 384c50336098baf83cb66c823cf142408d5ba8cf and broken with 83d05afd1b76b8f0078887f1001e722284235a3a. --- cmd/runtimecfg/node-ip.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/runtimecfg/node-ip.go b/cmd/runtimecfg/node-ip.go index dff8467d..4bacc850 100644 --- a/cmd/runtimecfg/node-ip.go +++ b/cmd/runtimecfg/node-ip.go @@ -144,7 +144,8 @@ func getSuitableIPs(retry bool, vips []net.IP) (chosen []net.IP, err error) { if len(chosen) > 0 || err != nil { return chosen, err } - } else { + } + if len(chosen) == 0 { chosen, err = utils.AddressesDefault(utils.ValidNodeAddress) if len(chosen) > 0 || err != nil { return chosen, err