[Bugs] [Bug 1357759] New: Geo-rep silently ignores config parser errors
bugzilla at redhat.com
bugzilla at redhat.com
Tue Jul 19 05:55:07 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1357759
Bug ID: 1357759
Summary: Geo-rep silently ignores config parser errors
Product: GlusterFS
Version: 3.7.13
Component: geo-replication
Assignee: bugs at gluster.org
Reporter: avishwan at redhat.com
CC: bugs at gluster.org
Depends On: 1349273
+++ This bug was initially created as a clone of Bug #1349273 +++
Description of problem:
If Session config or Template config not found, Geo-rep will silently ignore
and causes other problems like wrong mount params, wrong paths etc.
Version-Release number of selected component (if applicable):
How reproducible:
Always
Steps to Reproduce:
1. Create Geo-rep session
2. Move Template config file and session config file from
/var/lib/glusterd/geo-replication
3. Start Geo-replication
Actual results:
Geo-rep will not fail, but substitute wrong config values when used.
(We can observe wrong Mount parameters, ps -ax | grep gsyncd | grep glusterfs)
Expected results:
Geo-rep should go to Faulty if unable to read config file.
--- Additional comment from Vijay Bellur on 2016-06-23 02:41:14 EDT ---
REVIEW: http://review.gluster.org/14777 (geo-rep: Handle Config parser errors)
posted (#1) for review on master by Aravinda VK (avishwan at redhat.com)
--- Additional comment from Vijay Bellur on 2016-06-23 05:32:25 EDT ---
REVIEW: http://review.gluster.org/14777 (geo-rep: Handle Config parser errors)
posted (#2) for review on master by Aravinda VK (avishwan at redhat.com)
--- Additional comment from Vijay Bellur on 2016-07-11 03:12:59 EDT ---
REVIEW: http://review.gluster.org/14777 (geo-rep: Handle Config parser errors)
posted (#3) for review on master by Aravinda VK (avishwan at redhat.com)
--- Additional comment from Vijay Bellur on 2016-07-12 08:09:44 EDT ---
COMMIT: http://review.gluster.org/14777 committed in master by Jeff Darcy
(jdarcy at redhat.com)
------
commit d94bf608b16b82f2c8f8588a96459cb746773b32
Author: Aravinda VK <avishwan at redhat.com>
Date: Thu Jun 23 11:53:36 2016 +0530
geo-rep: Handle Config parser errors
Python ConfigParser lib has two methods, readfp and read, it should
be used as follows.
readfp(open("defaults.conf"))
read("custom.conf")
ConfigParser.read(path) ignores any file errors, which is intentional
since errors are handled while loading default config.
Geo-rep uses only one config file(Session config in Master side and
Template config on Slave side) so we should use readfp to avoid
skipping OS errors.
config.read is retained in case of `--config-set-rx` where glusterd
creates new template config file.
BUG: 1349273
Change-Id: I15a14d3743facd7b8c7af0edc70fdefaa43efd04
Signed-off-by: Aravinda VK <avishwan at redhat.com>
Reviewed-on: http://review.gluster.org/14777
Smoke: Gluster Build System <jenkins at build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy at redhat.com>
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1349273
[Bug 1349273] Geo-rep silently ignores config parser errors
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list