From: John Dilley Date: Tue, 17 Nov 2015 07:00:40 +0000 (+0000) Subject: set local_sr_post_install automatically X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4888af2e11909eaeaa00d4f5c77df784f281e48a;p=xenrt-citrix%2Fxenrt.git set local_sr_post_install automatically --- diff --git a/exec/testcases/xenserver/tc/install.py b/exec/testcases/xenserver/tc/install.py index 9aa1459ab..c9a540495 100755 --- a/exec/testcases/xenserver/tc/install.py +++ b/exec/testcases/xenserver/tc/install.py @@ -900,7 +900,6 @@ class TC27246(xenrt.TestCase): guest_disks = self.lookup(["UCSISCSI", "GUEST_DISKS"]) self.override("OPTION_CARBON_DISKS", carbon_disks) self.override("OPTION_GUEST_DISKS", guest_disks) - self.override("LOCAL_SR_POST_INSTALL", "no") self.override("DOM0_EXTRA_ARGS", "use_ibft") self.host = xenrt.lib.xenserver.createHost(id=0, installnetwork="NSEC") diff --git a/exec/xenrt/lib/xenserver/host.py b/exec/xenrt/lib/xenserver/host.py index 98d3bc62e..f38044a20 100755 --- a/exec/xenrt/lib/xenserver/host.py +++ b/exec/xenrt/lib/xenserver/host.py @@ -215,10 +215,8 @@ def createHost(id=0, # If we're multipathed, we'll need to create the local SR after installation, if not then the installer can set it up for us if len(iScsiBootNets) > 1: xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"OPTION_ROOT_MPATH"],"yes") - xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"LOCAL_SR_POST_INSTALL"],"yes") else: xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"OPTION_ROOT_MPATH"],"no") - xenrt.TEC().config.setVariable(["HOST_CONFIGS",host.getName(),"LOCAL_SR_POST_INSTALL"],"no") if enableAllPorts: host.enableAllNetPorts() @@ -1011,7 +1009,7 @@ class Host(xenrt.GenericHost): # If we want to create the Local SR manually, set up the firstboot script here firstBootSRInfo = None - if self.lookup("LOCAL_SR_POST_INSTALL", False, boolean=True): + if self.mpathRoot and guestdisks != [primarydisk]: defaultSRType = self.lookup("DEFAULT_SR_TYPE", "lvm") if installSRType: firstBootSRInfo = (guestdisks[0], installSRType) diff --git a/exec/xenrt/lib/xenserver/install.py b/exec/xenrt/lib/xenserver/install.py index f9bebf711..26f66c734 100644 --- a/exec/xenrt/lib/xenserver/install.py +++ b/exec/xenrt/lib/xenserver/install.py @@ -870,7 +870,7 @@ sleep 30 workdir = xenrt.TEC().getWorkdir() # If we want to create the Local SR manually, set up the firstboot script here self.firstBootSRInfo = None - if self.host.lookup("LOCAL_SR_POST_INSTALL", False, boolean=True): + if self.host.mpathRoot and guestdisks != [primarydisk]: defaultSRType = self.host.lookup("DEFAULT_SR_TYPE", "lvm") if installSRType: self.firstBootSRInfo = (guestdisks[0], installSRType) diff --git a/exec/xenrt/racktableslink.py b/exec/xenrt/racktableslink.py index 2b2aa6b10..4ca65886a 100755 --- a/exec/xenrt/racktableslink.py +++ b/exec/xenrt/racktableslink.py @@ -282,9 +282,6 @@ def readMachineFromRackTables(machine,kvm=False,xrtMachine=None): if not xenrt.TEC().lookupHost(machine, "OPTION_ROOT_MPATH", None): if o.getAttribute("Multipath Root Disk") == "Yes": xenrt.GEC().config.setVariable(["HOST_CONFIGS",machine,"OPTION_ROOT_MPATH"], "enabled") - if not xenrt.TEC().lookupHost(machine, "LOCAL_SR_POST_INSTALL", None) \ - and xenrt.TEC().lookupHost(machine, "OPTION_CARBON_DISKS", None) != xenrt.TEC().lookupHost(machine, "OPTION_GUEST_DISKS", None): - xenrt.GEC().config.setVariable(["HOST_CONFIGS",machine,"LOCAL_SR_POST_INSTALL"], "yes") # Other config comment = o.getComment() or ""