@ -481,7 +481,27 @@ sub identify_peer
# This is me. Am I in maintenance mode?
if (exists $hash_ref->{instance_attributes})
{
# We've got some data...
next if not exists $hash_ref->{instance_attributes}{nvpair};
my $reference = ref($hash_ref->{instance_attributes}{nvpair});
to_log($conf, {message => "Instance attribute reference type: [".$reference."]", 'line' => __LINE__, level => 3});
if ($reference eq "ARRAY")
{
foreach my $array_ref (@{$hash_ref->{instance_attributes}{nvpair}})
{
my $id = $array_ref->{id};
my $name = $array_ref->{name};
my $value = $array_ref->{value};
to_log($conf, {message => "Instance attribute ID: [".$id."], name: [".$name."], value: [".$value."]", 'line' => __LINE__, level => 3});
if (($name eq "maintenance") and ($value eq "on"))
{
# We're in maintenance mode, abort.
to_log($conf, {message => "This node is in maintenance mode. Not able to fence!", 'line' => __LINE__, level => 0, priority => "err"});
exit(1);
}
}
}
elsif ($reference eq "HASH")
{
my $name = defined $hash_ref->{instance_attributes}{nvpair}{name} ? $hash_ref->{instance_attributes}{nvpair}{name} : "";
my $value = defined $hash_ref->{instance_attributes}{nvpair}{value} ? $hash_ref->{instance_attributes}{nvpair}{value} : "";
to_log($conf, {message => "node: [".$node."] instance attribyte name: [".$name."], value: [".$value."]", 'line' => __LINE__, level => 1});
@ -495,6 +515,7 @@ sub identify_peer
}
}
}
}
my $quorate = $body->{'have-quorum'};
to_log($conf, {message => "quorate: [".$quorate."]", 'line' => __LINE__, level => 1});
@ -655,7 +676,7 @@ sub find_executables
}
else
{
to_log($conf, {message => "Found!", 'line' => __LINE__, level => 3});
to_log($conf, {message => "Found: [".$exe."] at: [".$conf->{path}{exe}{$exe}."] !", 'line' => __LINE__, level => 3});
next;
}