Description of problem: Nics are attached to the VM in an order different from the one expected to the user. Example: We create an instance with a given order of ports, please note that ports are of different vnic types (port: 1. normal, 2. direct, 3. direct, 4.normal, 5. normal) also we are using config-drive. openstack server create --image BIGIP --flavor large --nic port-id=vlan1(vnic_type=normal) --nic port-id=vlan2(vnic_type=direct) --nic port-id=vlan3(vnic_type=direct) --nic port-id=vlan4(vnic_type=normal) --nic port-id=vlan5(vnic_type=normal) bigip --config-drive True This results in the NICs being attached to VM in the following order: --nic port-id=vlan1(vnic_type=normal) --nic port-id=vlan4(vnic_type=normal) --nic port-id=vlan5(vnic_type=normal) --nic port-id=vlan2(vnic_type=direct) --nic port-id=vlan3(vnic_type=direct) Version-Release number of selected component (if applicable): rpm -q openstack-nova-common openstack-nova-common-17.0.9-9.el7ost.noarch How reproducible: Everytime Steps to Reproduce: 1. Create a VM with mixed vnic types of normal and direct. 2. Allow to create nics and VM 3. Actual results: nics are not connected to the VM in the order specified. Instead, priority is always given to "normal" and THEN "direct". This results in the OS seeing the NIC's out of order when booting. Onboarding scripts that are looking to configure these NIC's on boot are unable to configure them correctly. Expected results: NIC's are connected to the VM in the sepecified order. Additional info: We are asking if this is a BUG, or if this is expected behavior, if this expected behavior we will need to create a work around. I suspect others have or will run into this?
openstack makes no gurantess about nic or any ordering period. the device role tagging feature https://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved/virt-device-role-tagging.html#use-cases was develop specifcly becasue to provider a way to discover tag to device mapping programatically. onboard sctips should be using the metadata service to determine the device role and configure them accordingly.