public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - fence: Make fence_node return 2 for no fencing
Date: Tue, 23 Jun 2009 15:34:00 -0000	[thread overview]
Message-ID: <20090623153341.1C568120273@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3cf06ec85044817b96fa4c778a959b10c6f71737
Commit:        3cf06ec85044817b96fa4c778a959b10c6f71737
Parent:        40f6289f257fe1338cadfb5329acb1cf450342bc
Author:        Lon Hohberger <lhh@redhat.com>
AuthorDate:    Tue Jun 23 11:10:34 2009 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Tue Jun 23 11:30:06 2009 -0400

fence: Make fence_node return 2 for no fencing

This makes fence_node return values consistent
between fencing and unfencing cases.

Signed-off-by: Lon Hohberger <lhh@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com
---
 fence/fence_node/fence_node.c |    6 +++++-
 fence/libfence/agent.c        |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fence/fence_node/fence_node.c b/fence/fence_node/fence_node.c
index 98d67c6..a98962a 100644
--- a/fence/fence_node/fence_node.c
+++ b/fence/fence_node/fence_node.c
@@ -225,7 +225,11 @@ int main(int argc, char *argv[])
 			rv = EXIT_SUCCESS;
 		}
 	} else {
-		if (error) {
+		if (error == -2) {
+			fprintf(stderr, "fence %s undefined\n", victim);
+			logt_print(LOG_ERR, "fence %s undefined\n", victim);
+			rv = 2;
+		} else if (error) {
 			fprintf(stderr, "fence %s failed\n", victim);
 			logt_print(LOG_ERR, "fence %s failed\n", victim);
 			rv = EXIT_FAILURE;
diff --git a/fence/libfence/agent.c b/fence/libfence/agent.c
index 57163aa..49e6795 100644
--- a/fence/libfence/agent.c
+++ b/fence/libfence/agent.c
@@ -307,7 +307,7 @@ int fence_node(char *victim, struct fence_log *log, int log_size,
 			left--;
 		}
 		count++;
-		error = -1;
+		error = -2;		/* No fencing */
 		goto out;
 	}
 


                 reply	other threads:[~2009-06-23 15:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090623153341.1C568120273@lists.fedorahosted.org \
    --to=lon@fedoraproject.org \
    --cc=cluster-cvs-relay@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 read-only IMAP folder(s) and NNTP newsgroup(s).