Skip to content

Commit

Permalink
* Fixed issue #104 (node wouldn't boot when peer was online).
Browse files Browse the repository at this point in the history
* Bumped displayed version to '2.0.0b'.

Signed-off-by: Digimer <[email protected]>
  • Loading branch information
digimer committed Oct 31, 2016
1 parent ea75bd4 commit 6d89c08
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
1 change: 1 addition & 0 deletions AN/Tools/Alert.pm
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ sub error
{
print "$error\n" if not $an->Alert->no_fatal_errors;
}
$an->data->{sys}{footer_printed} = 1;
$an->nice_exit({exit_code => $code});
}

Expand Down
2 changes: 1 addition & 1 deletion AN/Tools/ScanCore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6125,7 +6125,7 @@ sub target_power

my $task = $parameter->{task} ? $parameter->{task} : "status";
my $target = $parameter->{target} ? $parameter->{target} : "";
$an->Log->entry({log_level => 3, message_key => "an_variables_0002", message_variables => {
$an->Log->entry({log_level => 2, message_key => "an_variables_0002", message_variables => {
name1 => "task", value1 => $task,
name2 => "target", value2 => $target,
}, file => $THIS_FILE, line => __LINE__});
Expand Down
26 changes: 14 additions & 12 deletions AN/Tools/Striker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ sub load_anvil

# Did the user specify an anvil_uuid?
my $anvil_uuid = $parameter->{anvil_uuid} ? $parameter->{anvil_uuid} : "";
$an->Log->entry({log_level => 2, message_key => "an_variables_0001", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0001", message_variables => {
name1 => "anvil_uuid", value1 => $anvil_uuid,
}, file => $THIS_FILE, line => __LINE__});

Expand Down Expand Up @@ -348,7 +348,7 @@ sub load_anvil
}
}

$an->Log->entry({log_level => 2, message_key => "an_variables_0001", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0001", message_variables => {
name1 => "anvils::${anvil_uuid}::name", value1 => $an->data->{anvils}{$anvil_uuid}{name},
}, file => $THIS_FILE, line => __LINE__});
if (not $an->Validate->is_uuid({uuid => $anvil_uuid}))
Expand Down Expand Up @@ -458,7 +458,7 @@ sub load_anvil
$an->data->{sys}{anvil}{$node_key}{online} = $an->data->{anvils}{$anvil_uuid}{$node_key}{online};
$an->data->{sys}{anvil}{$node_key}{power} = $an->data->{anvils}{$anvil_uuid}{$node_key}{power};
$an->data->{sys}{anvil}{$node_key}{host_uuid} = $an->data->{anvils}{$anvil_uuid}{$node_key}{host_uuid};
$an->Log->entry({log_level => 2, message_key => "an_variables_0018", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0018", message_variables => {
name1 => "sys::anvil::${node_key}::uuid", value1 => $an->data->{sys}{anvil}{$node_key}{uuid},
name2 => "sys::anvil::${node_key}::name", value2 => $an->data->{sys}{anvil}{$node_key}{name},
name3 => "sys::anvil::${node_key}::short_name", value3 => $an->data->{sys}{anvil}{$node_key}{short_name},
Expand Down Expand Up @@ -6851,16 +6851,16 @@ sub _footer
my $self = shift;
my $parameter = shift;
my $an = $self->parent;
$an->Log->entry({log_level => 2, title_key => "tools_log_0001", title_variables => { function => "_footer" }, message_key => "tools_log_0002", file => $THIS_FILE, line => __LINE__});
$an->Log->entry({log_level => 3, title_key => "tools_log_0001", title_variables => { function => "_footer" }, message_key => "tools_log_0002", file => $THIS_FILE, line => __LINE__});

$an->Log->entry({log_level => 2, message_key => "an_variables_0001", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0001", message_variables => {
name1 => "sys::footer_printed", value1 => $an->data->{sys}{footer_printed},
}, file => $THIS_FILE, line => __LINE__});
if (not $an->data->{sys}{footer_printed})
{
print $an->Web->template({file => "common.html", template => "footer"});
$an->data->{sys}{footer_printed} = 1;
$an->Log->entry({log_level => 2, message_key => "an_variables_0001", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0001", message_variables => {
name1 => "sys::footer_printed", value1 => $an->data->{sys}{footer_printed},
}, file => $THIS_FILE, line => __LINE__});
}
Expand Down Expand Up @@ -7750,7 +7750,7 @@ sub _header
$anvil_name = $an->data->{sys}{anvil}{name};
$node1_name = $an->data->{sys}{anvil}{node1}{name};
$node2_name = $an->data->{sys}{anvil}{node2}{name};
$an->Log->entry({log_level => 2, message_key => "an_variables_0004", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0004", message_variables => {
name1 => "anvil_uuid", value1 => $anvil_uuid,
name2 => "anvil_name", value2 => $anvil_name,
name3 => "node1_name", value3 => $node1_name,
Expand Down Expand Up @@ -12592,6 +12592,7 @@ sub _poweron_node
return("");
}

### NOTE: The target node should be off, so 'target' will likely be empty.
# Pull out the rest of the data
my $anvil_name = $an->data->{sys}{anvil}{name};
my $node_key = $an->data->{sys}{node_name}{$node_name}{node_key};
Expand All @@ -12616,6 +12617,7 @@ sub _poweron_node
name1 => "password", value1 => $password,
}, file => $THIS_FILE, line => __LINE__});

