Commit 7d131ca0 authored by Mike Hibler's avatar Mike Hibler

My attempt at computing the set of images that must be loaded on a node.

parent 553571b9
......@@ -55,6 +55,7 @@ my $TESTMODE = @TESTMODE@;
# Max number of retries (per node) before its deemed fatal. This allows
# for the occasional pxeboot failure.
......@@ -582,6 +583,34 @@ sub osload ($$) {
osload_setupswapinfo(undef, undef, $node);
# For each image to be loaded, we check and see if it is a delta
# image. If so, we must follow its parent link backward til we
# find the latest full version of the image, then load those in
# reverse order.
my @nimages = ();
foreach my $image (@images) {
if ($image->isdelta()) {
my $pimage = $image;
my @ilist = ();
do {
# if it is a delta image, there had better be a parent!
$pimage = $pimage->Parent();
if (!$pimage) {
tberror "$node: delta image $image has no parent!";
goto failednode;
push(@ilist, $pimage);
} while ($pimage->isdelta());
push @nimages, reverse(@ilist);
push(@nimages, $image);
@images = @nimages;
# Determine which mode to use for reloading this node (note: this may
# become an entry in node_capabilities or something like that in the
Markdown is supported
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