Comment 2 for bug 1596075

Revision history for this message
Don Bowman (donbowman) wrote :

If I do 254 subnets (using a generation script like below), and then do an 'openstack stack create' using that resultant yaml, there will normally be 1 or more subnets in error.

Some will show:

BadRequest: resources.sn209: Invalid input for operation: Requested subnet with cidr: 172.16.209.0/24 for network: 9cf04cbb-9b32-4798-bdee-93ed28f27827 overlaps with another subnet. Neutron server returns request_ids: ['req-85602ea2-3407-4137-b314-625f0b6dc993']

and some will show:
DBDeadlock: resources.sn28: (pymysql.err.InternalError) (1213, u'Deadlock found when trying to get lock; try restarting transaction')

#!/bin/bash
cat <<EOF1
heat_template_version: 2013-05-23

description: >
  Test subnet creation

parameters:

resources:
EOF1

for i in $(seq 0 254)
do
    cat << EOF
  n$i:
    type: OS::Neutron::Net
    properties:
      name: n$i

  sn$i:
    type: OS::Neutron::Subnet
    properties:
      name: sn$i
      enable_dhcp: True
      network_id: { get_resource: n$i }
      cidr: 172.16.$i.0/24
      allocation_pools:
        - start: 172.16.$i.9
          end: 172.16.$i.254

EOF
done