All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ./clustermon.spec.in.in ./conga.spec.in. ...
Date: 20 Aug 2007 16:23:28 -0000	[thread overview]
Message-ID: <20070820162328.310.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2007-08-20 16:23:28

Modified files:
	.              : clustermon.spec.in.in conga.spec.in.in 
	ricci/modules/cluster: Clusvcadm.cpp 

Log message:
	fix bz253341: failure to start cluster service which had been modifed for correction

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/clustermon.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.23&r2=1.18.2.24
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.56&r2=1.45.2.57
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.5&r2=1.7.2.6

--- conga/clustermon.spec.in.in	2007/08/13 19:06:01	1.18.2.23
+++ conga/clustermon.spec.in.in	2007/08/20 16:23:27	1.18.2.24
@@ -193,6 +193,10 @@
 
 
 %changelog
+* Mon Aug 20 2007 Ryan McCabe <rmccabe@redhat.com> 0.10.0-5
+- Fixed bz253341 (failure to start cluster service which had been modifed for correction)
+- Resolves: bz253341
+
 * Wed Aug 08 2007 Ryan McCabe <rmccabe@redhat.com> 0.10.0-4
 - Fixed bz230451 (fence_xvm.key file is not automatically created. Should have a least a default)
 - Resolves: bz230451
--- conga/conga.spec.in.in	2007/08/17 20:26:31	1.45.2.56
+++ conga/conga.spec.in.in	2007/08/20 16:23:27	1.45.2.57
@@ -310,8 +310,10 @@
 
 ###  changelog ###
 %changelog
-* Fri Aug 17 2007 Ryan McCabe <rmccabe@redhat.com> 0.10.0-5
-* Fixed bz249291 (delete node task fails to do all items listed in the help document)
+* Mon Aug 20 2007 Ryan McCabe <rmccabe@redhat.com> 0.10.0-5
+- Fixed bz249291 (delete node task fails to do all items listed in the help document)
+- Fixed bz253341 (failure to start cluster service which had been modifed for correction)
+- Related: bz253341
 - Resolves: bz249291
 
 * Mon Aug 13 2007 Ryan McCabe <rmccabe@redhat.com> 0.10.0-4
--- conga/ricci/modules/cluster/Clusvcadm.cpp	2007/03/12 03:45:57	1.7.2.5
+++ conga/ricci/modules/cluster/Clusvcadm.cpp	2007/08/20 16:23:28	1.7.2.6
@@ -1,5 +1,5 @@
 /*
-  Copyright Red Hat, Inc. 2005
+  Copyright Red Hat, Inc. 2005-2007
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -89,7 +89,7 @@
     if (*iter == nodename)
       node_found = true;
   if (!node_found && nodename.size())
-    throw String("node unable to run services");
+    throw String("Node " + nodename + " is unable to run cluster services. Check whether the rgmanager service is running");
   
   // start
   for (list<ServiceStatus>::const_iterator iter = services.begin();
@@ -100,10 +100,20 @@
 
       if (iter->status == ServiceStatus::RG_STATE_MIGRATE)
          throw String(servicename + " is in the process of being migrated");
-		
-      if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
+
+      /*
+      ** Failed services must be disabled before they can be
+      ** started again.
+      */
+      if (iter->status == ServiceStatus::RG_STATE_FAILED) {
+        try {
+          Clusvcadm::stop(servicename);
+        } catch ( ... ) {
+          throw String("Unable to disable failed service " + servicename + " before starting it");
+        }
+        flag = "-e";
+      } else if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
 	  iter->status == ServiceStatus::RG_STATE_STOPPING ||
-	  iter->status == ServiceStatus::RG_STATE_FAILED ||
 	  iter->status == ServiceStatus::RG_STATE_ERROR ||
 	  iter->status == ServiceStatus::RG_STATE_DISABLED)
 	flag = "-e";
@@ -127,12 +137,12 @@
 	if (utils::execute(CLUSVCADM_TOOL_PATH, args, out, err, status, false))
 	  throw command_not_found_error_msg(CLUSVCADM_TOOL_PATH);
 	if (status != 0)
-	  throw String("clusvcadm failed");
+	  throw String("clusvcadm failed to start " + servicename);
       }
       return;
     }
   
-  throw String("no such service");
+  throw String(servicename + ": no such cluster service");
 }
 
 void 
@@ -150,7 +160,7 @@
     if (*iter == nodename)
       node_found = true;
   if (!node_found && nodename.size())
-    throw String("node unable to run services");
+    throw String("Node " + nodename + " is unable to run cluster services. Check whether the rgmanager service is running");
   
   // start
   for (list<ServiceStatus>::const_iterator iter = services.begin();
@@ -162,9 +172,16 @@
       String flag;
       if (iter->status == ServiceStatus::RG_STATE_MIGRATE)
          throw String(servicename + " is already in the process of being migrated");
-      if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
+
+      if (iter->status == ServiceStatus::RG_STATE_FAILED) {
+        try {
+          Clusvcadm::stop(servicename);
+        } catch ( ... ) {
+          throw String("Unable to disable failed service " + servicename + " before starting it");
+        }
+        flag = "-e";
+      } else if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
 	  iter->status == ServiceStatus::RG_STATE_STOPPING ||
-	  iter->status == ServiceStatus::RG_STATE_FAILED ||
 	  iter->status == ServiceStatus::RG_STATE_ERROR ||
 	  iter->status == ServiceStatus::RG_STATE_DISABLED)
 	flag = "-e";
