sync_neutron_to_infoblox tool fails after deleting a network from NIOS

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

Bug Description

sync_neutron_to_infoblox tool fails after deleting a network in NIOS side.Because code at
https://github.com/openstack/networking-infoblox/blob/master/networking_infoblox/tools/sync_neutron_to_infoblox.py#L215
assumes that if db entry for network_view mapping with network is there in infoblox_db in openstack neutron database then it will be there in NIOS.

Steps to reporduce:
1) Create a network in Openstack
2) Run the sync_neutron_to_infoblox tool
3) Network gets created in NIOS
4) Delete the network from NIOS
5) Run the sync_neutron_to_infoblox tool
6) Failure shown below is observed.

2017-03-17 13:50:57.436 14828 CRITICAL neutron [req-5de81372-2366-4b0f-bb06-9dcfb260fb93 e34cc99e5719469d9ee1a91234c50649 575ca1bab9e145a2af19498815c3bf53 - - -] InfobloxCannotCreateObject: Cannot create 'fixedaddress' object(s):
{ "Error": "AdmConDataError: None (IBDataConflictError: IB.Data.Conflict:Cannot find the parent network for the fixed address 10.78.129.8.)", "code": "Client.Ibap.Data.Conflict", "text": "Cannot find the parent network for the fixed address 10.78.129.8." }
[code 400]
2017-03-17 13:50:57.436 14828 ERROR neutron Traceback (most recent call last):
2017-03-17 13:50:57.436 14828 ERROR neutron File "sync_neutron_to_infoblox.py", line 407, in <module>
2017-03-17 13:50:57.436 14828 ERROR neutron main()
2017-03-17 13:50:57.436 14828 ERROR neutron File "sync_neutron_to_infoblox.py", line 114, in main
2017-03-17 13:50:57.436 14828 ERROR neutron sync_neutron_to_infoblox(context, credentials, grid_manager)
2017-03-17 13:50:57.436 14828 ERROR neutron File "sync_neutron_to_infoblox.py", line 341, in sync_neutron_to_infoblox
2017-03-17 13:50:57.436 14828 ERROR neutron device_owner)
2017-03-17 13:50:57.436 14828 ERROR neutron File "/usr/local/lib/python2.7/dist-packages/networking_infoblox/neutron/common/ipam.py", line 549, in allocate_specific_ip
2017-03-17 13:50:57.436 14828 ERROR neutron ea_ip_address)
2017-03-17 13:50:57.436 14828 ERROR neutron File "/usr/local/lib/python2.7/dist-packages/networking_infoblox/neutron/common/ip_allocator.py", line 263, in allocate_given_ip
2017-03-17 13:50:57.436 14828 ERROR neutron network_view, mac, ip, extattrs)
2017-03-17 13:50:57.436 14828 ERROR neutron File "/usr/local/lib/python2.7/dist-packages/infoblox_client/object_manager.py", line 240, in create_fixed_address_for_given_ip
2017-03-17 13:50:57.436 14828 ERROR neutron check_if_exists=False)
2017-03-17 13:50:57.436 14828 ERROR neutron File "/usr/local/lib/python2.7/dist-packages/infoblox_client/objects.py", line 311, in create
2017-03-17 13:50:57.436 14828 ERROR neutron local_obj.return_fields)
2017-03-17 13:50:57.436 14828 ERROR neutron File "/usr/local/lib/python2.7/dist-packages/infoblox_client/connector.py", line 41, in callee
2017-03-17 13:50:57.436 14828 ERROR neutron return func(*args, **kwargs)
2017-03-17 13:50:57.436 14828 ERROR neutron File "/usr/local/lib/python2.7/dist-packages/infoblox_client/connector.py", line 313, in create_object
2017-03-17 13:50:57.436 14828 ERROR neutron code=r.status_code)
2017-03-17 13:50:57.436 14828 ERROR neutron InfobloxCannotCreateObject: Cannot create 'fixedaddress' object(s):
{ "Error": "AdmConDataError: None (IBDataConflictError: IB.Data.Conflict:Cannot find the parent network for the fixed address 10.78.129.8.)", 2017-03-17 13:50:57.436 14828 ERROR neutron "code": "Client.Ibap.Data.Conflict", 2017-03-17 13:50:57.436 14828 ERROR neutron "text": "Cannot find the parent network for the fixed address 10.78.129.8." 2017-03-17 13:50:57.436 14828 ERROR neutron }
[code 400]

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-infoblox (master)

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

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

