mdns.get_serial_number retries for no reason

Bug #1525019 reported by Tim Simmons
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Designate
In Progress
High
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.

https://github.com/openstack/designate/blob/master/designate/pool_manager/service.py#L648

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:
https://github.com/openstack/designate/blob/master/designate/mdns/notify.py#L130-L148

            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': zone.name, 'host': host,
                          'port': port, 'es': zone.serial,
                          'as': actual_serial, 'retries': retries})
                if retries > 0:
                    # retry again
                    time.sleep(retry_interval)
                    continue
                else:
                    break
            else:
                # Everything looks good at this point. Return SUCCESS.
                status = 'SUCCESS'
                break

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)
Changed in designate:
status: New → Triaged
importance: Undecided → High
milestone: none → mitaka-2
sonu (sonu-bhumca11)
Changed in designate:
assignee: nobody → sonu (sonu-bhumca11)
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/270690

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on designate (master)

Change abandoned by Graham Hayes (<email address hidden>) on branch: master
Review: https://review.openstack.org/270690
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.