From: Greg Farnum Date: Tue, 9 Jun 2015 23:14:12 +0000 (-0700) Subject: ceph: update log rotation for review comments X-Git-Tag: v10.2.6~165^2^2~463^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6573e92fb3ea4d7219cb888472e48ae98c25dcb4;p=ceph.git ceph: update log rotation for review comments Signed-off-by: Greg Farnum --- diff --git a/tasks/ceph.py b/tasks/ceph.py index 3b9a35335364..28930b8e5901 100644 --- a/tasks/ceph.py +++ b/tasks/ceph.py @@ -72,13 +72,13 @@ def ceph_log(ctx, config): ) ) - class Rotater: - stopping = False + class Rotater(object): + stop_event = gevent.event.Event() def invoke_logrotate(self): #1) install ceph-test.conf in /etc/logrotate.d #2) continuously loop over logrotate invocation with ceph-test.conf - while not self.stopping: - time.sleep(30) + while not self.stop_event.is_set(): + self.stop_event.wait(timeout=30) run.wait( ctx.cluster.run( args=['sudo', 'logrotate', '/etc/logrotate.d/ceph-test.conf'