From 2cc06ef0b70054c42906d5208b7c4999e929bb5d Mon Sep 17 00:00:00 2001 From: zet809 Date: Wed, 21 Nov 2018 13:49:17 +0800 Subject: [PATCH] Fix issue 5721: xCAT-client rpm seems to depend on xCAT-server (#5826) --- perl-xCAT/xCAT/FSPpower.pm | 3 ++- perl-xCAT/xCAT/PPCboot.pm | 1 + perl-xCAT/xCAT/PPCpower.pm | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/FSPpower.pm b/perl-xCAT/xCAT/FSPpower.pm index 972c22791..9aad0c01e 100644 --- a/perl-xCAT/xCAT/FSPpower.pm +++ b/perl-xCAT/xCAT/FSPpower.pm @@ -8,7 +8,6 @@ use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR); use xCAT::PPCpower; use xCAT::FSPUtils; use xCAT::GlobalDef; -use xCAT_monitoring::monitorctrl; #use Data::Dumper; @@ -183,6 +182,7 @@ sub powercmd_boot { } } if (%newnodestatus) { + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); } return (\@output); @@ -364,6 +364,7 @@ sub powercmd { } if (%newnodestatus) { + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); } return (\@output); diff --git a/perl-xCAT/xCAT/PPCboot.pm b/perl-xCAT/xCAT/PPCboot.pm index c29da6816..80d80f919 100644 --- a/perl-xCAT/xCAT/PPCboot.pm +++ b/perl-xCAT/xCAT/PPCboot.pm @@ -614,6 +614,7 @@ sub rnetboot { my $newstat = $::STATUS_POWERING_ON; my %newnodestatus = (); $newnodestatus{$newstat} = [$node]; + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return ([ [ $node, "Success", $Rc ] ]); } diff --git a/perl-xCAT/xCAT/PPCpower.pm b/perl-xCAT/xCAT/PPCpower.pm index e61dbbcbf..77e73704e 100644 --- a/perl-xCAT/xCAT/PPCpower.pm +++ b/perl-xCAT/xCAT/PPCpower.pm @@ -9,7 +9,6 @@ use xCAT::MsgUtils; use xCAT::FSPpower; use xCAT::GlobalDef; -use xCAT_monitoring::monitorctrl; ########################################################################## # Parse the command line for options and operands @@ -301,6 +300,7 @@ sub powercmd_boot { } } + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return (\@output); } @@ -423,6 +423,7 @@ sub powercmd { } } } + require xCAT_monitoring::monitorctrl; xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1); return (\@result); }