diff options
author | Aravinda VK <avishwan@redhat.com> | 2015-03-26 16:58:22 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-03-30 05:50:25 -0700 |
commit | e3bd2387a5973df4548fe4a62b5dfc227a2bdc64 (patch) | |
tree | 68f0e975efe6b239abd7583153bae8f906da302d /tools | |
parent | 8e2a0f35e0ac66e75f2dcbe6a9ca8815d4233edf (diff) | |
download | glusterfs-e3bd2387a5973df4548fe4a62b5dfc227a2bdc64.tar.gz glusterfs-e3bd2387a5973df4548fe4a62b5dfc227a2bdc64.tar.xz glusterfs-e3bd2387a5973df4548fe4a62b5dfc227a2bdc64.zip |
tools/glusterfind: Changelog_init before changelog_register
With the new Changelog RPC based approach, Changelog_init
needs to be called before changelog_register
BUG: 1206127
Change-Id: I817b84016d3f9ffdf2ea7a4e177953fe14ccc323
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/10009
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/glusterfind/src/changelog.py | 1 | ||||
-rw-r--r-- | tools/glusterfind/src/libgfchangelog.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/glusterfind/src/changelog.py b/tools/glusterfind/src/changelog.py index 262cb696c7..eb73635fb3 100644 --- a/tools/glusterfind/src/changelog.py +++ b/tools/glusterfind/src/changelog.py @@ -198,6 +198,7 @@ def get_changes(brick, hash_dir, log_file, end, args): of gfid to 'gfid_list' file. """ try: + libgfchangelog.cl_init() libgfchangelog.cl_register(brick, hash_dir, log_file, CHANGELOG_LOG_LEVEL, CHANGELOG_CONN_RETRIES) except libgfchangelog.ChangelogException as e: diff --git a/tools/glusterfind/src/libgfchangelog.py b/tools/glusterfind/src/libgfchangelog.py index e54a16a474..44e8fd5a61 100644 --- a/tools/glusterfind/src/libgfchangelog.py +++ b/tools/glusterfind/src/libgfchangelog.py @@ -26,6 +26,12 @@ def raise_oserr(): raise ChangelogException(errn, os.strerror(errn)) +def cl_init(): + ret = libgfc.gf_changelog_init(None) + if ret == -1: + raise_oserr() + + def cl_register(brick, path, log_file, log_level, retries=0): ret = libgfc.gf_changelog_register(brick, path, log_file, log_level, retries) |