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

Bug #1716721 reported by Nikita Gerasimov on 2017-09-12
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Li Zhouzhou

Bug Description

heat version - 8.0.4

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

description: test template

    type: OS::Neutron::SubnetPool
      default_prefixlen: 25
      max_prefixlen: 32
      min_prefixlen: 22
        - ""
    type: OS::Neutron::Net
    type: OS::Neutron::Subnet
      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: but expected disabled gateway

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

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
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
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

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

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) on 2018-05-07
Changed in heat:
milestone: none → no-priority-tag-bugs

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

Changed in neutron:
assignee: nobody → Li Zhouzhou (lizhouzhou)
status: New → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers