Commit 1fdeed66 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Back out my hotplug failure check.

Redirecting STDERR to STDOUT in the child of a pipe open, when inside
an eval, scrogs STDERR in the parent until the eval returns, so output
was getting lost.
parent 7128c682
......@@ -1555,23 +1555,18 @@ sub vnodeBoot($$$$)
libutil::setState("BOOTING");
# and finally, create the VM
my $output = ExecQuiet("$XM create $config");
return -1
if (!defined($output));
mysystem2("$XM create $config");
# We have a problem with intermittent failures. We retry if we
# get a hotplug error after a small wait.
if ($? && $output =~ /hotplug/i) {
print "Hotplug Error: Retrying after a short wait.\n";
sleep(10);
my $output = ExecQuiet("$XM create $config");
return -1
if ($?);
# We have a problem with intermittent failures.
if ($?) {
print "Guest failure: retrying after a short wait.\n";
sleep(20);
mysystem2("$XM create $config");
}
if ($?) {
print STDERR "$XM create failed: $?\n";
return -1;
}
return -1
if ($?);
print "Created virtual machine $vnode_id\n";
return 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment