Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d7e... Commit: d7eae279296c350b25a26eb99bb7dd84acb0901d Parent: 725381e831366ec7abd748b2777cfe43a3c5307b Author: Jim Ramsay jim_ramsay@dell.com AuthorDate: Fri Mar 4 14:04:03 2011 -0500 Committer: Ryan O'Hara rohara@redhat.com CommitterDate: Tue Mar 15 15:42:15 2011 -0500
Allow fence_scsi to use any valid hexadecimal key
The check for a non-zero key is using perl's implicit string-to-integer conversion that only works on base 10 digits, which means that any key starting with at least one digit [1-9] will come through as okay, but any key starting with [A-F] will evaluate as 0 and fail the test.
An explicit conversion to integer via hex() is the solution.
I hit this in a cluster with a cluster ID of 43316 == 0xA934 and scsi fencing configured, where starting the cman service would always fail at the "Unfencing self" step.
Signed-off-by: Jim Ramsay jim_ramsay@dell.com Signed-off-by: Ryan O'Hara rohara@redhat.com Reviewed-by: Lon Hohberger lhh@redhat.com
Resolves: rhbz#653504 --- fence/agents/scsi/fence_scsi.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl index ba9770f..14b0784 100644 --- a/fence/agents/scsi/fence_scsi.pl +++ b/fence/agents/scsi/fence_scsi.pl @@ -787,7 +787,7 @@ else {
## verify that key is not zero ## -if ($key == 0) { +if (hex($key) == 0) { log_error ("key cannot be zero"); }
cluster-commits@lists.stg.fedorahosted.org