@@ -185,13 +202,13 @@
 	if (utils::execute(CLUSVCADM_TOOL_PATH, args, out, err, status, false))
 	  throw command_not_found_error_msg(CLUSVCADM_TOOL_PATH);
 	if (status != 0)
-	  throw String("clusvcadm failed");
+	  throw String("clusvcadm failed to migrate " + servicename);
       }
       return;
     }
   }
   
-  throw String("no such virtual service");
+  throw String(servicename + ": no such virtual machine service");
 }
 
 void 
@@ -206,6 +223,7 @@
        iter++)
     if (iter->name == servicename) {
       if (iter->status == ServiceStatus::RG_STATE_STARTING ||
+          iter->status == ServiceStatus::RG_STATE_FAILED   ||
 	  iter->status == ServiceStatus::RG_STATE_STARTED) {
 	String out, err;
 	int status;
@@ -218,12 +236,12 @@
 	if (utils::execute(CLUSVCADM_TOOL_PATH, args, out, err, status, false))
 	  throw command_not_found_error_msg(CLUSVCADM_TOOL_PATH);
 	if (status != 0)
-	  throw String("clusvcadm failed");
+	  throw String("clusvcadm failed to stop " + servicename);
       }
       return;
     }
   
-  throw String("no such service");
+  throw String(servicename + ": no such cluster service");
 }
 
 void 
@@ -243,9 +261,15 @@
       if (iter->status == ServiceStatus::RG_STATE_STARTING)
          throw String(servicename + " is in the process of being started");
 
-      if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
+      if (iter->status == ServiceStatus::RG_STATE_FAILED) {
+        try {
+          Clusvcadm::stop(servicename);
+        } catch ( ... ) {
+          throw String("Unable to disable failed service " + servicename + " before starting it");
+        }
+        flag = "-e";
+      } else if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
 	  iter->status == ServiceStatus::RG_STATE_STOPPING ||
-	  iter->status == ServiceStatus::RG_STATE_FAILED ||
 	  iter->status == ServiceStatus::RG_STATE_ERROR ||
 	  iter->status == ServiceStatus::RG_STATE_DISABLED)
 	flag = "-e";
@@ -264,12 +288,12 @@
 	if (utils::execute(CLUSVCADM_TOOL_PATH, args, out, err, status, false))
 	  throw command_not_found_error_msg(CLUSVCADM_TOOL_PATH);
 	if (status != 0)
-	  throw String("clusvcadm failed");
+	  throw String("clusvcadm failed to restart cluster service " + servicename);
       }
       return;
     }
   
-  throw String("no such service");
+  throw String(servicename + ": no such cluster service");
 }
 
 



             reply	other threads:[~2007-08-20 16:23 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 16:23 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-07-29 19:47 [Cluster-devel] conga ./clustermon.spec.in.in ./conga.spec.in. rmccabe
2008-07-28 17:49 rmccabe
2008-05-12 15:13 rmccabe
2008-04-18  3:31 rmccabe
2008-04-11  6:54 rmccabe
2008-04-11  6:48 rmccabe
2008-04-07 20:11 rmccabe
2008-02-12 17:40 rmccabe
2008-01-29 22:02 rmccabe
2007-08-13 19:06 rmccabe
2007-08-09 22:02 rmccabe
2007-08-08 21:24 rmccabe
2007-06-27  7:43 rmccabe
2007-05-01 15:57 rmccabe
2007-04-11 20:15 rmccabe
2007-04-11 19:23 rmccabe
2007-03-20 20:52 kupcevic
2007-02-07  1:36 kupcevic
2007-02-05 22:01 kupcevic
2007-02-05 20:08 rmccabe
2007-02-05 12:12 kupcevic
2007-01-23 22:34 kupcevic
2007-01-17 16:36 kupcevic
2007-01-17 14:57 kupcevic
2007-01-17 14:32 kupcevic
2006-12-13 19:21 kupcevic
2006-12-12 13:53 kupcevic
2006-11-17 20:46 kupcevic
2006-11-17  0:59 kupcevic
2006-11-16 19:35 kupcevic
2006-11-02  0:46 rmccabe
2006-11-01 23:11 kupcevic
2006-11-01 20:43 rmccabe
2006-10-31 20:34 kupcevic
2006-10-25 18:47 rmccabe
2006-10-25 16:35 kupcevic
2006-10-16 21:01 kupcevic
2006-10-16 15:56 kupcevic
2006-10-04 16:32 kupcevic
2006-09-26  5:21 kupcevic
2006-08-22 23:01 kupcevic
2006-08-22 20:12 kupcevic
2006-08-16  6:34 kupcevic
2006-08-15  4:15 kupcevic
2006-08-09 21:13 kupcevic

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=20070820162328.310.qmail@sourceware.org \
    --to=rmccabe@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.