diff --git a/perl-xCAT/xCAT/PPCpower.pm b/perl-xCAT/xCAT/PPCpower.pm index 71dcd7233..c54127e48 100644 --- a/perl-xCAT/xCAT/PPCpower.pm +++ b/perl-xCAT/xCAT/PPCpower.pm @@ -192,6 +192,14 @@ sub powercmd_boot { my $state = power_status($data->{$id}); my $op = ($state =~ /^off$/) ? "on" : "reset"; + # Attribute powerinterval in site table, + # to control the rpower forking speed + if ((defined($request->{op})) && ($request->{op} ne 'stat') && ($request->{op} ne 'status') + && ($request->{op} ne 'state') && ($request->{op} ne 'off') && ($request->{op} ne 'softoff')) { + if(defined($request->{'powerinterval'}) && ($request->{'powerinterval'} ne '')) { + Time::HiRes::sleep($request->{'powerinterval'}); + } + } ############################## # Send power command ############################## @@ -279,6 +287,14 @@ sub powercmd { #################################### while (my ($name,$d) = each(%$hash) ) { + # Attribute powerinterval in site table, + # to control the rpower forking speed + if ((defined($request->{op})) && ($request->{op} ne 'stat') && ($request->{op} ne 'status') + && ($request->{op} ne 'state') && ($request->{op} ne 'off') && ($request->{op} ne 'softoff')) { + if(defined($request->{'powerinterval'}) && ($request->{'powerinterval'} ne '')) { + Time::HiRes::sleep($request->{'powerinterval'}); + } + } ################################ # Send command to each LPAR ################################ diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 5154d6965..69596ebb9 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -656,6 +656,8 @@ site => { " the node deployment, node discovery and power operations.\n\n". " ntpservers: A comma delimited list of NTP servers for the cluster - often the\n". " xCAT management node.\n\n". + " powerinterval: The time of seconds that rpower command will wait between performing action on each target object,\n". + " it is useful especially for controlling the cluster boot up speed in large clusters.\n\n". " ppcmaxp: The max # of processes for PPC hw ctrl.\n\n". " ppcretry: The max # of PPC hw connection attempts before failing.\n\n". " ppctimeout: The timeout, in milliseconds, to use when communicating with PPC hw.\n\n".