Infoblox driver get_dns_view error after changing multi_tenant option

Bug #1752349 reported by Erich Birngruber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
High
Russell Tweed

Bug Description

The Infoblox backend driver does a wrong comparison for the multi_tenant pool target option, when it was changed from "True" to "False":

see https://git.openstack.org/cgit/openstack/designate/tree/designate/backend/impl_infoblox/object_manipulator.py#n99

the problematic line:
if not self.connector.multi_tenant:

After changing this from True to False in the pools.yaml file and updating the pool info in the database, the value in the designate database is a VARCHAR '0'.

This does not work correctly for the "if not" comparison above, therefore it will always keep taking the wrong code path.

A fix would be to check for an empty value or the '0' value from the database:
if not self.connector.multi_tenant or self.connector.multi_tenant == '0':

Best,
Erich

Changed in designate:
status: New → Triaged
importance: Undecided → High
tags: added: low-hanging-fruit
Revision history for this message
Russell Tweed (russell-tweed) wrote :

Seems like the underlying issue is why that value's getting to set to VARCHAR '0' rather than something that actually parses as false.

However, adding the second comparison as per the description seems like it'd work for now.

Changed in designate:
status: Triaged → Confirmed
assignee: nobody → Russell Tweed (russell-tweed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

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

Changed in designate:
status: Confirmed → In Progress
Revision history for this message
Graham Hayes (grahamhayes) wrote :

Yeah, I would suggest that the issue is in the YAML loading from the pools.yaml file.

We should still deal with the "0" as it may already be in peoples DB's, but fixing the designate-manage command's parsing is a better long term solution

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

Reviewed: https://review.openstack.org/550523
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=e4de365775c1f6f2722f2ad3109f3349d9a5a691
Submitter: Zuul
Branch: master

commit e4de365775c1f6f2722f2ad3109f3349d9a5a691
Author: Russell Tweed <email address hidden>
Date: Wed Mar 7 16:30:36 2018 +0000

    Resolve get_dns_view error after selecting multi-tenant view

    Adds a second comparison check when deciding whether to display the single
    tenant view or multi-tenant view in Infoblox. The issue is that the DB field
    is set to '0', which is not interpreted as false.

    Change-Id: Id0fac71cc6d82123a7ee5d5983467acd1b8e5a9e
    Closes-Bug: 1752349

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/550634

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/queens)

Reviewed: https://review.openstack.org/550634
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=fd5c3ccb6df50e4ab910da43b76b3424dac97d97
Submitter: Zuul
Branch: stable/queens

commit fd5c3ccb6df50e4ab910da43b76b3424dac97d97
Author: Russell Tweed <email address hidden>
Date: Wed Mar 7 16:30:36 2018 +0000

    Resolve get_dns_view error after selecting multi-tenant view

    Adds a second comparison check when deciding whether to display the single
    tenant view or multi-tenant view in Infoblox. The issue is that the DB field
    is set to '0', which is not interpreted as false.

    Change-Id: Id0fac71cc6d82123a7ee5d5983467acd1b8e5a9e
    Closes-Bug: 1752349
    (cherry picked from commit e4de365775c1f6f2722f2ad3109f3349d9a5a691)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 6.0.1

This issue was fixed in the openstack/designate 6.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 7.0.0.0b1

This issue was fixed in the openstack/designate 7.0.0.0b1 development milestone.

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.