← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1522112] [NEW] ports duplication in the VM XML when using heat and multiple networks

 

Public bug reported:

On latest devstack with the following (part of) local.conf:
REGION_NAME=RegionOne 
Q_PLUGIN=ml2 
ENABLE_TENANT_VLANS=True 
ML2_VLAN_RANGES=RegionOne:2:4090 

disable_service n-net 
enable_service q-svc 
enable_service q-agt 
enable_service q-dhcp 
enable_service q-l3 
enable_service q-meta 
enable_service neutron 
enable_service h-eng h-api h-api-cfn h-api-cw

IMAGE_URLS+=",http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/Images/x86_64
/Fedora-Cloud-Base-20141203-21.x86_64.qcow2"


After a successful stack.sh, run:
neutron quota-update --network 100 --subnet 100 --port 100


Run the following script to create networks:
#!/bin/bash

NET_NUM=20

while [ $NET_NUM -gt 0 ]; do
    neutron net-create NET_${NET_NUM}
    neutron subnet-create --name 10.21.${NET_NUM}.0/24 --gateway 10.21.${NET_NUM}.1 NET_${NET_NUM} 10.21.${NET_NUM}.0/24
    NET_NUM=$[$NET_NUM-1]
done


Create an instance with 20 ports using the following HEAT template:
heat_template_version: 2013-05-23

description: >
    HOT template that just defines a single compute instance.
    Contains just base features.

resources:
    ovs_port_1:
        type: OS::Neutron::Port
        properties:
            network: NET_1

    ovs_port_2:
        type: OS::Neutron::Port
        properties:
            network: NET_2

    ovs_port_3:
        type: OS::Neutron::Port
        properties:
            network: NET_3

    ovs_port_4:
        type: OS::Neutron::Port
        properties:
            network: NET_4

    ovs_port_5:
        type: OS::Neutron::Port
        properties:
            network: NET_5

    ovs_port_6:
        type: OS::Neutron::Port
        properties:
            network: NET_6

    ovs_port_7:
        type: OS::Neutron::Port
        properties:
            network: NET_7

    ovs_port_8:
        type: OS::Neutron::Port
        properties:
            network: NET_8

    ovs_port_9:
        type: OS::Neutron::Port
        properties:
            network: NET_9

    ovs_port_10:
        type: OS::Neutron::Port
        properties:
            network: NET_10

    ovs_port_11:
        type: OS::Neutron::Port
        properties:
            network: NET_11

    ovs_port_12:
        type: OS::Neutron::Port
        properties:
            network: NET_12

    ovs_port_13:
        type: OS::Neutron::Port
        properties:
            network: NET_13

    ovs_port_14:
        type: OS::Neutron::Port
        properties:
            network: NET_14

    ovs_port_15:
        type: OS::Neutron::Port
        properties:
            network: NET_15

    ovs_port_16:
        type: OS::Neutron::Port
        properties:
            network: NET_16

    ovs_port_17:
        type: OS::Neutron::Port
        properties:
            network: NET_17

    ovs_port_18:
        type: OS::Neutron::Port
        properties:
            network: NET_18

    ovs_port_19:
        type: OS::Neutron::Port
        properties:
            network: NET_19

    ovs_port_20:
        type: OS::Neutron::Port
        properties:
            network: NET_20

    ovs_instance:
        type: OS::Nova::Server
        properties:
            image: cirros-0.3.4-x86_64-uec
            flavor: m1.nano
            networks:
                - port: { get_resource: ovs_port_1 }
                - port: { get_resource: ovs_port_2 }
                - port: { get_resource: ovs_port_3 }
                - port: { get_resource: ovs_port_4 }
                - port: { get_resource: ovs_port_5 }
                - port: { get_resource: ovs_port_6 }
                - port: { get_resource: ovs_port_7 }
                - port: { get_resource: ovs_port_8 }
                - port: { get_resource: ovs_port_9 }
                - port: { get_resource: ovs_port_10 }
                - port: { get_resource: ovs_port_11 }
                - port: { get_resource: ovs_port_12 }
                - port: { get_resource: ovs_port_13 }
                - port: { get_resource: ovs_port_14 }
                - port: { get_resource: ovs_port_15 }
                - port: { get_resource: ovs_port_16 }
                - port: { get_resource: ovs_port_17 }
                - port: { get_resource: ovs_port_18 }
                - port: { get_resource: ovs_port_19 }
                - port: { get_resource: ovs_port_20 }

The stack creation fails and nova conductor (n-cond) shows:
2015-12-02 20:07:26.944 ERROR nova.scheduler.utils [req-9ddafa19-5281-4873-8d08-ecee6e6ad0f0 admin admin] [instance: a8c3f7a2-4298-45a6-81c1-3eea81541ca4] Error from last host: devstack-Box (node devstack-Box): [u'Traceback (most recent call last):\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 1902, in _do_build_and_run_instance\n    filter_properties)\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 2066, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance a8c3f7a2-4298-45a6-81c1-3eea81541ca4 was re-scheduled: Unable to create tap device tap0739f4dd-d0: Device or resource busy\n']


Looking at the generated VM XML file there are duplications of (some of) the ports which causes the above.

** Affects: nova
     Importance: Undecided
     Assignee: David Edery (david-edery)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => David Edery (david-edery)

** Project changed: neutron => nova-project

** Also affects: neutron
   Importance: Undecided
       Status: New

