-
Notifications
You must be signed in to change notification settings - Fork 620
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
[occm] Replace call to Nova os-interfaces with direct Neutron call #2250
Conversation
/cc @stephenfin @dulek |
@mdbooth: GitHub didn't allow me to request PR reviews from the following users: stephenfin. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
To the best of my knowledge, the only thing exposed by the nova Edit: The code agrees. |
To be clear, this is a tag on the attachment, which is independent of the port. We still get port tags. I'm guessing only the former is available through the metadata service? For the purpose I had in mind I don't think it makes any difference which one we use. |
/lgtm |
/hold for @dulek's review comments. |
/hold cancel |
os-interfaces is a proxy API for neutron's ports list. This has 2 significant disadvantages to us: * It adds the overhead of an extra API call every time it is used * It doesn't contain all the information returned by Neutron
You're thinking of server.Addresses, which preserves order. This change doesn't affect that. The API it replaces also doesn't guarantee order. For confirmation, you can check the code which was linked above: https://github.com/openstack/nova/blob/27.1.0/nova/api/openstack/compute/attach_interfaces.py#L74-L106 Nova is simply proxying this neutron call, and returns results in the same order as neutron. server.Addresses additionally uses Nova's internal network_info cache, which is how it preserves order. |
@mdbooth interesting. so it looks like the neutron default order is a timestamp, right? When an interface is attached to a node, neutron creates a port and the port gets the recent timestamp. If this order corresponds to the os-interfaces order, then I'm fine with a change ;) |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow this looks interesting. Thank you!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zetaab The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…es#2250) os-interfaces is a proxy API for neutron's ports list. This has 2 significant disadvantages to us: * It adds the overhead of an extra API call every time it is used * It doesn't contain all the information returned by Neutron
What this PR does / why we need it:
os-interfaces is a proxy API for neutron's ports list. This has 2 significant disadvantages to us:
This is a non-functional change, although is does reduce the load on nova-api without reducing functionality.
The primary motivation for this is to enable additional filtering using information from ports, e.g. filtering by port tag or the addition of subports as in #2228.
Release note: