From 39a82b35b2c0cd7d71da1977129de13b8cb6ccf9 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 3 Apr 2009 19:12:56 +0000 Subject: [PATCH] -Make analagous fixes to virtualization plugins that were made to ipmi and blade plugins git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3088 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 6 +++--- xCAT-server/lib/xcat/plugins/xen.pm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 24d7d5161..97980b7af 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -79,7 +79,7 @@ sub waitforack { my $select = new IO::Select; $select->add($sock); my $str; - if ($select->can_read(10)) { # Continue after 10 seconds, even if not acked... + if ($select->can_read(60)) { # Continue after 10 seconds, even if not acked... if ($str = <$sock>) { } else { $select->remove($sock); #Block until parent acks data @@ -849,7 +849,7 @@ sub process_request { } my $children = 0; - $SIG{CHLD} = sub { my $cpid; while ($cpid = waitpid(-1, WNOHANG) > 0) { delete $vm_comm_pids{$cpid}; $children--; } }; + $SIG{CHLD} = sub { my $cpid; while ($cpid = waitpid(-1, WNOHANG) > 0) { if ($vm_comm_pids{$cpid}) { delete $vm_comm_pids{$cpid}; $children--; } } }; my $inputs = new IO::Select;; my $sub_fds = new IO::Select; %hyphash=(); @@ -1042,7 +1042,7 @@ sub forward_data { while ($data !~ /ENDOFFREEZE6sK4ci/) { $data .= <$rfh>; } - print $rfh "ACK\n"; + eval { print $rfh "ACK\n"; }; #ignore failures to send inter-process ack my $responses=thaw($data); foreach (@$responses) { #save the nodes that has errors and the ones that has no-op for use by the node status monitoring diff --git a/xCAT-server/lib/xcat/plugins/xen.pm b/xCAT-server/lib/xcat/plugins/xen.pm index fa3075449..daaf3fdb3 100644 --- a/xCAT-server/lib/xcat/plugins/xen.pm +++ b/xCAT-server/lib/xcat/plugins/xen.pm @@ -79,7 +79,7 @@ sub waitforack { my $select = new IO::Select; $select->add($sock); my $str; - if ($select->can_read(10)) { # Continue after 10 seconds, even if not acked... + if ($select->can_read(60)) { # Continue after 10 seconds, even if not acked... if ($str = <$sock>) { } else { $select->remove($sock); #Block until parent acks data @@ -714,7 +714,7 @@ sub process_request { } my $children = 0; - $SIG{CHLD} = sub { my $cpid; while ($cpid = waitpid(-1, WNOHANG) > 0) { delete $vm_comm_pids{$cpid}; $children--; } }; + $SIG{CHLD} = sub { my $cpid; while ($cpid = waitpid(-1, WNOHANG) > 0) { if ($vm_comm_pids{$cpid}) { delete $vm_comm_pids{$cpid}; $children--; } } }; my $inputs = new IO::Select;; my $sub_fds = new IO::Select; %hyphash=(); @@ -899,7 +899,7 @@ sub forward_data { while ($data !~ /ENDOFFREEZE6sK4ci/) { $data .= <$rfh>; } - print $rfh "ACK\n"; + eval { print $rfh "ACK\n"; }; my $responses=thaw($data); foreach (@$responses) { #save the nodes that has errors and the ones that has no-op for use by the node status monitoring