-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add locations to network GET #14406
Comments
I suspect we will need to do something different so you can see the different IPs on each cluster member for yje same interface name. |
OK thanks, looking at the implementation I can see its only returning the configured IPs from the DB, not from the interface itself. So it may be OK to just populate the |
I also note that this logic from Lines 861 to 866 in efae303
|
When running So we might need a |
…rget api extension. fixes canonical#14406 Signed-off-by: David Edler <[email protected]>
…rget api extension. fixes canonical#14406 Signed-off-by: David Edler <[email protected]>
After contemplating on this issue and reading a bit of lxd source, I think adding a target filter to the The other proposed solution, to populate the |
I agree that it's more complex and costly to reach out to other cluster members to populate non-managed networks but I think it's necessary in this case for consistency in API responses. For example, if I have a LXD cluster and a remote configured in |
Just to expand on this a bit. My main contention is that although the UI will know to call |
Agree |
I also agree with the more involved correction of the network api long term. I think we discussed the target filter as well before, which #14419 introduces. Can we merge that right away? It unblocks the UI work by providing a way to fetch the list of available interfaces per member. |
…rget api extension. fixes canonical#14406 Signed-off-by: David Edler <[email protected]>
…rget api extension. fixes canonical#14406 Signed-off-by: David Edler <[email protected]>
Required information
Issue description
When fetching networks, we need the information on which cluster member they exist on. The current
GET 1.0/networks?project=:project&recursion=1
response includes alocations
field. The field is correctly populated for managed networks.However, for non-managed networks, the
locations
field is always null. This seems wrong, because a physical network can exist only on some members, as per the reproducer below.Steps to reproduce
sudo ip link add eth10 type dummy
GET 1.0/networks?project=:project&recursion=1
.eth10
appears in the list withlocations: null
.Expected output would be a
locations: [ "member-name" ]
value for theeth10
network. Because it only exists on exactly one cluster member and not on the others.The text was updated successfully, but these errors were encountered: