[Cluster-devel] [PATCH dlm-tool 1/3] dlm_controld: don't abort node configuration

Alexander Aring aahringo at redhat.com
Thu Jul 9 18:59:59 UTC 2020


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.
---
 dlm_controld/action.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlm_controld/action.c b/dlm_controld/action.c
index 63040227..bc9c44f2 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
 	 */
-- 
2.26.2




More information about the Cluster-devel mailing list