Implement heartbeat for FileDriver

Bug #1664559 reported by mengalong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tooz
Fix Released
Medium
mengalong

Bug Description

RT, Recently I'm using the FileDriver in my project for ceilometer-agent-central.
But the FileDriver haven't implement the api heartbeat().
Thus there are some disadvantages for my project.
I known that ZookeeperDriver is the reference implemtation, but after talk out, we think the FileDriver is more suitable for my project.

So, I want to know is there any future plans to implement the api heartbeat() for FileDriver.

Revision history for this message
Julien Danjou (jdanjou) wrote :

No plan but that'd be a good idea.

summary: - Is there any future plans to implement the api heartbeat for FileDriver
+ Implement heartbeat for FileDriver
Changed in python-tooz:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
mengalong (mengalong) wrote :

okay, I'll try to submit a patch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tooz (master)

Fix proposed to branch: master
Review: https://review.openstack.org/453095

Changed in python-tooz:
assignee: nobody → mengalong (alongmeng)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tooz (master)

Reviewed: https://review.openstack.org/453095
Committed: https://git.openstack.org/cgit/openstack/tooz/commit/?id=92c83b2b2ef7877bd448329cad5138da7746c8bf
Submitter: Jenkins
Branch: master

commit 92c83b2b2ef7877bd448329cad5138da7746c8bf
Author: mengalong <email address hidden>
Date: Tue Apr 4 18:02:32 2017 +0800

    Implement heartbeat for FileDriver

    As the title said this patch just implement the heartbeat api for
    FileDriver.
    1. You can delivery the parameter 'timeout' via the connect url like
       this: file:///tmp/test_coord?timeout=10. Otherwise the default timeout
       is 10secs.
    2. We can call the function: heartbeat(self) periodic
       to make sure the specific member is alive.
    3. When you call get_members(), it will compare the last modify time of
       the file with current time, if the delta_seconds greater than
       the timeout, it will mark the member status is dead and will not return
       the member_id.

    Change-Id: I8617e17fc1a74e70d7eb5b6f8e12dc9d9a66c755
    Closes-Bug: #1664559

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

This issue was fixed in the openstack/tooz 1.55.0 release.

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.