cluster-relation-joined hook failing with TypeError: unorderable types: str() > NoneType()

Bug #1751338 reported by Ryan Beisner on 2018-02-23
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Designate Charm
Undecided
Unassigned
OpenStack Designate-Bind Charm
High
Ryan Beisner

Bug Description

On the new designate-ha mojo spec, the cluster-relation-joined hook is failing failing with TypeError: unorderable types: str() > NoneType().

00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined Traceback (most recent call last):
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "/var/lib/juju/agents/unit-designate-bind-1/charm/hooks/cluster-relation-joined", line 19, in <module>
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined main()
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 72, in main
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined bus.dispatch(restricted=restricted_mode)
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 375, in dispatch
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined _invoke(other_handlers)
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 351, in _invoke
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined handler.invoke()
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 173, in invoke
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined self._action(*args)
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "/var/lib/juju/agents/unit-designate-bind-1/charm/reactive/designate_bind_handlers.py", line 74, in update_zones_from_peer
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined designate_bind.retrieve_zones(hacluster)
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "lib/charm/openstack/designate_bind.py", line 112, in retrieve_zones
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined DesignateBindCharm.singleton.retrieve_zones(cluster_relation)
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined File "lib/charm/openstack/designate_bind.py", line 440, in retrieve_zones
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined if request_time and request_time > sync_time:
00:14:15.492 2018-02-23 17:02:58 DEBUG cluster-relation-joined TypeError: unorderable types: str() > NoneType()
00:14:15.492 2018-02-23 17:02:58 ERROR juju.worker.uniter.operation runhook.go:113 hook "cluster-relation-joined" failed: exit status 1

Ryan Beisner (1chb1n) wrote :
description: updated
Changed in charm-designate:
status: New → Invalid
Ryan Beisner (1chb1n) wrote :
Ryan Beisner (1chb1n) wrote :
Ryan Beisner (1chb1n) wrote :
Ryan Beisner (1chb1n) wrote :
Ryan Beisner (1chb1n) wrote :

None type appears to be by design:

https://github.com/openstack/charm-designate-bind/blob/master/src/lib/charm/openstack/designate_bind.py#L86

def get_sync_time():
    """Use the singleton from the DesignateBindCharm to retrieve the time of
    the published zone zync target
    :returns: str or None. Current sync target creation time if available, None
                           if not.
    """
    return DesignateBindCharm.singleton.get_sync_time()

Ryan Beisner (1chb1n) wrote :
Ryan Beisner (1chb1n) on 2018-02-23
Changed in charm-designate-bind:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Ryan Beisner (1chb1n)
milestone: none → 18.02
Ryan Beisner (1chb1n) on 2018-02-23
Changed in charm-designate-bind:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/547649
Committed: https://git.openstack.org/cgit/openstack/charm-designate-bind/commit/?id=a178745bb297e4b9806111d9020f7db4d3b66e0e
Submitter: Zuul
Branch: master

commit a178745bb297e4b9806111d9020f7db4d3b66e0e
Author: Ryan Beisner <email address hidden>
Date: Fri Feb 23 12:57:08 2018 -0600

    Fix none type comparison

    Change-Id: I5d571f59bcc8b013596447a19dc7422f6d6b7e8b
    Closes-bug: #1751338

Ryan Beisner (1chb1n) on 2018-03-09
Changed in charm-designate-bind:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers