"OS::Neutron::Subnet" ignore gateway_ip when subnetpool used

Bug #1716721 reported by Nikita Gerasimov
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Unassigned
neutron
Won't Fix
High
Unassigned

Bug Description

heat version - 8.0.4

Step to reproduce:
1. template:
heat_template_version: 2017-02-24

description: test template

resources:
  test_subnetpool:
    type: OS::Neutron::SubnetPool
    properties:
      default_prefixlen: 25
      max_prefixlen: 32
      min_prefixlen: 22
      prefixes:
        - "192.168.0.0/16"
  test_net1:
    type: OS::Neutron::Net
  test_subnet1:
    type: OS::Neutron::Subnet
    properties:
      network: { get_resource: test_net1 }
      ip_version: 4
      subnetpool: { get_resource: test_subnetpool }
      gateway_ip: null

2. create stack
3. created subnet have gateway IP: 192.168.0.1 but expected disabled gateway

Because of gateway_ip property ignored when subnetpool present there is no way to create subnet without gateway from subnetpool.

Revision history for this message
Rabi Mishra (rabi) wrote :

I think heat is sending 'gateway_ip': None in the request, but neutron is ignoring it.

2017-09-13 05:22:44.089 DEBUG neutron.api.v2.base [req-c7b87873-d640-4ea6-ae80-34843c321d0a demo demo] Request body: {'subnet': {'subnetpool_id': 'e59a988e-0076-436b-b147-e78bb9e86e77', 'dns_nameserve
rs': [], 'name': 'test_stack-test_subnet1-zrfaogklhwls', 'network_id': 'cd2cd3be-5d0a-448e-8e8c-73371f2cbce3', 'enable_dhcp': True, 'gateway_ip': None, 'ip_version': 4}} from (pid=13385) prepare_reque
st_body /opt/stack/neutron/neutron/api/v2/base.py:695

affects: heat → neutron
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This is caused by a neutron subnetpool and gateway implementation.
The easiest way to reproduce is: "neutron -v subnet-create --no-gateway --use-default-subnetpool net3" or use compatible osc command.

Even though {"subnet": {"network_id": "e8a2c627-d296-4504-9e87-9f2a97dbaa89", "ip_version": 4, "gateway_ip": null, "use_default_subnetpool": true}} is passed to the neutron server, the created subnet has a gateway.

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Marking this as High because the behavior is different from CIDR and subnetpool and this is confusing.

Changed in neutron:
assignee: nobody → Yang Li (yang-li)
status: Confirmed → In Progress
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: Yang Li (yang-li) → nobody
status: In Progress → New
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/507350
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/669107

Changed in neutron:
assignee: nobody → Li Zhouzhou (lizhouzhou)
status: New → In Progress
Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: Li Zhouzhou (lizhouzhou) → nobody
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Slawek Kaplonski (<email address hidden>) on branch: master
Review: https://review.opendev.org/669107
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Bug closed due to lack of activity, please feel free to reopen if needed.

Changed in neutron:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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