Mailing List Archive

[OSSTEST PATCH 12/16] Introduce guest_mk_lv_name
This changes the way the disk name is constructed but not to any
overall effect.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
Osstest/TestSupport.pm | 9 +++++++--
ts-debian-install | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 5e6b15d9..12aaba79 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -76,7 +76,7 @@ BEGIN {
target_jobdir target_extract_jobdistpath_subdir
target_extract_jobdistpath target_extract_distpart
target_tftp_prefix
- lv_create lv_dev_mapper
+ lv_create lv_dev_mapper guest_mk_lv_name

poll_loop tcpconnect await_tcp
contents_make_cpio file_simple_write_contents
@@ -2177,6 +2177,11 @@ sub guest_var_commalist ($$) {
return split /\,/, guest_var($gho,$runvartail,'');
}

+sub guest_mk_lv_name ($$) {
+ my ($gho, $suffix) = @_;
+ return "$gho->{Name}".$suffix;
+}
+
sub prepareguest ($$$$$$) {
my ($ho, $gn, $hostname, $tcpcheckport, $mb,
$boot_timeout) = @_;
@@ -2205,7 +2210,7 @@ sub prepareguest ($$$$$$) {
# If we have defined guest specific disksize, use it
$mb = guest_var($gho,'disksize',$mb);
if (defined $mb) {
- store_runvar("${gn}_disk_lv", $r{"${gn}_hostname"}.'-disk');
+ store_runvar("${gn}_disk_lv", guest_mk_lv_name($gho, '-disk'));
}

if (defined $mb) {
diff --git a/ts-debian-install b/ts-debian-install
index f07dd676..8caa9d76 100755
--- a/ts-debian-install
+++ b/ts-debian-install
@@ -100,7 +100,7 @@ END

my $cfg= "/etc/xen/$gho->{Name}.cfg";
store_runvar("$gho->{Guest}_cfgpath", $cfg);
- store_runvar("$gho->{Guest}_swap_lv", "$gho->{Name}-swap");
+ store_runvar("$gho->{Guest}_swap_lv", guest_mk_lv_name($gho, "-swap"));
}

prep();
--
2.20.1