Merge pull request #54941 from samsungceph/vstart_network_v2

vstart: Pick only CIDR-formatted routes when cephadm enabled

Reviewed-by: Adam King <adking@redhat.com>
This commit is contained in:
Adam King 2024-01-24 10:25:23 -05:00 committed by GitHub
commit bf084a5fd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1651,7 +1651,7 @@ EOF
fi
if [ "$cephadm" -gt 0 ]; then
debug echo Setting mon public_network ...
public_network=$(ip route list | grep -w "$IP" | grep -v default | awk '{print $1}')
public_network=$(ip route list | grep -w "$IP" | grep -v default | grep -E "/[0-9]+" | awk '{print $1}')
ceph_adm config set mon public_network $public_network
fi
fi