mdns.get_serial_number retries for no reason

Bug #1525019 reported by Tim Simmons on 2015-12-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kiall Mac Innes

Bug Description

The idea of "get_serial_number" in MiniDNS is that the Pool Manager can get the status of a zone on a nameserver at any time, synchronously, as a replacement for a cache value that it doesn't know.

This is going to be seriously hampered if, during the quick, "get me the serial", mdns compares the first serial it gets against
the one randomly hanging around in the zone object:

            if actual_serial is None or actual_serial < zone.serial:
                # TODO(vinod): Account for serial number wrap around.
                retries = retries - retry
                LOG.warn(_LW("Got lower serial for '%(zone)s' to '%(host)s:"
                             "%(port)s'. Expected:'%(es)d'. Got:'%(as)s'."
                             "Retries left='%(retries)d'") %
                         {'zone':, 'host': host,
                          'port': port, 'es': zone.serial,
                          'as': actual_serial, 'retries': retries})
                if retries > 0:
                    # retry again
                # Everything looks good at this point. Return SUCCESS.
                status = 'SUCCESS'

This should simply return the first serial number it sees, because that's what the pool manager wants to know.

Unless I'm mistaken about the idea behind this function.

Tim Simmons (timsim) on 2015-12-16
Changed in designate:
status: New → Triaged
importance: Undecided → High
milestone: none → mitaka-2
sonu (sonu-bhumca11) on 2015-12-21
Changed in designate:
assignee: nobody → sonu (sonu-bhumca11)

Fix proposed to branch: master

Changed in designate:
status: Triaged → In Progress
Changed in designate:
assignee: sonu (sonu-bhumca11) → Kiall Mac Innes (kiall)
Changed in designate:
milestone: mitaka-2 → none

Change abandoned by Graham Hayes (<email address hidden>) on branch: master
Reason: As this review has not been updated recently, we are abandoning it for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers