ocata designate-mdns fails if monasca-statd not installed

Bug #1659638 reported by Corey Bryant
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Critical
Alex Schultz

Bug Description

designate-mdns is failing on ocata if monasca-statsd is not installed.

This is without any options set in the [monasca:statsd] config section, therefore statsd is disabled in this case.

systemd[1]: Started OpenStack Designate DNSaaS mdns.
designate-mdns[16241]: Traceback (most recent call last):
designate-mdns[16241]: File "/usr/bin/designate-mdns", line 6, in <module>
designate-mdns[16241]: from designate.cmd.mdns import main
designate-mdns[16241]: File "/usr/lib/python2.7/dist-packages/designate/cmd/mdns.py", line 26, in <module>
designate-mdns[16241]: from designate.mdns import service as mdns_service
designate-mdns[16241]: File "/usr/lib/python2.7/dist-packages/designate/mdns/service.py", line 23, in <module>
designate-mdns[16241]: from designate.mdns import handler
designate-mdns[16241]: File "/usr/lib/python2.7/dist-packages/designate/mdns/handler.py", line 27, in <module>
designate-mdns[16241]: from designate.mdns import xfr
designate-mdns[16241]: File "/usr/lib/python2.7/dist-packages/designate/mdns/xfr.py", line 29, in <module>
designate-mdns[16241]: class XFRMixin(object):
designate-mdns[16241]: File "/usr/lib/python2.7/dist-packages/designate/mdns/xfr.py", line 34, in XFRMixin
designate-mdns[16241]: def zone_sync(self, context, zone, servers=None):
designate-mdns[16241]: TypeError: 'NoneType' object is not callable

It seems the TypeError occurs somewhere within the @metrics.timed decorator:

    @metrics.timed('mdns.xfr.zone_sync')
    def zone_sync(self, context, zone, servers=None):
        ...

summary: - designate-mdns fails if monasca-statd not installed
+ ocata designate-mdns fails if monasca-statd not installed
Changed in designate:
importance: Undecided → Critical
milestone: none → ocata-rc1
status: New → 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/425982

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

Reviewed: https://review.openstack.org/425982
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=dc34ed43ddbb425fd4b6eb7eeb721daf7d36e147
Submitter: Jenkins
Branch: master

commit dc34ed43ddbb425fd4b6eb7eeb721daf7d36e147
Author: Alex Schultz <email address hidden>
Date: Thu Jan 26 16:58:37 2017 -0700

    Fix noop metrics timed decorator

    Previously if you did not have the monasca statds available, the @timed
    decorator would result in a NoneType error because timed was returning
    None instead of acting as a noop function wrapper. This change updates
    the NoopTimer to properly handle timed being used as a function.

    Change-Id: Ic5543b3503b24aaef960d8b7c0cb38940241cbcb
    Closes-Bug: #1659638

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

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

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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