From 54cd535f0652f5c5736f03290725a5c3559adb17 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 21 May 2019 14:11:20 -0400 Subject: [PATCH 1/3] Improve messages for rflash --- perl-xCAT/xCAT/PPCrflash.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index 4e080174b..b80bb82e2 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -225,7 +225,7 @@ sub parse_args { return (usage()); } - $request->{callback}->({ data => ["It may take considerable time to complete, depending on the number of systems being updated. In particular, power subsystem updates may take an hour or more if there are many attached managed systems. Please waiting. "] }); + $request->{callback}->({ data => ["It may take considerable time to complete, depending on the number of systems being updated. In particular, power subsystem updates may take an hour or more if there are many attached managed systems. Please wait. "] }); if ($request->{hwtype} =~ /^(fsp|bpa)$/ && $opt{activate} =~ /^disruptive$/) { $request->{callback}->({ data => ["You can find the log files in the /var/log/xcatd/dfm/rflash/."] }); @@ -844,7 +844,7 @@ sub rflash { } - push(@value, [ $hmc, "copy files to $hmc completely" ]); + push(@value, [ $hmc, "copying of files to $hmc completed" ]); ############################################### # Now that all the stanzas files have been built and copied to the HMCs, @@ -886,7 +886,7 @@ sub rflash { my $rsp = {}; $rsp->{data}->[0] = "Error from xdsh. Return Code = $::RUNCMD_RC"; xCAT::MsgUtils->message("S", $rsp, $::CALLBACK, 1); - dpush(\@value, [ $hmc, "failed to run xdsh" ]); + dpush(\@value, [ $hmc, "failed to run xdsh command - $cmd_hmc" ]); push(@value, [ $hmc, $rsp->{data}->[0] ]); push(@value, [ $hmc, "Failed to upgrade the firmware of $mtms_t on $hmc" ]); return (\@value); From a761eb5404511a18c2590e915a528d1813e13e68 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Wed, 22 May 2019 13:56:36 -0400 Subject: [PATCH 2/3] Improve the message when the existing firmware level doesn't match the images provided (signed vs test) --- perl-xCAT/xCAT/PPCrflash.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index b80bb82e2..da305f0ff 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -528,7 +528,8 @@ sub get_lic_filenames { @dirlist = grep /\.rpm$/, @dirlist; @dirlist = grep /$1/, @dirlist; if (!scalar(@dirlist)) { - $msg = "There isn't a package suitable for $mtms"; + # the last grep above is using $1, which is $pns, the output message should help figure out what is wrong + $msg = "Existing firmware type is: $pns, no matching firmware package found in directory"; return ("", "", "", $msg, -1); } if (scalar(@dirlist) > 1) { From 934d92db9f4cf20b6dc2e28912498bf8d5578d23 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 28 May 2019 14:34:48 -0400 Subject: [PATCH 3/3] More message improvements --- perl-xCAT/xCAT/PPCrflash.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index da305f0ff..178817bbb 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -376,8 +376,7 @@ sub preprocess_for_rflash { my @xmllist = grep /\.xml$/, @dirlist; if (@rpmlist == 0 | @xmllist == 0) { - #send_msg($request, 1, "There isn't any rpm and xml files in the directory $packages_d!"); - $callback->({ data => ["There isn't any rpm and xml files in the directory $packages_d!"] }); + $callback->({ data => ["There are no rpm and xml files in the directory $packages_d!"] }); $request = (); return -1; }