** No longer affects: neutron

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1522112

Title:
  ports duplication in the VM XML when using heat and multiple networks

Status in OpenStack Compute (nova):
  New

Bug description:
  On latest devstack with the following (part of) local.conf:
  REGION_NAME=RegionOne 
  Q_PLUGIN=ml2 
  ENABLE_TENANT_VLANS=True 
  ML2_VLAN_RANGES=RegionOne:2:4090 

  disable_service n-net 
  enable_service q-svc 
  enable_service q-agt 
  enable_service q-dhcp 
  enable_service q-l3 
  enable_service q-meta 
  enable_service neutron 
  enable_service h-eng h-api h-api-cfn h-api-cw

  IMAGE_URLS+=",http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/Images/x86_64
  /Fedora-Cloud-Base-20141203-21.x86_64.qcow2"

  
  After a successful stack.sh, run:
  neutron quota-update --network 100 --subnet 100 --port 100

  
  Run the following script to create networks:
  #!/bin/bash

  NET_NUM=20

  while [ $NET_NUM -gt 0 ]; do
      neutron net-create NET_${NET_NUM}
      neutron subnet-create --name 10.21.${NET_NUM}.0/24 --gateway 10.21.${NET_NUM}.1 NET_${NET_NUM} 10.21.${NET_NUM}.0/24
      NET_NUM=$[$NET_NUM-1]
  done

  
  Create an instance with 20 ports using the following HEAT template:
  heat_template_version: 2013-05-23

  description: >
      HOT template that just defines a single compute instance.
      Contains just base features.

  resources:
      ovs_port_1:
          type: OS::Neutron::Port
          properties:
              network: NET_1

      ovs_port_2:
          type: OS::Neutron::Port
          properties:
              network: NET_2

      ovs_port_3:
          type: OS::Neutron::Port
          properties:
              network: NET_3

      ovs_port_4:
          type: OS::Neutron::Port
          properties:
              network: NET_4

      ovs_port_5:
          type: OS::Neutron::Port
          properties:
              network: NET_5

      ovs_port_6:
          type: OS::Neutron::Port
          properties:
              network: NET_6

      ovs_port_7:
          type: OS::Neutron::Port
          properties:
              network: NET_7

      ovs_port_8:
          type: OS::Neutron::Port
          properties:
              network: NET_8

      ovs_port_9:
          type: OS::Neutron::Port
          properties:
              network: NET_9

      ovs_port_10:
          type: OS::Neutron::Port
          properties:
              network: NET_10

      ovs_port_11:
          type: OS::Neutron::Port
          properties:
              network: NET_11

      ovs_port_12:
          type: OS::Neutron::Port
          properties:
              network: NET_12

      ovs_port_13:
          type: OS::Neutron::Port
          properties:
              network: NET_13

      ovs_port_14:
          type: OS::Neutron::Port
          properties:
              network: NET_14

      ovs_port_15:
          type: OS::Neutron::Port
          properties:
              network: NET_15

      ovs_port_16:
          type: OS::Neutron::Port
          properties:
              network: NET_16

      ovs_port_17:
          type: OS::Neutron::Port
          properties:
              network: NET_17

      ovs_port_18:
          type: OS::Neutron::Port
          properties:
              network: NET_18

      ovs_port_19:
          type: OS::Neutron::Port
          properties:
              network: NET_19

      ovs_port_20:
          type: OS::Neutron::Port
          properties:
              network: NET_20

      ovs_instance:
          type: OS::Nova::Server
          properties:
              image: cirros-0.3.4-x86_64-uec
              flavor: m1.nano
              networks:
                  - port: { get_resource: ovs_port_1 }
                  - port: { get_resource: ovs_port_2 }
                  - port: { get_resource: ovs_port_3 }
                  - port: { get_resource: ovs_port_4 }
                  - port: { get_resource: ovs_port_5 }
                  - port: { get_resource: ovs_port_6 }
                  - port: { get_resource: ovs_port_7 }
                  - port: { get_resource: ovs_port_8 }
                  - port: { get_resource: ovs_port_9 }
                  - port: { get_resource: ovs_port_10 }
                  - port: { get_resource: ovs_port_11 }
                  - port: { get_resource: ovs_port_12 }
                  - port: { get_resource: ovs_port_13 }
                  - port: { get_resource: ovs_port_14 }
                  - port: { get_resource: ovs_port_15 }
                  - port: { get_resource: ovs_port_16 }
                  - port: { get_resource: ovs_port_17 }
                  - port: { get_resource: ovs_port_18 }
                  - port: { get_resource: ovs_port_19 }
                  - port: { get_resource: ovs_port_20 }

  The stack creation fails and nova conductor (n-cond) shows:
  2015-12-02 20:07:26.944 ERROR nova.scheduler.utils [req-9ddafa19-5281-4873-8d08-ecee6e6ad0f0 admin admin] [instance: a8c3f7a2-4298-45a6-81c1-3eea81541ca4] Error from last host: devstack-Box (node devstack-Box): [u'Traceback (most recent call last):\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 1902, in _do_build_and_run_instance\n    filter_properties)\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 2066, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance a8c3f7a2-4298-45a6-81c1-3eea81541ca4 was re-scheduled: Unable to create tap device tap0739f4dd-d0: Device or resource busy\n']

  
  Looking at the generated VM XML file there are duplications of (some of) the ports which causes the above.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1522112/+subscriptions


Follow ups