CloudVE / cloudbridge

A consistent interface to multiple IaaS clouds; in Python.
https://cloudbridge.cloudve.org
MIT License
113 stars 51 forks source link

Gateway detection problem in JS2 from router quota 1 #306

Closed almahmoud closed 2 years ago

almahmoud commented 2 years ago

We are currently using a dummy router to check for FIP connectivity. This particularly comes up when trying to get a gateway from a network eg: list(net.gateways)[0]. This method won't work well in JS2 because of the new default quota of 1 on routers (https://docs.jetstream-cloud.org/general/policies/#router-quota-policies), making the list gateways method not work unless you have 0 routers. https://github.com/CloudVE/cloudbridge/blob/d51933a28677e4f2cc2c077fed036c7851766145/cloudbridge/providers/openstack/services.py#L1236

@nuwang I am wondering if the last comment in the bug report https://bugs.launchpad.net/neutron/+bug/1743480 can be used instead? I.e. a python equivalent of the CLI openstack network list --external --no-share?

nuwang commented 2 years ago

@almahmoud It sure looks like we just remained with the original workaround and never got around to trying the equivalent of openstack network list --external --no-share. The workaround is truly horrendous, and if we can replace it, that would be great. Do you know what the equivalent API call would be? Perhaps we can trace the HTTP calls to find out?

almahmoud commented 2 years ago

@nuwang I believe this is all we need to return the external non-shared network as a gateway https://github.com/CloudVE/cloudbridge/pull/307

vineetjain27 commented 2 years ago

hey @almahmoud I want to work on this please accept my contribution to this issue.

almahmoud commented 2 years ago

Hey @vineetjain27, thank you for your interest, but I’ve already resolved this issue as it was time sensitive for internal use. We’d welcome contributions for some of the other open issues though!