# Die if I don't know who my target is.
if (not $node_key)
{
$an->Alert->error({title_key => "tools_title_0003", message_key => "error_message_0150", message_variables => { node_name => $node_name }, code => 150, file => $THIS_FILE, line => __LINE__});
Expand Down Expand Up @@ -12668,9 +12670,9 @@ sub _poweron_node
if ($an->data->{sys}{anvil}{$peer_key}{online})
{
# Sweet, power on via the peer.
my $target = $an->data->{sys}{anvil}{$node_key}{use_ip};
my $port = $an->data->{sys}{anvil}{$node_key}{use_port};
my $password = $an->data->{sys}{anvil}{$node_key}{password};
my $target = $an->data->{sys}{anvil}{$peer_key}{use_ip};
my $port = $an->data->{sys}{anvil}{$peer_key}{use_port};
my $password = $an->data->{sys}{anvil}{$peer_key}{password};
$an->Log->entry({log_level => 2, message_key => "an_variables_0002", message_variables => {
name1 => "target", value1 => $target,
name2 => "port", value2 => $port,
Expand All @@ -12682,8 +12684,8 @@ sub _poweron_node
# Fencing is off -> verify -> on. Being already off, this effectively just boots the node.
my $shell_call = $an->data->{path}{fence_node}." -v $node_name";
$an->Log->entry({log_level => 2, message_key => "an_variables_0002", message_variables => {
name1 => "target", value2 => $target,
name2 => "shell_call", value1 => $shell_call,
name1 => "target", value1 => $target,
name2 => "shell_call", value2 => $shell_call,
}, file => $THIS_FILE, line => __LINE__});
my ($error, $ssh_fh, $return) = $an->Remote->remote_call({
target => $target,
Expand Down
2 changes: 1 addition & 1 deletion cgi-bin/configure
Original file line number Diff line number Diff line change
Expand Up @@ -8501,7 +8501,7 @@ sub _initialize_an
# If a user wants to use spice + qxl for video in VMs, set this to '1'. NOTE: This
# disables web-based VNC!
# use_spice_graphics => 1,
version => "2.0.0a",
version => "2.0.0b",
# Adds: [--disablerepo='*' --enablerepo='striker*'] if
# no internet connection found.
yum_switches => "-y",
Expand Down
2 changes: 1 addition & 1 deletion cgi-bin/mediaLibrary
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ sub _initialize_an
# If a user wants to use spice + qxl for video in VMs, set this to '1'. NOTE: This
# disables web-based VNC!
# use_spice_graphics => 1,
version => "2.0.0a",
version => "2.0.0b",
# Adds: [--disablerepo='*' --enablerepo='striker*'] if
# no internet connection found.
yum_switches => "-y",
Expand Down
2 changes: 1 addition & 1 deletion cgi-bin/striker
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ sub _initialize_an
# If a user wants to use spice + qxl for video in VMs, set this to '1'. NOTE: This
# disables web-based VNC!
# use_spice_graphics => 1,
version => "2.0.0a",
version => "2.0.0b",
# Adds: [--disablerepo='*' --enablerepo='striker*'] if
# no internet connection found.
yum_switches => "-y",
Expand Down

0 comments on commit 6d89c08

Please sign in to comment.