designate-mdns/metrics: AttributeError: 'NoneType' object has no attribute 'timed'

Bug #1639248 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Undecided
Alex Schultz

Bug Description

When deploying Designate from Ocata, using Puppet OpenStack CI (RDO packaging), we have this trace:

Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: Traceback (most recent call last):
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: File "/usr/bin/designate-mdns", line 6, in <module>
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: from designate.cmd.mdns import main
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: File "/usr/lib/python2.7/site-packages/designate/cmd/mdns.py", line 26, in <module>
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: from designate.mdns import service as mdns_service
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: File "/usr/lib/python2.7/site-packages/designate/mdns/service.py", line 23, in <module>
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: from designate.mdns import handler
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: File "/usr/lib/python2.7/site-packages/designate/mdns/handler.py", line 27, in <module>
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: from designate.mdns import xfr
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: File "/usr/lib/python2.7/site-packages/designate/mdns/xfr.py", line 29, in <module>
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: class XFRMixin(object):
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: File "/usr/lib/python2.7/site-packages/designate/mdns/xfr.py", line 33, in XFRMixin
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: @metrics.timed('mdns.xfr.zone_sync')
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: File "/usr/lib/python2.7/site-packages/designate/metrics.py", line 110, in timed
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: return self._client.get_timer().timed
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 designate-mdns[31938]: AttributeError: 'NoneType' object has no attribute 'timed'
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: designate-mdns.service: main process exited, code=exited, status=1/FAILURE
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: Unit designate-mdns.service entered failed state.
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: designate-mdns.service failed.
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: designate-mdns.service holdoff time over, scheduling restart.
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: start request repeated too quickly for designate-mdns.service
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: Failed to start OpenStack Designate Mini DNS service.
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: Unit designate-mdns.service entered failed state.
Nov 04 12:37:04 centos-7-osic-cloud1-disk-5199029 systemd[1]: designate-mdns.service failed.

It makes Designate unusable.

Changed in designate:
assignee: nobody → Alex Schultz (alex-schultz)
status: New → Confirmed
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/393829

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

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

commit 22460a959fb847c032b7884ceaad0aea53765cf6
Author: Alex Schultz <email address hidden>
Date: Fri Nov 4 09:41:49 2016 -0600

    Fix noop client getters

    During additional testing, we found that we needed to actually return an
    object for the getters or an attribute error is thrown for the timed
    property. This change fixes the getters to properly return the object
    and adds unit tests for both the noop and monasca clients to ensure the
    right objects are returned for the metrics class. Additionally, gauge is
    not spelled guage.

    Change-Id: I2b229069f925306b1e48b92f2f3eacb2ded39aa6
    Closes-Bug: #1639248

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.0b2

This issue was fixed in the openstack/designate 4.0.0.0b2 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.