diff options
| author | Radosław Piliszek <radoslaw.piliszek@gmail.com> | 2020-08-25 16:17:17 +0200 |
|---|---|---|
| committer | Radosław Piliszek <radoslaw.piliszek@gmail.com> | 2020-09-12 12:06:34 +0200 |
| commit | 7a3072e94c76aa2ca28c20c3a77e34a022948efd (patch) | |
| tree | addbcb07ff3b985c771ab03450acfa524404f8f8 /tools | |
| parent | 36c388bb5e98a6e9170a2c8fe99da3597e15eb88 (diff) | |
| download | kolla-ansible-7a3072e94c76aa2ca28c20c3a77e34a022948efd.tar.gz kolla-ansible-7a3072e94c76aa2ca28c20c3a77e34a022948efd.zip | |
[CI] Ensure network is set for Zun
If we don't set it, then Zun chooses one randomly (the first one
from Neutron).
This may break if it is a network that is not available on
target hosts, e.g. external via L3 agent router.
Since capsules do not support nets yet [1], this patch ensures
desired network creation order in init-runonce instead.
[1] https://bugs.launchpad.net/zun/+bug/1895263
Change-Id: Iaa113dcfb826164a2772d2c91d34ec0236be0817
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/init-runonce | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tools/init-runonce b/tools/init-runonce index 30c10c332..ac07c5a72 100755 --- a/tools/init-runonce +++ b/tools/init-runonce @@ -77,22 +77,21 @@ $KOLLA_OPENSTACK_COMMAND image create --disk-format qcow2 --container-format bar --property os_type=${IMAGE_TYPE} --file ${IMAGE_PATH}/${IMAGE} ${IMAGE_NAME} echo Configuring neutron. -if [[ $ENABLE_EXT_NET -eq 1 ]]; then - $KOLLA_OPENSTACK_COMMAND network create --external --provider-physical-network physnet1 \ - --provider-network-type flat public1 - $KOLLA_OPENSTACK_COMMAND subnet create --no-dhcp \ - --allocation-pool ${EXT_NET_RANGE} --network public1 \ - --subnet-range ${EXT_NET_CIDR} --gateway ${EXT_NET_GATEWAY} public1-subnet -fi + +$KOLLA_OPENSTACK_COMMAND router create demo-router $KOLLA_OPENSTACK_COMMAND network create demo-net $KOLLA_OPENSTACK_COMMAND subnet create --subnet-range 10.0.0.0/24 --network demo-net \ --gateway 10.0.0.1 --dns-nameserver 8.8.8.8 demo-subnet - -$KOLLA_OPENSTACK_COMMAND router create demo-router $KOLLA_OPENSTACK_COMMAND router add subnet demo-router demo-subnet + if [[ $ENABLE_EXT_NET -eq 1 ]]; then - $KOLLA_OPENSTACK_COMMAND router set --external-gateway public1 demo-router + $KOLLA_OPENSTACK_COMMAND network create --external --provider-physical-network physnet1 \ + --provider-network-type flat public1 + $KOLLA_OPENSTACK_COMMAND subnet create --no-dhcp \ + --allocation-pool ${EXT_NET_RANGE} --network public1 \ + --subnet-range ${EXT_NET_CIDR} --gateway ${EXT_NET_GATEWAY} public1-subnet + $KOLLA_OPENSTACK_COMMAND router set --external-gateway public1 demo-router fi # Get admin user and tenant IDs |
