Ask Your Question
0

race condition assigning port IP for DHCP in Heat

asked 2015-03-08 13:54:08 -0500

don gravatar image

updated 2015-03-29 13:58:28 -0500

It seems https://wiki.openstack.org/wiki/Neutr... might anticipate this problem.

I have a problem, I have a heat template that creates a set of instances using a ResourceGroup, the number being set by a parameter.

When the # created is high (e.g. > 10), it seems there is a race condition that is sometimes hit. When this hits, one of the instances is allocated the IP of the DHCP server, and this fails (and all others fail).

e.g.

  ctrl_net:
    properties:
      name:
        str_replace:
          params:
            $stack_name: {get_param: 'OS::stack_name'}
          template: $stack_name-ctrl-net
    type: OS::Neutron::Net
  ctrl_subnet:
    properties:
      allocation_pools:
      - {end: 172.16.0.254, start: 172.16.0.20}
      cidr: 172.16.0/24
      enable_dhcp: true
      name:
        str_replace:
          params:
            $stack_name: {get_param: 'OS::stack_name'}
          template: $stack_name-ctrl-subnet
      network_id: {get_resource: ctrl_net}
    type: OS::Neutron::Subnet
server_group:
  properties:
    count: {get_param: server_num}
    resource_def:
      properties:
        config_drive: 'true'
        flavor: m1.small
        image: {get_param: server_image}
        key_name: {get_param: server_key}
        name:
          str_replace:
            params:
              $stack_name: {get_param: 'OS::stack_name'}
            template: $stack_name-srv-%index%
        networks:
        - network: {get_resource: ctrl_net}

So what happens is that, in the failure case, instance-1 gets 172.16.0.20, DHCP gets 172.16.0.21, and the next instance wants 172.16.0.21 but fails.

This seems also related to https://bugs.launchpad.net/neutron/+b...

Does anybody else see this? Is there any work-around? I cannot manually override the DHCP port IP address (so e.g. i would like to make it 172.16.0.19 in the above so its not in the allocation range).

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-09 15:14:24 -0500

Steve Baker gravatar image

It looks like you might be triggering neutron bug #1219795. It would help neutron if you could come up with a minimal heat template which triggers the race for you and attach it to the bug.

This looks like justification for raising the priority of that bug too, so you could mention that in a bug comment.

edit flag offensive delete link more

Comments

I have updated the bug w/ a reproducing heat template. The problem comes from having a fixed-ip instance and a variable # of allocated ones. the DHCP agent is assigned the same IP as one of the instances, and then a failure occurs. Thanks.

don gravatar imagedon ( 2015-03-29 13:11:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-08 13:54:08 -0500

Seen: 889 times

Last updated: Mar 29 '15