Reviewed: https://review.openstack.org/464612
Committed: https://git.openstack.org/cgit/openstack/networking-infoblox/commit/?id=96ac9774cbaee0bc388217bf82ff3b3250a50363
Submitter: Jenkins
Branch: master

commit 96ac9774cbaee0bc388217bf82ff3b3250a50363
Author: Akash Deep <email address hidden>
Date: Mon May 15 16:00:27 2017 +0530

    Fix for sync tool failure after deleting a network from NIOS.

    Added check in sync_neutron_to_infoblox tool to validate if network
    observed in network_view_mapping table in openstack neutron
    database is available at NIOS, if it is not then create again.

    Change-Id: I2f82fcea34e9c28e43951ad303c95183d556e608
    Closes-Bug: #1690788

Changed in networking-infoblox:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-infoblox (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/465818

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-infoblox (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/465819

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-infoblox (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/465820

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-infoblox (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/465822

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-infoblox (stable/newton)

Reviewed: https://review.openstack.org/465819
Committed: https://git.openstack.org/cgit/openstack/networking-infoblox/commit/?id=bec5c29e858296067f566ac1ef5c2764ccdaf3ec
Submitter: Jenkins
Branch: stable/newton

commit bec5c29e858296067f566ac1ef5c2764ccdaf3ec
Author: Akash Deep <email address hidden>
Date: Mon May 15 16:00:27 2017 +0530

    Fix for sync tool failure after deleting a network from NIOS.

    Added check in sync_neutron_to_infoblox tool to validate if network
    observed in network_view_mapping table in openstack neutron
    database is available at NIOS, if it is not then create again.

    Change-Id: I2f82fcea34e9c28e43951ad303c95183d556e608
    Closes-Bug: #1690788

tags: added: in-stable-newton
tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-infoblox (stable/mitaka)

Reviewed: https://review.openstack.org/465820
Committed: https://git.openstack.org/cgit/openstack/networking-infoblox/commit/?id=df543b05e631c64f577f33a8e396691376158189
Submitter: Jenkins
Branch: stable/mitaka

commit df543b05e631c64f577f33a8e396691376158189
Author: Akash Deep <email address hidden>
Date: Mon May 15 16:00:27 2017 +0530

    Fix for sync tool failure after deleting a network from NIOS.

    Added check in sync_neutron_to_infoblox tool to validate if network
    observed in network_view_mapping table in openstack neutron
    database is available at NIOS, if it is not then create again.

    Change-Id: I2f82fcea34e9c28e43951ad303c95183d556e608
    Closes-Bug: #1690788

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-infoblox (stable/ocata)

Reviewed: https://review.openstack.org/465818
Committed: https://git.openstack.org/cgit/openstack/networking-infoblox/commit/?id=deb0681bd61286d363fb5380b63dd74e92db061f
Submitter: Jenkins
Branch: stable/ocata

commit deb0681bd61286d363fb5380b63dd74e92db061f
Author: Akash Deep <email address hidden>
Date: Mon May 15 16:00:27 2017 +0530

    Fix for sync tool failure after deleting a network from NIOS.

    Added check in sync_neutron_to_infoblox tool to validate if network
    observed in network_view_mapping table in openstack neutron
    database is available at NIOS, if it is not then create again.

    Change-Id: I2f82fcea34e9c28e43951ad303c95183d556e608
    Closes-Bug: #1690788

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-infoblox (stable/liberty)

Reviewed: https://review.openstack.org/465822
Committed: https://git.openstack.org/cgit/openstack/networking-infoblox/commit/?id=8ac2a02876582d7a543b8b38a6671a953596cd8d
Submitter: Jenkins
Branch: stable/liberty

commit 8ac2a02876582d7a543b8b38a6671a953596cd8d
Author: Akash Deep <email address hidden>
Date: Mon May 15 16:00:27 2017 +0530

    Fix for sync tool failure after deleting a network from NIOS.

    Added check in sync_neutron_to_infoblox tool to validate if network
    observed in network_view_mapping table in openstack neutron
    database is available at NIOS, if it is not then create again.

    Change-Id: I2f82fcea34e9c28e43951ad303c95183d556e608
    Closes-Bug: #1690788

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.