cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH dlm-tool 1/3] dlm_controld: don't abort node configuration
Date: Thu,  9 Jul 2020 14:59:59 -0400	[thread overview]
Message-ID: <20200709190001.102450-2-aahringo@redhat.com> (raw)
In-Reply-To: <20200709190001.102450-1-aahringo@redhat.com>

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



  reply	other threads:[~2020-07-09 18:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 18:59 [Cluster-devel] [PATCH dlm-tool 0/3] dlm_controld: changes from v2 to v3 Alexander Aring
2020-07-09 18:59 ` Alexander Aring [this message]
2020-07-09 19:00 ` [Cluster-devel] [PATCH dlm-tool 2/3] dlm_controld: change enable_waitplock_recovery default Alexander Aring
2020-07-09 19:00 ` [Cluster-devel] [PATCH dlm-tool 3/3] dlm_controld: add default value handling for unsigned int Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200709190001.102450-2-aahringo@redhat.com \
    --to=aahringo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).