From: Ryan O'Hara <rohara@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] fence_scsi: grep for keys should be case insensitive
Date: Tue, 15 Mar 2011 15:22:57 -0500 [thread overview]
Message-ID: <1300220577-7643-1-git-send-email-rohara@redhat.com> (raw)
When checking that a key is or is not registered for a device, the key
comparison should be case insensitive. Using sg_persist to query for
registered keys will always give lowercase characters for hexadecimal
keys, so registering key 'A' would appear to fail since it would not
match 'a'.
Resolves: rhbz#653504
Signed-off-by: Ryan O'Hara <rohara@redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 14b0784..2751bed 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -73,7 +73,7 @@ sub do_action_off ($@)
log_error ("device $dev does not exist") if (! -e $dev);
log_error ("device $dev is not a block device") if (! -b $dev);
- my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
+ my @keys = grep { /^$node_key$/i } get_registration_keys ($dev);
if (scalar (@keys) != 0) {
do_preempt_abort ($host_key, $node_key, $dev);
@@ -97,7 +97,7 @@ sub do_action_status ($@)
do_reset ($dev);
- my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
+ my @keys = grep { /^$node_key$/i } get_registration_keys ($dev);
if (scalar (@keys) != 0) {
$dev_count++;
@@ -119,7 +119,7 @@ sub do_verify_on ($@)
my $count = 0;
for $dev (@devices) {
- my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
+ my @keys = grep { /^$node_key$/i } get_registration_keys ($dev);
## check that our key is registered
if (scalar (@keys) == 0) {
@@ -150,7 +150,7 @@ sub do_verify_off ($@)
my $count = 0;
for $dev (@devices) {
- my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
+ my @keys = grep { /^$node_key$/i } get_registration_keys ($dev);
## check that our key is not registered
if (scalar (@keys) != 0) {
--
1.7.3.4
next reply other threads:[~2011-03-15 20:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 20:22 Ryan O'Hara [this message]
2011-03-15 20:37 ` [Cluster-devel] [PATCH] fence_scsi: grep for keys should be case insensitive Lon Hohberger
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=1300220577-7643-1-git-send-email-rohara@redhat.com \
--to=rohara@redhat.com \
/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 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 NNTP newsgroup(s).