Comment 0 for bug 1713975

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

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:

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