From 369f66ea51506315545501ab3fd4fe87d011a0e5 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 18 Apr 2011 17:25:28 +0000 Subject: syncdaemon: implement template substitutions for config values So, for example, a log file setting of /var/log/${mastervol}/${eSlave}.log will be substituted with the volume name of the master and the canonicalized-escaped name of the slave for each master-slave pair. As template expanders, beyond the various forms and derivatives of master and slave, the following are also available: - gsyncd tunables (set in command line or in config) - for regexp sections, regexp group captures can be accessed via "match_", where i=1,2 corresponds to the i-th peer-rx in the section title and n=1,... to the n-th capture. This will enable us to have a static configuration (not having to add new entries on each gsyncd start). Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 2785 (gsyncd logs on slave side go to /dev/null) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785 --- xlators/features/marker/utils/syncdaemon/resource.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/features/marker/utils/syncdaemon/resource.py') diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 777ff599999..7db7d5bb40f 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -255,6 +255,7 @@ class AbstractUrl(object): self.path = path return m.groups() + @property def scheme(self): return type(self).__name__.lower() @@ -266,7 +267,7 @@ class AbstractUrl(object): pa = self.canonical_path() else: pa = self.path - u = "://".join((self.scheme(), pa)) + u = "://".join((self.scheme, pa)) if escaped: u = syncdutils.escape(u) return u -- cgit