]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
set local_sr_post_install automatically
authorJohn Dilley <john.dilley@citrix.com>
Tue, 17 Nov 2015 07:00:40 +0000 (07:00 +0000)
committerJohn Dilley <john.dilley@citrix.com>
Tue, 17 Nov 2015 07:00:40 +0000 (07:00 +0000)
exec/testcases/xenserver/tc/install.py
exec/xenrt/lib/xenserver/host.py
exec/xenrt/lib/xenserver/install.py
exec/xenrt/racktableslink.py

index 9aa1459ab00ba1baadb1e6cd9e330febde8bbf5f..c9a5404950a2d2bc909fd4be9698601ec49881f5 100755 (executable)
@@ -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")
 
index 98d3bc62e730f3a10228ec2d898e255a2828fad0..f38044a2035376acb2a19ab3f118be2b78abe61d 100755 (executable)
@@ -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)
index f9bebf711149c2085b6000e22268fc8d0bf565c4..26f66c734aade89c30f90ca68dbcddc063388765 100644 (file)
@@ -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)
index 2b2aa6b106958fb8eeda3dd699cb11bf9fa6ee04..4ca65886ad223eb66a26acc65a81a78b7afcd30a 100755 (executable)
@@ -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 ""