From c6259dbcdb1f891f0a12ea57151ecb06d553d998 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Fri, 28 Aug 2009 16:59:07 +0300
Subject: [PATCH] confd: start in polling mode

This allows us not to enable the inotify handler immediately, and thus
to make it easier for us should the config file not exist at all.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 daemons/ganeti-confd | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/daemons/ganeti-confd b/daemons/ganeti-confd
index 88e454bcc..cf56aa8f2 100755
--- a/daemons/ganeti-confd
+++ b/daemons/ganeti-confd
@@ -115,7 +115,6 @@ class ConfdInotifyEventHandler(pyinotify.ProcessEvent):
                 pyinotify.EventsCodes.IN_MODIFY
     self.file = file
     self.watch_handle = None
-    self.enable()
 
   def enable(self):
     """Watch the given file
@@ -204,7 +203,7 @@ class ConfdConfigurationReloader(object):
     self.processor = processor
     self.mainloop = mainloop
 
-    self.polling = False
+    self.polling = True
     self.last_notification = 0
 
     # Asyncronous inotify handler for config changes
-- 
GitLab