geo-rep: Use gfchangelog context init API
With the RPC based changes to {libgf}changelog, changelog_init is required before changelog_register. Change-Id: Id125b2bd2e51aaaffa22ecab463dfb739c50d83c Signed-off-by: Venky Shankar <vshankar@redhat.com> BUG: 1170075 Reviewed-on: http://review.gluster.org/9993 Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com> Tested-by: Saravanakumar Arumugam <sarumuga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
parent
d15dedd8c9
commit
d331c31963
@ -34,6 +34,9 @@ class Changelog(object):
|
||||
def version(self):
|
||||
return CHANGELOG_AGENT_SERVER_VERSION
|
||||
|
||||
def init(self):
|
||||
return Changes.cl_init()
|
||||
|
||||
def register(self, cl_brick, cl_dir, cl_log, cl_level, retries=0):
|
||||
return Changes.cl_register(cl_brick, cl_dir, cl_log, cl_level, retries)
|
||||
|
||||
|
@ -30,6 +30,12 @@ class Changes(object):
|
||||
def _get_api(cls, call):
|
||||
return getattr(cls.libgfc, call)
|
||||
|
||||
@classmethod
|
||||
def cl_init(cls):
|
||||
ret = cls._get_api('gf_changelog_init')(None)
|
||||
if ret == -1:
|
||||
cls.raise_changelog_err()
|
||||
|
||||
@classmethod
|
||||
def cl_register(cls, brick, path, log_file, log_level, retries=0):
|
||||
ret = cls._get_api('gf_changelog_register')(brick, path,
|
||||
|
@ -1310,6 +1310,7 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote):
|
||||
# register with the changelog library
|
||||
# 9 == log level (DEBUG)
|
||||
# 5 == connection retries
|
||||
changelog_agent.init()
|
||||
changelog_agent.register(gconf.local_path,
|
||||
workdir, gconf.changelog_log_file,
|
||||
g2.CHANGELOG_LOG_LEVEL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user