Delete zone action needs manual config reload when using Infoblox

Bug #1840253 reported by Scott Solkhon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Undecided
Scott Solkhon

Bug Description

When using Infoblox as a backend for Designate a zone will go into an ERROR state when it is deleted. To work around this you need to log into the Infoblox appliance and reload the running configuration by pressing the "restart configuration" button, and then issue another `openstack zone delete` command once this is complete.

This is not the same when you create a zone. Some investigation into the code found that the create_zone_auth() function in "designate/backend/impl_infoblox/object_manipulator.py" passes in the parameter "restart_if_needed".

If we compare this to the delete_zone_auth() function we see that it does not pass in the parameter restart_if_needed. This causes the zone to be deleted in Infoblox but the appliance will not reload without manual intervention from an admin. Without this manual intervention the polling action will time out and the zone will go into ERROR state.

Some digging into the Infoblox API documentation shows that 'restart_if_needed' is not supported on a delete zone call, and this suggests why it is not in place already for the provider. However, I have found that there is an API call to restart the Infoblox DNS services though the API, and you can pass this with a parameter to only do this if Infoblox is in a pending restart state for extra caution. i.e:

curl -k1 -u admin:Infoblox -H "Content-Type:application/json" -X POST -d '{"restart_option": "RESTART_IF_NEEDED"}' 'https://127.0.0.1/wapi/v2.5/b25lLmNsdXN0ZXIkMA:Infoblox?_function=restartservices'

Would it be possible to implement this kind of logic into the provider to fix this bug?

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

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

Changed in designate:
assignee: nobody → Scott Solkhon (scott.solkhon)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.opendev.org/c/openstack/designate/+/744013
Committed: https://opendev.org/openstack/designate/commit/d0e1bb18721352007c1c0356658ee73d0bed8c06
Submitter: "Zuul (22348)"
Branch: master

commit d0e1bb18721352007c1c0356658ee73d0bed8c06
Author: Scott Solkhon <email address hidden>
Date: Thu Jul 30 17:28:18 2020 +0100

    Reload Infoblox config after deleting zone

    If you delete a zone using the Infoblox backend
    the zone will be deleted from Infoblox but the
    zone within OpenStack will go into an ERROR state
    unless an operator manually logs into Infoblox
    and issues a reload of the running configuration.

    This commit fixes this bug by issuing a 'restart
    if needed' after deleting the zone. This does not
    happen when creating zones as 'restart if needed'
    can be passed through as a param into that API call.

    Co-Authored-By: Jay Faulkner <email address hidden>
    Change-Id: I296c5f085cce27033461be81ca58c85f095df89a
    Closes-Bug: #1840253

Changed in designate:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 16.0.0.0rc1

This issue was fixed in the openstack/designate 16.0.0.0rc1 release candidate.

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.