public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* STABLE2 - fence_scsi.pl: check if nodeid is zero
@ 2008-09-29 13:30 Ryan O'Hara
  0 siblings, 0 replies; only message in thread
From: Ryan O'Hara @ 2008-09-29 13:30 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d5318d9d6b5f1267de2a340fb89fbf56cf9c6203
Commit:        d5318d9d6b5f1267de2a340fb89fbf56cf9c6203
Parent:        641b0f5e3fdd1815d4641135495018d5dbf53bbd
Author:        rohara <rohara@spartan.(none)>
AuthorDate:    Thu Sep 4 16:25:56 2008 -0500
Committer:     Ryan O'Hara <rohara@redhat.com>
CommitterDate: Mon Sep 29 08:27:40 2008 -0500

fence_scsi.pl: check if nodeid is zero

If the nodeid we get from the XML query of cluster.conf is zero,
then either the node does not exist in the cluster of the nodeid
is not set. Each case is invalid, so report an error and exit.
---
 fence/agents/scsi/fence_scsi.pl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index b9aea99..fb5093f 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -187,6 +187,10 @@ sub get_key
     my $cluster_id = get_cluster_id;
     my $node_id = get_node_id($node);
 
+    if ($node_id == 0) {
+	die "Unable to determine nodeid for $node.\n";
+    }
+
     my $key = sprintf "%x%.4x", $cluster_id, $node_id;
 
     return $key;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-29 13:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-29 13:30 STABLE2 - fence_scsi.pl: check if nodeid is zero Ryan O'Hara

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).