diff --git a/.zuul.d/multinode.yaml b/.zuul.d/multinode.yaml index 67147bde0..b38509a17 100644 --- a/.zuul.d/multinode.yaml +++ b/.zuul.d/multinode.yaml @@ -17,7 +17,7 @@ parent: kuryr-kubernetes-tempest description: | Kuryr-Kubernetes tempest multinode job - nodeset: openstack-two-node + nodeset: openstack-two-node-bionic host-vars: controller: devstack_plugins: @@ -43,6 +43,7 @@ devstack_localrc: KURYR_FORCE_IMAGE_BUILD: true KURYR_K8S_CONTAINERIZED_DEPLOYMENT: true + USE_PYTHON3: true vars: devstack_localrc: KURYR_K8S_CONTAINERIZED_DEPLOYMENT: true diff --git a/devstack/lib/kuryr_kubernetes b/devstack/lib/kuryr_kubernetes index fdbd6d334..bdac00899 100644 --- a/devstack/lib/kuryr_kubernetes +++ b/devstack/lib/kuryr_kubernetes @@ -59,8 +59,8 @@ function ovs_bind_for_kubelet() { port_mac=$(openstack port show "$port_id" -c mac_address -f value) fixed_ips=$(openstack port show "$port_id" -f value -c fixed_ips) - port_ips=($(python -c "print ${fixed_ips}[0]['ip_address']")) - port_subnets=($(python -c "print ${fixed_ips}[0]['subnet_id']")) + port_ips=($(python3 -c "print(${fixed_ips}[0]['ip_address'])")) + port_subnets=($(python3 -c "print(${fixed_ips}[0]['subnet_id'])")) sudo ovs-vsctl -- --may-exist add-port $OVS_BRIDGE "$ifname" \ -- set Interface "$ifname" type=internal \ @@ -79,7 +79,7 @@ function ovs_bind_for_kubelet() { if [[ "$KURYR_SUBNET_DRIVER" == "namespace" ]]; then subnetpool_id=${KURYR_NEUTRON_DEFAULT_SUBNETPOOL_ID:-${SUBNETPOOL_V4_ID}} cidrs=$(openstack subnet pool show "${subnetpool_id}" -c prefixes -f value) - subnetpool_cidr=$(python -c "print ${cidrs}[0]") + subnetpool_cidr=$(python3 -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" @@ -160,7 +160,7 @@ function stop_container { # cidr - The cidr to get the range for # gateway_position - Whether to reserve at 'beginning' or at 'end' function _allocation_range { - python - < $registry_yaml - python - <