Failed to update the allocation_pools for subnet

Bug #1511909 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
huangtianhua

Bug Description

After the bug fixed: https://bugs.launchpad.net/heat/+bug/1510338, user can update the 'allocation_pools' for neutron subnet resource, common cases are ok, but there is a problem for some special cases(if remove the allocation_pools from template when updating):
1. create a stack with subnet:
****************************
heat_template_version: 2014-10-16
resources:
  subnet:
    type: OS::Neutron::Subnet
    properties:
      network: 3447dd80-14ef-4059-8ea6-35f4fd60ba26
      cidr: 40.0.0.0/24
      allocation_pools: [{start: 40.0.0.10, end: 40.0.0.250}]

2. update the stack, remove the 'allocation_pools' from template
 ****************************
heat_template_version: 2014-10-16
resources:
  subnet:
    type: OS::Neutron::Subnet
    properties:
      network: 3447dd80-14ef-4059-8ea6-35f4fd60ba26
      cidr: 40.0.0.0/24

3. an error raised from neutron: BadRequest: Invalid input for allocation_pools. Reason: Invalid data format for IP pool: 'None'.

Seems neutron doesn't allow None value for allocation_pools, if we pass [] to neutron in this situation then will be ok.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
description: updated
Changed in heat:
importance: Undecided → Medium
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/240654

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/240654
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=b7d70c33d10a1357fd83b43a87d0d39fc1dd0c14
Submitter: Jenkins
Branch: master

commit b7d70c33d10a1357fd83b43a87d0d39fc1dd0c14
Author: huangtianhua <email address hidden>
Date: Sat Oct 31 17:55:54 2015 +0800

    Allow to update subnet without 'allocation_pools'

    Heat allow to update 'allocation_pools' for subnet
    resource in Change: I26f96f712dfa9405814e26a06668db7a608e84b8,
    but the patch introduced a problem: if user remove the
    'allocation_pools' from template when updating, heat will
    pass 'allocation_pools=None' to neutron, but neutron doesn't
    accept the None value for this property, an error will be
    raised: BadRequest: Invalid input for allocation_pools.
    Reason: Invalid data format for IP pool: 'None'. This patch
    will pass [] to neutron to fix this problem.

    Change-Id: I83e56d4494564de97717da6f6c0a9ae2cd9852dd
    Closes-Bug: #1511909

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b1

This issue was fixed in the openstack/heat 6.0.0.0b1 development milestone.

Changed in heat:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.