From 6a6cefc993e7ba5260c10508d601550a9f29340b Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Jul 09 2020 19:04:51 +0000 Subject: dlm_controld: don't abort node configuration In case of not having mark value file we don't abort the whole configuration if any error on open fails. We skip this specific setting and jump to the next one since it's not mandatory to have a correct mark setting. It will still appear inside the logs. --- diff --git a/dlm_controld/action.c b/dlm_controld/action.c index 6304022..bc9c44f 100644 --- a/dlm_controld/action.c +++ b/dlm_controld/action.c @@ -642,6 +642,9 @@ int add_configfs_node(int nodeid, char *addr, int addrlen, int local, /* * set skb mark for nodeid + * + * If open() fails we skip it because kernel doesn't support it. + * It's not a required confiuration. It will show up in the log. */ memset(path, 0, PATH_MAX); @@ -650,7 +653,7 @@ int add_configfs_node(int nodeid, char *addr, int addrlen, int local, fd = open(path, O_WRONLY); if (fd < 0) { log_error("%s: open failed: %d", path, errno); - return -1; + goto skip_non_required; } memset(buf, 0, sizeof(buf)); @@ -664,6 +667,8 @@ int add_configfs_node(int nodeid, char *addr, int addrlen, int local, } close(fd); +skip_non_required: + /* * set local */