After the many patches implementing the shared storage functionality
in iallocator, balances, etc., and after the patches preparing the
unit-tests to do the right thing for shared storage, we can finally
flip the bits that make instances have "random" disk templates as
opposed to just DRBD. Yes, the unit-tests still pass ☺

We also need to enable all disk templates in the IPolicy (for
allocation/relocation).
---
 htools/Ganeti/HTools/QC.hs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs
index 8548e9e..3e7a2f8 100644
--- a/htools/Ganeti/HTools/QC.hs
+++ b/htools/Ganeti/HTools/QC.hs
@@ -129,7 +129,7 @@ nullIPolicy = Types.IPolicy
                                        , Types.iSpecDiskCount  = 1
                                        , Types.iSpecNicCount   = 1
                                        }
-  , Types.iPolicyDiskTemplates = [Types.DTDrbd8, Types.DTPlain]
+  , Types.iPolicyDiskTemplates = [minBound..maxBound]
   , Types.iPolicyVcpuRatio = maxVcpuRatio -- somewhat random value, high
                                           -- enough to not impact us
   , Types.iPolicySpindleRatio = maxSpindleRatio
@@ -312,8 +312,8 @@ genInstanceSmallerThan lim_mem lim_dsk lim_cpu = do
   pn <- arbitrary
   sn <- arbitrary
   vcpus <- choose (0, lim_cpu)
-  return $ Instance.create name mem dsk vcpus run_st [] True pn sn
-         Types.DTDrbd8
+  dt <- arbitrary
+  return $ Instance.create name mem dsk vcpus run_st [] True pn sn dt
 
 -- | Generates an instance smaller than a node.
 genInstanceSmallerThanNode :: Node.Node -> Gen Instance.Instance
-- 
1.7.9.1

Reply via email to