Skip to content
Snippets Groups Projects
  1. Jul 07, 2009
    • Iustin Pop's avatar
      Export more stats in hspace · 8c4c6a8a
      Iustin Pop authored
      This patch changes Cluster.totalResources to compute more resources and
      prints them in hspace.
      8c4c6a8a
    • Iustin Pop's avatar
      Fix score calculation to work with empty clusters · 16103319
      Iustin Pop authored
      Currently the cluster score calculation includes an offline instance
      percentage, expressed as “offline inst / (offline + online inst)”, which
      results in NaN for empty clusters. This patch changes the calculation
      such that clusters with no offline instances (this criteria includes
      completely empty clusters) get a score of zero on this component of the
      total score.
      16103319
  2. Jul 06, 2009
    • Iustin Pop's avatar
      Simplify Cluster.computeMoves · 41c3b292
      Iustin Pop authored
      This patch changes the function Cluster.computeMoves to use guards and a
      couple of subexpressions in order to greatly simplify it.
      41c3b292
    • Iustin Pop's avatar
      Fix hlint-generated warnings · 9f6dcdea
      Iustin Pop authored
      This big patch cleans up the code per hlint indications. Many removals
      of extra parentheses, replacements of concat . map with concabtMap,
      extra dollar signs, eta reductions, etc. were performed.
      
      The code still compiles and passes a couple of manual tests on sample
      files. The individual changes are also small enough as to be visually
      easy to confirm.
      9f6dcdea
  3. Jul 05, 2009
    • Iustin Pop's avatar
      Introduce a new type for allocation results · f2280553
      Iustin Pop authored
      Currently the allocation/move operations workflow return ‘Maybe a’,
      which is very convenient but loses all details about the failure mode.
      
      This patch introduces a new data type which encodes the specific failure
      mode. It is not yet used correctly (e.g. all node operations result in
      FailN1), but the workflow is updated. Most of the changes are in the
      hail/hspace tools, the library code required only trivial adjustments.
      f2280553
    • Iustin Pop's avatar
      Remove hn1 and related code · 266aea94
      Iustin Pop authored
      hn1 was deprecated for a while and this patch removes it altogether. The
      support code in Cluster.hs is also removed.
      266aea94
  4. Jul 03, 2009
  5. Jul 02, 2009
    • Iustin Pop's avatar
      Add a new type for cluster statistics · 1a7eff0e
      Iustin Pop authored
      Currently totalResources returns a 5-tuple of integers. This is not easy
      to handle, as each change on the return type means that each caller must
      be updated.
      
      This patch adds a new type for cluster stats and uses that instead as
      its return type. This simplifies its callers while complicating only a
      little the computation of the stats.
      1a7eff0e
    • Iustin Pop's avatar
      Add display of more stats in hspace · e2af3156
      Iustin Pop authored
      This patch changes Cluster.totalResources to compute more details about
      the cluster status, and enhances hspace to display more of these.
      e2af3156
  6. Jun 16, 2009
  7. Jun 11, 2009
    • Iustin Pop's avatar
      Fix the various monomorphism warning · 78694255
      Iustin Pop authored
      In a few places (e.g. tryRead or any printf call) it's a little bit hard
      to add the correct type signatures, but in the it is possible to fix
      these warnings (which can bite one in subtle cases).
      78694255
    • Iustin Pop's avatar
      Small changes to the node list output · 3c64b5aa
      Iustin Pop authored
      This is just some cleanup of the node list output, adding pcpu/vcpu
      counters, and making the display slightly nicer.
      3c64b5aa
  8. Jun 10, 2009
  9. Jun 04, 2009
    • Iustin Pop's avatar
      Fix the ReplacePrimary instance move · 70db354e
      Iustin Pop authored
      During a replace-primary instance move, on the real cluster the instance
      is temporarily started on the secondary, and as such we must check that
      the secondary node can hold it for this duration. Currently the code
      does not, and depending on cluster scoring it will put instances on such
      'bad' secondaries (usually without enough memory).
      
      This patch fixes this by adding/removing the instance as a primary on
      the secondary node; and then using the result node as the new secondary.
      (Since we're in a monad, we could have just tried the allocation and
      dropped the result, but this is more clear).
      70db354e
  10. Jun 01, 2009
  11. May 27, 2009
  12. May 26, 2009
    • Iustin Pop's avatar
      Change the module import hierarchy · 262a08a2
      Iustin Pop authored
      This patch makes the Types module a base module, and Node/Instance ones
      import it, from the previous (opposite) situation. This will allow in
      the future to use newtypes for the index and name types.
      262a08a2
  13. May 25, 2009
  14. May 24, 2009
    • Iustin Pop's avatar
      Implement hail allocate (for 2-node requests) · 4a340313
      Iustin Pop authored
      This patch implements allocate for two node requests. One node requests
      can be done as soon as we have a valid allocateOn function for single
      nodes.
      4a340313
    • Iustin Pop's avatar
      Working implementation if relocate · 58709f92
      Iustin Pop authored
      This patch completes the implementation of hail relocate. It maps all
      valid destination nodes through a ReplaceSecondary IMove, filters out
      the failed relocations, computes the resulting scores and picks the
      lowest one.
      58709f92
  15. May 23, 2009
  16. May 22, 2009
    • Iustin Pop's avatar
      More code reorganizations · e4c5beaf
      Iustin Pop authored
      This new big patch does a couple of more cleanups in the loading of data
      chapter:
        - introduce a Types module that holds most types (except the base
          Node/Instance/etc.) so that multiple other modules can use these
          (instead of only Cluster and its users)
        - bring IAlloc.hs in line with the recent changes of providing data
          types and not strings
        - removal of obsolete Utils.hs json-related functions
      e4c5beaf
    • Iustin Pop's avatar
      Rework the loader model · 040afc35
      Iustin Pop authored
      This big patch changes the loader model from “string data as common
      format” to actual object structures as common format.
      
      The text loading function move from Cluster.hs to a new Text.hs module,
      some common functions are moved to a new Loader.hs module, and the
      return values from both Rapi.hs and Text.hs are uniformized.
      040afc35
  17. May 21, 2009
  18. May 20, 2009
    • Iustin Pop's avatar
      Add initial validation checks in Cluster.loadData · 9d3fada5
      Iustin Pop authored
      This patch converts loadTabular and loadData to a monadic form, thus
      allowing meaningful error messages from the node/instance load routines.
      9d3fada5
    • Iustin Pop's avatar
      Convert Cluster.loadData to Result return · fd22ce8e
      Iustin Pop authored
      This patch changes Cluster.loadData to return a Result, instead of
      directly the values; this will allow us to return meaningful error
      values (e.g. when an instances lives on unknown node) rather than simply
      abort. Currently the result is always an Ok, the actual signalling of
      errors will come later.
      
      Its callers are changed to accommodate for the new return type and to
      display errors as needed.
      fd22ce8e
  19. May 19, 2009
    • Iustin Pop's avatar
      Don't consider offline nodes as N+1 failed · 234d8af0
      Iustin Pop authored
      This is just a cosmetic (I hope) change; the nodes shouldn't be used
      anyway, and we only correct the display message.
      234d8af0
    • Iustin Pop's avatar
      Add support for 'offline' nodes · 00b15752
      Iustin Pop authored
      This patch drops compatiblity with Ganeti 1.2 and adds support for
      offline nodes in the cluster. When reading from RAPI, the drained nodes
      are considered offline so that we don't allocate on them too.
      00b15752
Loading