Skip to content

Commit cf36c08

Browse files
committed
Check router_interface_distributed if dvr enabled
Previously we always checked for non-distributed port which resulted in failure on retry of configure phase.
1 parent bf8edd2 commit cf36c08

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

zaza/openstack/utilities/openstack.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,9 +1569,13 @@ def plug_subnet_into_router(neutron_client, router, network, subnet):
15691569
logging.error('Unable to locate provider router %s', router)
15701570
sys.exit(1)
15711571
else:
1572+
device_owner = 'network:router_interface'
1573+
if dvr_enabled():
1574+
device_owner = f'{device_owner}_distributed'
1575+
15721576
# Check to see if subnet already plugged into router
15731577
ports = neutron_client.list_ports(
1574-
device_owner='network:router_interface',
1578+
device_owner=device_owner,
15751579
network_id=network['id'])
15761580
if len(ports['ports']) == 0:
15771581
logging.info('Adding interface from subnet to %s' % (router))

0 commit comments

Comments
 (0)