Allow fence_scsi to use any valid hexadecimal key
PATCH 1/1 Allow fence_scsi to use any valid hexadecimal key
From: Jim Ramsay <[email protected]>
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 <[email protected]>
Signed-off-by Ryan O'Hara <[email protected]>
Resolves: rhbz#653504
--- fence/agents/scsi/fence_scsi.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fence/agents/scsi/fence_scsi.pl +1 -1
@@ -787,7 +787,7 @@ else { ## verify that key is not zero ## -if ($key == 0) { +if (hex($key) == 0) { log_error ("key cannot be zero"); }
Signature · 1 line
1.7.3.4
PATCH 1/1 Allow fence_scsi to use any valid hexadecimal key
Quoted 3 lines · Ryan O'Hara
Signed-off-by Jim Ramsay <[email protected]>Signed-off-by Ryan O'Hara <[email protected]>
Reviewed-by Lon Hohberger <[email protected]>
ack
Signature · 1 line
Lon Hohberger - Red Hat, Inc.