All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 48a4dfcd authored by Leigh B Stoller's avatar Leigh B Stoller

Use sitevar for default XEN parent image.

parent 2b935452
<?php
#
# Copyright (c) 2006-2015 University of Utah and the Flux Group.
# Copyright (c) 2006-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -1097,11 +1097,15 @@ class Image
$version = $this->version();
if ($does) {
$parentosinfo = OSinfo::LookupByName("emulab-ops",
"XEN43-64-STD");
if (TBSiteVarExists("general/default_xen_parentosid")) {
$xenname = TBGetSiteVar("general/default_xen_parentosid");
}
else {
$xenname = "emulab-ops,XEN43-64-STD";
}
list($pid,$osname) = preg_split('/,/', $xenname);
$parentosinfo = OSinfo::LookupByName($pid,$osname);
if (!$parentosinfo) {
$parentosinfo = OSinfo::LookupByName("emulab-ops",
"XEN41-64-STD");
return -1;
}
$parentosid = $parentosinfo->osid();
......@@ -1113,14 +1117,6 @@ class Image
" osid='$imageid', parent_osid='$parentosid'");
DBQueryFatal("replace into osidtoimageid set ".
" osid='$imageid', type='pcvm', imageid='$imageid'");
$parentosinfo = OSinfo::LookupByName("emulab-ops",
"XEN44-64-BIGFS");
if ($parentosinfo) {
$parentosid = $parentosinfo->osid();
DBQueryFatal("replace into os_submap set ".
" osid='$imageid', parent_osid='$parentosid'");
}
}
else {
DBQueryFatal("delete from osidtoimageid ".
......
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