Extend sr-iov drivers to work with subnet-id dynamically

Registered by Alexey Perevalov

Currently SR-IOV controller and binding driver can work only with sriov subnet id defined in kuryr.conf. The same approach was used for pod subnet, but pod subnet looks more persistent than sriov subnets.

SR-IOV subnet can be often created during maintenance. To be able to use this subnet need to reconfigure kuryr-kubernetes and restart it, it could be undesired.

To implement dynamic behaviour following approaches can be consider:
1. Straightforward request from SR-IOV controller driver any time when we have undefined subnet-id in request_vif.
This approach looks simple in implementation part, but has huge drawback, since kuryr-kubernetes has to ask sriov-nic agents on all hosts to get physnet:PF mappings, then get list of networks and subnets
2. Implement it as periodic task and receive all needed information in kuryr-controller and share it with CNI daemon.
We need list of sriov only subnetes in controller driver, the only one way to filter it is using physnet from appropriate network, also we need list of physnet:PF from all sriov network agents. Also we need physnet:PF mapping in the binding driver. We still using physnted as VIF attribute to bind subnet_id with PF.
This approach also has disadvantage due to timer usually has update time, during that time new subnet will be unavailable.
3. There is another approach, to create OpenStack extension and hook any network/subnet creation there and notify kuryr-kubernetes.
https://docs.openstack.org/neutron/ocata/devref/rpc_callbacks.html
http://specs.openstack.org/openstack/neutron-specs/specs/juno/neutron-ml2-mechanismdriver-extensions.html
But this approach also requires subnet/net update after kuryr-kubernetes restart.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Alexey Perevalov
Direction:
Needs approval
Assignee:
Danil Golov
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.