senlin nova vnic-type support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
senlin |
New
|
Undecided
|
Unassigned |
Bug Description
Folk,
Not sure how to deal with this issue here or it's going to be feature request. In my cloud we have SR-IOV compute pool which required --binding:vnic-type direct (Default is normal for linux-bridge/OVS).
Related that i talked to Duc here: http://
As per our conversation i made following code change to my local repo to test out but look like i am missing something (I am not very expert in python so trying to understand what else need to change in code)
https:/
I made following changes in code to test this feature in lab.
port_attrs = {
}
...
...
NETWORK_KEYS = (
PORT, BINDING_VNIC_TYPE, FIXED_IP, NETWORK, PORT_SECURITY_
) = (
'port', 'binding_
)
...
...
NETWORKS: schema.List(
_('List of networks for the server.'),
I have created profile with following options (binding_vnic_type: direct)
type: os.nova.server
version: 1.0
properties:
name: senlin-sriov-vm
flavor: m1.small
image: "cirros"
networks:
- network: vlan66
binding_
metadata:
test_key: test_value
user_data: |
#!/bin/sh
echo 'hello, world' > /tmp/test_file
And i have created cluster but look like its still creating port with binding_vnic_type: normal. (Trying to understand how does this attributes get pass to nova)
It seems we need to made more change in code to pass correct value to nova.
After working with Duc on IRC made some progress. After adding following snippet i am able to spun up sriov instances.
if fixed_ip:
port_ attr['fixed_ ips'] = [fixed_ip]
security_ groups = net_spec. get(self. PORT_SECURITY_ GROUPS, [])
port_ attr['security_ groups' ] = security_groups self.VNIC_ TYPE, None) <---------------- Doesn't work (trying to find why my input to profile not getting pass here)
port_ attr['binding_ vnic_type' ] = vnic_type obj).port_ create( **port_ attr)
if security_groups:
#vnic_type = net.get(
vnic_type = 'direct' <---------------- It works,
if vnic_type:
try:
port = self.network(
return port, None
except exc.InternalError as ex:
return None, ex