create subnet fails if we use non-default IPAM Driver

Bug #1713975 reported by Akash Deep
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-infoblox
Fix Released
Undecided
Akash Deep
neutron
Fix Released
Undecided
Akash Deep

Bug Description

Using ipam_driver=infoblox in neutron.conf, create subnet fails with following error:

Aug 30 13:09:07 localhost neutron-server[767]: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/db/api.py", line 124, in wrapped
Aug 30 13:09:07 localhost neutron-server[767]: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m return f(*dup_args, **dup_kwargs)
Aug 30 13:09:07 localhost neutron-server[767]: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/db/db_base_plugin_v2.py", line 689, in _create_subnet_postcommit
Aug 30 13:09:07 localhost neutron-server[767]: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m result, ipam_subnet)
Aug 30 13:09:07 localhost neutron-server[767]: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/db/ipam_pluggable_backend.py", line 453, in add_auto_addrs_on_network_ports
Aug 30 13:09:07 localhost neutron-server[767]: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m if subnet['id'] != ipam_subnet.subnet_manager.neutron_id:
Aug 30 13:09:07 localhost neutron-server[767]: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00mAttributeError: 'InfobloxSubnet' object has no attribute 'subnet_manager'

Further verified code in ipam_pluggable_backend.py file and observed following code at https://github.com/openstack/neutron/blob/stable/pike/neutron/db/ipam_pluggable_backend.py#L453

        # TODO(kevinbenton): remove after bug/1666493 is resolved
        if subnet['id'] != ipam_subnet.subnet_manager.neutron_id:
            raise RuntimeError(
                "Subnet manager doesn't match subnet. %s != %s"
                % (subnet['id'], ipam_subnet.subnet_manager.neutron_id))

As ipam_subnet.subnet_manager is defined specific to the neutron default ipam driver at https://github.com/openstack/neutron/blob/stable/pike/neutron/ipam/drivers/neutrondb_ipam/driver.py#L129 , it should not be used in generic file such as ipam_pluggable_backend.py which is used by other ipam_drivers.

Akash Deep (akashdeep)
description: updated
Revision history for this message
Akash Deep (akashdeep) wrote :

~kevinbenton can you please look at this.

Revision history for this message
Kevin Benton (kevinbenton) wrote :

Hi Akash,

Can you propose a bug to remove that logic since the bug it was added for has been resolved?

Revision history for this message
Akash Deep (akashdeep) wrote :

This is duplicate of bugid: https://bugs.launchpad.net/neutron/+bug/1707307 which was fixed with
patch https://review.openstack.org/#/c/490213/1 in master branch and cherry-pick to stable/pike with patch https://review.openstack.org/#/c/499533/1.

Hence marking as duplicate and resolved.

Changed in networking-infoblox:
status: New → Fix Committed
Changed in neutron:
status: New → Fix Committed
Changed in networking-infoblox:
assignee: nobody → Akash Deep (akashdeep)
Changed in neutron:
assignee: nobody → Akash Deep (akashdeep)
Changed in networking-infoblox:
status: Fix Committed → Fix Released
Changed in neutron:
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.