Commit 0cdcd480 authored by Leigh Stoller's avatar Leigh Stoller

Whole disk fix, we should not encode this implicitly with loadpart

and loadlength!
parent 2a99a802
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -419,11 +419,20 @@ if (defined($base_image)) {
# Short form uses wholedisk instead. Should fix this.
if ($base_image->loadpart() == 0 && $base_image->loadlength() == 4) {
$xmlfields{"loadpart"} = 1;
$xmlfields{"wholedisk"} = 1;
}
elsif ($wholedisk) {
$xmlfields{"loadpart"} = 1;
#
# Ick. we have to tell newimageid_ez the correct loadpart, since
# it uses that as the boot partition.
#
for (my $i = 1; $i <= 4; $i++) {
my $func = "part${i}_osid";
my $foo = $base_image->$func();
if (defined($foo) && $foo == $base_image->default_osid()) {
$xmlfields{"loadpart"} = $i;
last;
}
}
}
}
elsif ($isvirtnode) {
......
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