Skip to content
Snippets Groups Projects
  1. Sep 18, 2012
  2. Sep 17, 2012
  3. Sep 14, 2012
  4. Sep 13, 2012
  5. Sep 12, 2012
  6. Sep 11, 2012
  7. Sep 07, 2012
    • Iustin Pop's avatar
      Simplify a bit more the test harness · f842aecd
      Iustin Pop authored
      
      We can build the test groups directly in the `testSuite' helper,
      instead of doing it (much later) in the test harness.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      f842aecd
    • Iustin Pop's avatar
      Remove the slow/fast tests functionality · 44be51aa
      Iustin Pop authored
      
      Since the recent commits improved the speed of the two "slow" test
      groups to regular test speed, we can remove this kludge and simplify
      significantly our test runner, yay!
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      44be51aa
    • Iustin Pop's avatar
      Fix arbitrary ConfigData object generation · c3a8e06d
      Iustin Pop authored
      
      The Cluster object, as it is defined right now, has many '[String]'
      members, which means that in a standard arbitrary generator these will
      become very big, which is the reason for the current slowness of the
      test 'Config_serialisation'.
      
      By resizing the generator to 8 (arbitrary chosen to limit the list
      length and the string sizes), and by reducing a bit the node count, we
      can make this test be as fast as the others (about 10x
      improvement). This means we can test more cases, for the same cost.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      c3a8e06d
    • Iustin Pop's avatar
      Improve the `AllocPolicy' test · 9e679143
      Iustin Pop authored
      
      This test has a few deficiencies, which this patch addresses:
      
      - using arbitrary 1 or 2 node count for allocation is obsolete,
        nowadays we need to use a number appropriate for the instance's disk
        template (and we should remove that parameter…)
      - generating a random node is sub-optimal, since we could generate an
        offline node, and no instance will fit on a cluster composed of only
        offline nodes
      - generating arbitrary instances "such that" they can be allocated is
        an expensive test; let's rather generate instances smaller than our
        template node, and add a check that they indeed can be allocated
      - using boolean return type, instead of nicely annotated properties
      
      For the nice annotation and the extra check, we need to change a
      helper function's signature, so that we can extract a bit more
      information out of it.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      9e679143
    • Iustin Pop's avatar
      Improve the `CanTieredAlloc' test · fb243105
      Iustin Pop authored
      
      Currently, this test is very slow. Upon investigation, this is due to
      how `tieredAlloc' works:
      
      - tries to allocate one instance
      - if failed, shrink the instance by the "most failed" resource
      - restart
      
      In this algorithm, if the "most failed" resource is e.g. memory, and
      the maximum available memory is much smaller than the current
      template, it means we will have to shrink and try to allocate many
      many times until we finally get with the to-be-allocated instance
      memory size to a reasonable value. In the real world, this is not the
      case, but when testing with arbitrary memory/node values, it can be
      that we execute the shrink hundreds of thousands of times per test.
      
      So we "improve" the test by directly generating an instance just
      slightly bigger than the node, so that we don't have to shrink too
      many times. This requires a new export from test/…/Instance.hs.
      
      Additionally, we allow up to 5 instances to be tiered-allocated, and
      we cleanup the test checks, making the conditions much, much more
      readable (IMHO).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      fb243105
    • Iustin Pop's avatar
      Add new test for checking multi-allocations · d83903ee
      Iustin Pop authored
      
      This test expands the "single-alloc-no-rebalance" by allocating a few
      instances on a small cluster, and ensuring that after we allocate all
      of them, either we can't rebalance or if we rebalance the score
      improvement is very small.
      
      The last condition is needed because sometime rounding errors (we're
      using double-precision floating point) can accumulate and result in
      what is a no real change in the cluster state, but with an
      infinitesimal score decrease (e.g. 1e-14).
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      d83903ee
    • Iustin Pop's avatar
      Improve the prop_Alloc_sane test to detect mis-allocations · 650e5aa4
      Iustin Pop authored
      
      Currently, this just checks that a cluster cannot be rebalanced after
      a single instance allocation. However, we can also test whether the
      allocation decision computed a correct new cluster score, by checking
      that against the one computed from the actual new node list.
      
      Also, for nicer display, we convert the test from a Boolean to a
      Property, with nice annotations.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      650e5aa4
    • Iustin Pop's avatar
      Merge branch 'devel-2.6' into submit · 107102af
      Iustin Pop authored
      
      * devel-2.6:
        Fix bug in non-mirrored instance allocation
        Fix gnt-debug iallocator
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
      107102af
    • Iustin Pop's avatar
      Merge branch 'stable-2.6' into devel-2.6 · 99c7795a
      Iustin Pop authored
      
      * stable-2.6:
        Fix bug in non-mirrored instance allocation
        Fix gnt-debug iallocator
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
      99c7795a
Loading