summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-27 01:57:15 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-28 04:50:41 -0700
commitc3bf3b45a7cf612833c14fc701f751ffc04a7e73 (patch)
tree0d80b1efbe7391510359b86f3fcee016fb7ca1ff /xlators/features
parenta381d3a29fc149d78aecba22fdb285314aa9b711 (diff)
access-control: report possible errors in graph during 'init()'
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1712 (Error is not logged for a dangling volume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1712
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/access-control/src/access-control.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/xlators/features/access-control/src/access-control.c b/xlators/features/access-control/src/access-control.c
index 761226668..34422f9ca 100644
--- a/xlators/features/access-control/src/access-control.c
+++ b/xlators/features/access-control/src/access-control.c
@@ -1833,7 +1833,23 @@ struct xlator_fops fops = {
int
init (xlator_t *this)
{
- return 0;
+ int ret = -1;
+
+ if (!this->children || this->children->next) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "FATAL: access-control not configured with "
+ "exactly one child");
+ goto out;
+ }
+
+ if (!this->parents) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "dangling volume. check volfile ");
+ }
+
+ ret = 0;
+out:
+ return ret;
}
void