DevStack: Adapt `prefixes` processing
`prefixes` column for the subnetpools was also changed in
python-openstackclient 4.0.0. For better explanations see
I53f56160680555c70fc6d1d87796badf8d2d4e37. This commit adapts our code
to new openstackclient.
Change-Id: I3f6ad0dcbc3da600029ecbe616f5cea6cf0f46cf
(cherry picked from commit 6d56ffc010
)
This commit is contained in:
parent
c343b31bb5
commit
bad716c406
|
@ -25,6 +25,7 @@ function ovs_bind_for_kubelet() {
|
|||
local ifname
|
||||
local service_subnet_cidr
|
||||
local pod_subnet_gw
|
||||
local cidrs
|
||||
|
||||
project_id="$1"
|
||||
port_number="$2"
|
||||
|
@ -77,8 +78,8 @@ function ovs_bind_for_kubelet() {
|
|||
done
|
||||
if [[ "$KURYR_SUBNET_DRIVER" == "namespace" ]]; then
|
||||
subnetpool_id=${KURYR_NEUTRON_DEFAULT_SUBNETPOOL_ID:-${SUBNETPOOL_V4_ID}}
|
||||
subnetpool_cidr=$(openstack subnet pool show "${subnetpool_id}" \
|
||||
-c prefixes -f value | cut -f2)
|
||||
cidrs=$(openstack subnet pool show "${subnetpool_id}" -c prefixes -f value)
|
||||
subnetpool_cidr=$(python -c "print ${cidrs}[0]")
|
||||
sudo ip route add "$subnetpool_cidr" via "$pod_subnet_gw" dev "$ifname"
|
||||
else
|
||||
sudo ip route add "$service_subnet_cidr" via "$pod_subnet_gw" dev "$ifname"
|
||||
|
|
Loading…
Reference in New Issue