]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
OPTION_ROOT_MPATH to boolean
authorJohn Dilley <john.dilley@citrix.com>
Mon, 16 Nov 2015 17:14:35 +0000 (17:14 +0000)
committerJohn Dilley <john.dilley@citrix.com>
Mon, 16 Nov 2015 17:14:35 +0000 (17:14 +0000)
exec/xenrt/config.py
exec/xenrt/lib/xenserver/host.py
exec/xenrt/lib/xenserver/install.py

index 6150256ca35c124f34db5450dd1695482db0e42f..b7f2f8b2d7ed187cc321425a26423002f0a9dc23 100755 (executable)
@@ -3456,9 +3456,9 @@ class Config(object):
         if type(s) == type(""):
             v = re.sub(r"\$\{([\w:]+)\}", self.lookupHelper, s)
             if boolean:
-                if string.lower(v[0]) in ("1", "y", "t"):
+                if string.lower(v[0]) in ("1", "y", "t", "e"):
                     return True
-                if string.lower(v[0]) in ("0", "n", "f"):
+                if string.lower(v[0]) in ("0", "n", "f", "d"):
                     return False
                 if string.lower(v) == "on":
                     return True
index 364b9d3180b8f79ac974809085b5222b72d6dd31..c0ba3fe80f0cf6e996d207315f80ee24bcc8f6f6 100755 (executable)
@@ -214,7 +214,7 @@ def createHost(id=0,
             host.bootNics = [host.listSecondaryNICs("NPRI")[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"],"enabled")
+            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"],"")
@@ -1768,10 +1768,10 @@ done
         #    # Enable SSH into the installer to aid debug if installations fail
         #    pxecfg.mbootArgsModule1Add("sshpassword=%s" % self.password)
         
-        optionRootMpath = self.lookup("OPTION_ROOT_MPATH", None)
+        optionRootMpath = self.lookup("OPTION_ROOT_MPATH", False, boolean=True)
         
-        if optionRootMpath != None and len(optionRootMpath) > 0:
-            pxecfg.mbootArgsModule1Add("device_mapper_multipath=%s" % optionRootMpath)
+        if optionRootMpath:
+            pxecfg.mbootArgsModule1Add("device_mapper_multipath=enabled")
 
         # Set up PXE for installer boot
         pxefile = pxe.writeOut(self.machine)
@@ -2156,8 +2156,8 @@ fi
         if xenrt.TEC().lookup("HOST_POST_INSTALL_REBOOT", False, boolean=True):
             self.reboot()
 
-        optionRootMpath = self.lookup("OPTION_ROOT_MPATH", None)
-        if optionRootMpath != None and len(optionRootMpath) > 0:
+        optionRootMpath = self.lookup("OPTION_ROOT_MPATH", False, boolean=True)
+        if optionRootMpath:
             # Check to ensure that there is a multipath topology if we did multipath boot.
             if not len(self.getMultipathInfo()) > 0 :
                 raise xenrt.XRTFailure("There is no multipath topology found with multipath boot")
@@ -11450,9 +11450,9 @@ done
             xenrt.TEC().warning("Using installer user extra Dom0 boot args %s"
                                 % (dom0_extra_args_user))
 
-        optionRootMpath = self.lookup("OPTION_ROOT_MPATH", None)
+        optionRootMpath = self.lookup("OPTION_ROOT_MPATH", False, boolean=True)
         
-        if optionRootMpath != None and len(optionRootMpath) > 0:
+        if optionRootMpath:
             pxecfg.mbootArgsModule1Add("device_mapper_multipath=%s" % optionRootMpath)
         
         # Set up PXE for installer boot
index f7d038df85422b5d5005641293df944fc5152805..264658181e3ed9b37e19be39eebaed1c6d8e4a9e 100644 (file)
@@ -839,10 +839,10 @@ sleep 30
         #    # Enable SSH into the installer to aid debug if installations fail
         #    pxecfg.mbootArgsModule1Add("sshpassword=%s" % self.host.password)
         
-        optionRootMpath = self.host.lookup("OPTION_ROOT_MPATH", None)
+        optionRootMpath = self.host.lookup("OPTION_ROOT_MPATH", False, boolean=True)
         
-        if optionRootMpath != None and len(optionRootMpath) > 0:
-            pxecfg.mbootArgsModule1Add("device_mapper_multipath=%s" % optionRootMpath)
+        if optionRootMpath:
+            pxecfg.mbootArgsModule1Add("device_mapper_multipath=enabled")
 
         # Set up PXE for installer boot
         pxefile = pxe.writeOut(self.host.machine)