All of lore.kernel.org
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager ChangeLog include/resgroup.h ...
Date: 14 Dec 2007 19:37:01 -0000	[thread overview]
Message-ID: <20071214193701.24093.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-12-14 19:37:00

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/include: resgroup.h 
	rgmanager/src/daemons: rg_state.c service_op.c 

Log message:
	Add return value for inability to run due to exclusive flag being present

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.64&r2=1.65
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/resgroup.h.diff?cvsroot=cluster&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_state.c.diff?cvsroot=cluster&r1=1.42&r2=1.43
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/service_op.c.diff?cvsroot=cluster&r1=1.1&r2=1.2

--- cluster/rgmanager/ChangeLog	2007/12/12 21:41:32	1.64
+++ cluster/rgmanager/ChangeLog	2007/12/14 19:37:00	1.65
@@ -1,3 +1,7 @@
+2007-12-14 Lon Hohberger <lhh@redhat.com>
+	* Add return code for inability to run because of exclusive 
+	tag
+
 2007-12-12 Lon Hohberger <lhh@redhat.com>
 	* Misc changes; add missing ds.h
 	* src/resources/default*.sl: Make clusvcadm -r go to a different
--- cluster/rgmanager/include/resgroup.h	2007/11/30 21:36:28	1.25
+++ cluster/rgmanager/include/resgroup.h	2007/12/14 19:37:00	1.26
@@ -202,6 +202,8 @@
 int my_id(void);
 
 /* Return codes */
+#define RG_EEXCL	-16		/* Service not runnable due to
+					   inability to start exclusively */
 #define RG_EDOMAIN	-15		/* Service not runnable given the
 					   set of nodes and its failover
 					   domain */
--- cluster/rgmanager/src/daemons/rg_state.c	2007/11/30 21:36:28	1.42
+++ cluster/rgmanager/src/daemons/rg_state.c	2007/12/14 19:37:00	1.43
@@ -2067,7 +2067,7 @@
 		if (check_exclusive_resources(membership, svcName) != 0) {
 			free_member_list(membership);
 			pthread_mutex_unlock(&exclusive_mutex);
-			return RG_EFAIL;
+			return RG_EEXCL;
 		}
 	}
 	free_member_list(membership);
--- cluster/rgmanager/src/daemons/service_op.c	2007/11/30 21:36:28	1.1
+++ cluster/rgmanager/src/daemons/service_op.c	2007/12/14 19:37:00	1.2
@@ -51,6 +51,7 @@
 {
 	int target;
 	int ret, x;
+	int excl = 0, dep = 0, fail = 0;
 	rg_state_t svcStatus;
 	
 	if (get_service_state_internal(svcName, &svcStatus) < 0) {
@@ -74,8 +75,14 @@
 			if (new_owner)
 				*new_owner = svcStatus.rs_owner;
 			return 0;
+		case RG_EEXCL:
+			++excl;
+			continue;
 		case RG_EDEPEND:
+			++dep;
+			continue;
 		case RG_EFAIL:
+			++fail;
 			continue;
 		case RG_EABORT:
 			svc_report_failure(svcName);
@@ -100,7 +107,15 @@
 		}
 	}
 
-	return RG_EFAIL;
+	ret = RG_EFAIL;
+	if (excl == target_list_len) 
+		ret = RG_EEXCL;
+	else if (dep == target_list_len)
+		ret = RG_EDEPEND;
+
+	clulog(LOG_INFO, "Start failed; node reports: %d failures, "
+	       "%d exclusive, %d dependency errors\n", fail, excl, dep);
+	return ret;
 }
 
 



             reply	other threads:[~2007-12-14 19:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-14 19:37 lhh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-12-30  8:27 [Cluster-devel] cluster/rgmanager ChangeLog include/resgroup.h fabbione
2007-11-30 20:36 lhh
2007-06-27 14:03 lhh
2007-06-26 21:55 lhh
2007-06-14 15:06 mgrac
2007-06-14 13:36 mgrac
2007-04-27 18:10 lhh
2006-10-06 21:22 lhh
2006-09-01 19:02 lhh
2006-08-18 15:26 lhh

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=20071214193701.24093.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.