Starting central / agent with bind9 backend with no-domains fails.

Bug #1271493 reported by Endre Karlson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Medium
Tim Freund

Bug Description

The backend will attempt to do 1 rndc reload pr domain which will fail badly.

Piece of code in start()
        domains = self.central_service.find_domains(self.admin_context)

        for domain in domains:
            rndc_op = 'reload'
            rndc_call = self._rndc_base() + [rndc_op]
            rndc_call.extend([domain['name']])
            LOG.debug('Calling RNDC with: %s' % " ".join(rndc_call))
            utils.execute(*rndc_call)

It should check if the zone exists on the server before trying to reload it .

Changed in designate:
importance: Undecided → Critical
importance: Critical → Medium
status: New → Confirmed
Revision history for this message
Tim Freund (timfreund) wrote :

Hello - I am going to try to tackle this bug at the OpenStack Upstream Training this weekend unless there are any objections. Thanks!

Changed in designate:
assignee: nobody → Tim Freund (timfreund)
Changed in designate:
status: Confirmed → Triaged
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/95325

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

Reviewed: https://review.openstack.org/95325
Committed: https://git.openstack.org/cgit/stackforge/designate/commit/?id=407eb049e59d4bab06611fb4dee09361cbfadf11
Submitter: Jenkins
Branch: master

commit 407eb049e59d4bab06611fb4dee09361cbfadf11
Author: Tim Freund <email address hidden>
Date: Sat May 24 01:30:27 2014 -0400

    Create missing domains during Bind9Backend start

    The Bind9Backend start function uses rndc to reload each domain. If a
    domain is missing on the Bind9 server, a ProcessExecutionError will be
    raised. This bug was recreated by stopping a bind9 process, deleting
    the cached nzf files in /var/cache/bind, and restarting the process.
    The Designate Central service was then restarted, and the bug triggered.

    The original bug report requested that the Bind9Backend check for zones
    on the server before trying to reload them, but rndc does not appear to
    support that operation.

    A less ideal approach is used: the start function will now catch
    ProcessExecutionError exceptions and issue a command to recreate the
    zone if the caught exception indicates that the zone was not found.

    Another alternative approach could use standard DNS query tools rather
    than rndc to confirm zone existence.

    Change-Id: Id164392f2419fc88257b9f21c1d0ef723280a8b6
    Closes-Bug: #1271493

Changed in designate:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
no longer affects: designate/juno
Changed in designate:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
milestone: juno-2 → 2014.2
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.