Update compiler_server_virsh.pl

This commit is contained in:
Pragmatic Software 2017-12-02 11:28:19 -08:00
parent e7b348573f
commit 161488c850
1 changed files with 6 additions and 6 deletions

View File

@ -40,6 +40,7 @@ sub vm_start {
}
sub vm_reset {
return if $ENV{NORESET};
system("virsh detach-disk $DOMAIN_NAME vdb");
system("virsh snapshot-revert $DOMAIN_NAME 1");
system("virsh attach-disk $DOMAIN_NAME --source /var/lib/libvirt/images/factdata.qcow2 --target vdb");
@ -55,7 +56,7 @@ sub execute {
my ($ret, $result);
$SIG{CHLD} = 'IGNORE';
#$SIG{CHLD} = 'IGNORE';
my $child = fork;
@ -216,8 +217,8 @@ sub compiler_server {
if(not defined $ret) {
#print "parent continued\n";
print "parent continued [$result]\n";
$timed_out = 1 if $result == 243; # -13 == 243
$killed = 1 if $result == 242; # -14 = 242
$timed_out = 1 if $result == 243 or $result == -13; # -13 == 243
$killed = 1 if $result == 242 or $result == -14; # -14 = 242
last;
}
@ -246,12 +247,11 @@ sub compiler_server {
close $client;
next unless ($timed_out or $killed);
vm_reset;
next;
#next unless ($timed_out or $killed);
#next unless $timed_out;
print "stopping vm\n";
vm_stop;
$running = 0;