From ece78c448dded73eed9e70f236277f96f5c1ca12 Mon Sep 17 00:00:00 2001 From: Artur Korzeniewski Date: Tue, 10 Oct 2017 18:19:10 +0200 Subject: [PATCH] Ceph subnet_range calculation improvement Gate scripts are trying to calculate the SUBNET_RANGE basing on IP address of default interface. There is ipcalc tool used. The issue is that based on infra datacenter selected to run the VM gate, the default interface can have address with /32 network. If IP has /32 network, the ipcalc would not calculate the network address, for example 192.168.0.0/24, which is needed for ceph to be configured. As a workaround, try to change the /32 to /24 after getting the IP of the default interface, and then calculate the network address. Change-Id: Ia2858c6a2b4c56fbc42ef06b5f157625a56beb3c --- tools/gate/funcs/network.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gate/funcs/network.sh b/tools/gate/funcs/network.sh index 1cf45cfe87..c178dcdb91 100755 --- a/tools/gate/funcs/network.sh +++ b/tools/gate/funcs/network.sh @@ -17,7 +17,7 @@ function net_default_iface { } function net_default_host_addr { - sudo ip addr | awk "/inet / && /$(net_default_iface)/{print \$2; exit }" + sudo ip addr | awk "/inet / && /$(net_default_iface)/{print \$2; exit }" | sed 's/\/32/\/24/' } function net_default_host_ip {