2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-20 02:00:24 +00:00

Merge pull request #1741 from gurevichmark/image_probe_xdsh_check

Check output of xdsh command before continuing
This commit is contained in:
Victor Hu
2016-08-29 13:59:32 -04:00
committed by GitHub

View File

@@ -214,9 +214,21 @@ probe_utils->send_msg("$output", "d", "---- Gathering information from all diskl
my $pingable_hostname_list = join ",", @pingable_nodes;
my $all_xdsh_output = `xdsh $pingable_hostname_list "cat /opt/xcat/xcatinfo"`;
my $xcatinfo_image_UUID = ` echo "$all_xdsh_output" | awk -F"=" '/IMAGEUUID/ {gsub(/IMAGEUUID/,"",\$1); gsub(/'"'"'/,"",\$2);; print \$1 \$2}'`;
# Check to verify xdsh worked and returned some usefull information
if (length($xcatinfo_image_UUID) <= 1) {
probe_utils->send_msg("$output", "w", "Unable to extract image UUID information from compute nodes using xdsh command. No image consistency verification will be performed.");
exit 1;
}
my @xdsh_UUID_lines = split("[\n\r]", $xcatinfo_image_UUID);
my $xcatinfo_image_name = ` echo "$all_xdsh_output" | awk -F"=" '/IMAGENAME/ {gsub(/IMAGENAME/,"",\$1); gsub(/'"'"'/,"",\$2); print \$1 \$2}'`;
# Check to verify xdsh worked and returned some usefull information
if (length($xcatinfo_image_name) <= 1) {
probe_utils->send_msg("$output", "w", "Unable to extract image name information from compute nodes using xdsh command. No image consistency verification will be performed.");
exit 1;
}
my @xdsh_name_lines = split("[\n\r]", $xcatinfo_image_name);
my %node_running_image_uuid_hash;