]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Merge branch 'perf-thinlvhd-fixes' into 'master'
authorJonathan Davies <jonathan.davies@citrix.com>
Thu, 5 Nov 2015 11:45:10 +0000 (03:45 -0800)
committerJonathan Davies <jonathan.davies@citrix.com>
Thu, 5 Nov 2015 11:45:10 +0000 (03:45 -0800)
Perf thinlvhd fixes

1- add fixes to the thin-lvhd performance tcs

2- add support for running thin-lvhd performance tcs on a lvmoiscsi SR backed by a physical netapp filer

3- extend resources.py ISCSIVMLun to allow the ISCSI VM to be backed by specific SRs in the host

4- add support for runninng the io latency thin-lvhd tc on a local lvmoiscsi supported by a local VM backed by a local SSD

5- add support for fio in the io latency thin-lvhd tc

NB: may need review by QA team due to (3) above.

See merge request !41

1  2 
exec/testcases/xenserver/tc/perf/thinlvhdperf.py
exec/xenrt/resources.py

index 67041076274eaac277589cf5c08134a121f1e8b7,ad78552578e50d992f90ada1d813fd75549a00e5..d2190ddd3443e08129187e18171d45a464b84037
@@@ -68,14 -68,36 +68,35 @@@ class ThinLVHDPerfBase(testcases.xenser
          """Create a SR with given parameters"""
  
          if self.srtype=="lvmoiscsi":
-             size = srsize * xenrt.KILO # converting size to MiB
-             lun = xenrt.ISCSITemporaryLun(size)
-             sr = xenrt.lib.xenserver.ISCSIStorageRepository(self.host, "lvmoiscsi", thin_prov=self.thinprov)
-             sr.create(lun, subtype="lvm", physical_size=size, findSCSIID=True, noiqnset=True)
+             size = srsize * xenrt.GIGA # converting size from GiB to bytes
+             if self.luntype=="default": # xenrt default lun for the host, usually a netapp backend
+                 sr = xenrt.lib.xenserver.ISCSIStorageRepository(self.host, "lvmoiscsi", thin_prov=self.thinprov)
+                 sr.create(subtype="lvm", physical_size=size, findSCSIID=True)
+             elif self.luntype.startswith("controller"): # uses a iscsi server vm in the controller
+                 lun = xenrt.ISCSITemporaryLun(size)
+                 sr = xenrt.lib.xenserver.ISCSIStorageRepository(self.host, "lvmoiscsi", thin_prov=self.thinprov)
+                 sr.create(lun, subtype="lvm", physical_size=size, findSCSIID=True, noiqnset=True)
+             elif self.luntype.startswith("localvm"): # uses a iscsi server vm in the same host as the test vm
+                 local_disk = None
+                 if len(self.luntype.split(":")) > 1:
+                     local_disk = self.luntype.split(":")[1]
+                 # create fast lvm sr in dom0 on the chosen dom0 local_disk
+                 diskname = self.host.execdom0("basename `readlink -f %s`" % local_disk).strip()
+                 sr = xenrt.lib.xenserver.LVMStorageRepository(self.host, 'SR-%s' % diskname)
+                 sr.create(local_disk)  # TODO: default to what when local_disk is None?
+                 # create local iscsi server vm backed by a fast local lvm sr on the chosen dom0 local_disk
+                 lun = xenrt.ISCSIVMLun(host=self.host, sruuid=sr.uuid)
+                 sr = xenrt.lib.xenserver.ISCSIStorageRepository(self.host, "lvmoiscsi", thin_prov=self.thinprov)
+                 sr.create(lun, subtype="lvm", physical_size=size, findSCSIID=True, noiqnset=True)
+             else:
+                 raise xenrt.XRTError("LUN Type: %s not supported in the test" % self.luntype)
          elif self.srtype=="lvmohba":
 -            fcLun = self.host.lookup("SR_FCHBA", "LUN0")
 -            fcSRScsiid = self.host.lookup(["FC", fcLun, "SCSIID"], None)
 +            fcLun = xenrt.HBALun([self.host])
              sr = xenrt.lib.xenserver.FCStorageRepository(self.host,  "lvmohba", thin_prov=self.thinprov)
 -            sr.create(fcSRScsiid)
 +            sr.create(fcLun)
          elif self.srtype=="nfs":
              sr = xenrt.lib.xenserver.NFSStorageRepository(self.host, "nfssr")
              sr.create()
Simple merge