Skip to content
Snippets Groups Projects
  1. May 20, 2010
    • Iustin Pop's avatar
      Stop modifying names for internal computations · 3e4480e0
      Iustin Pop authored
      Currently the name used internally is modified and holds the shortened
      name of the nodes/instances. This has caused issues before, since we
      always have to strip the suffix from input data and reapply it if we
      need to send data back to Ganeti.
      
      This patch changes the code such that the names are never modified, only
      the alias, and all the internal computations can forget about the common
      suffix addition/removal.
      3e4480e0
  2. Feb 25, 2010
  3. Feb 22, 2010
  4. Dec 01, 2009
  5. Sep 28, 2009
    • Iustin Pop's avatar
      Turn on, and fix, more warnings · fbb95f28
      Iustin Pop authored
      The Makefile was intented to be -Wall and not simply -W, but I missed
      that. This enables more warnings and also enables -Werror (except for
      the tests).
      fbb95f28
  6. Jul 15, 2009
    • Iustin Pop's avatar
      Unify the command line options and structures · 0427285d
      Iustin Pop authored
      This patch moves all the command line options and their internal
      representation into CLI.hs. This means that duplicated options between
      any two binaries are no longer declared twice, and that we no longer
      need the two *Option classes.
      0427285d
  7. Jul 09, 2009
    • Iustin Pop's avatar
      Change the tryAlloc/tryReloc workflow · 478df686
      Iustin Pop authored
      Currently, the tryAlloc and tryReloc function return a list with all the
      results, both failures and successes. This is fine for hail, which does
      one round of allocations, but is not so good for hspace, which does
      iterative rounds; since at each (successful) step we only take the best
      solution, it means that we're using lots of heap space to compute and
      store node lists which are thrown away at the end of the step.
      
      This patch changes these two functions and their callers in hail/hspace
      to only return the best solution, and error/success counters. This
      allows hspace to run in a much smaller space, and reduces GC cost
      greatly.
      
      Overall, it is a cleanup, as hail/hspace did a lot of work to chose this
      best solution, whereas now it's automatically promoted within
      Cluster.concatAllocs.
      478df686
  8. Jul 08, 2009
    • Iustin Pop's avatar
      Slight change to the internal allocation results · 8880d889
      Iustin Pop authored
      Currently the Cluster.AllocSolution type is defined as a list of
      ‘(OpResult Node.list, …)’ and the results for applyMove are defined as
      ‘(OpResult Node.List, …)’. Both these means that the failure/success
      indication is hidden in the first elements of this tuple, which makes is
      harder to add other elements depending on the success/failure (like the
      score for the new node list).
      
      This patch moves the OpResult to outside of the tuple, in effect making
      all these ‘OpResult (…)’ which makes the internal tuple elements
      consistent. The patch is affecting the applyMove, tryAlloc and
      tryRealloc functions, and only briefly the hail and hspace programs.
      8880d889
  9. Jul 07, 2009
    • Iustin Pop's avatar
      Show errors on stderr instead of stdout · 2795466b
      Iustin Pop authored
      Currently many of the exit and warning conditions mistakenly display error
      messages on stdout, which makes parsing the output of programs harder. This
      patch attempts to fix such occurrences.
      2795466b
  10. Jul 06, 2009
    • 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
  11. 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
  12. Jun 11, 2009
    • Iustin Pop's avatar
      Fix 'unused X' warnings · c6484f0b
      Iustin Pop authored
      This removes some unused functions and imports to cleanup the warnings.
      c6484f0b
    • 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
  13. Jun 01, 2009
    • Iustin Pop's avatar
      Rework the tryAlloc/tryReloc functions · 9dcec001
      Iustin Pop authored
      Currently tryAlloc/tryReloc do not return the new instance, as this is
      not needed for IAllocator alloc/reloc requests. However, for computing
      the space, the new instance is useful, so we modify these functions to
      return this information too.
      
      The patch also improves hspace to have (with default parameters) a
      parseable output.
      9dcec001
    • Iustin Pop's avatar
      Add copyright/license information · e2fa2baf
      Iustin Pop authored
      This doc-patch adds copyright and license information to (hopefully) all
      needed files.
      e2fa2baf
    • Iustin Pop's avatar
      Move some alloc functions from hail into Cluster · dbba5246
      Iustin Pop authored
      These are generic enough to be used from multiple places, they belong
      better in Cluster.hs than in the hail source.
      dbba5246
    • Iustin Pop's avatar
      Move the RqType and Request types to Loader.hs · 19f38ee8
      Iustin Pop authored
      These two will be more generic than now, and belong somewhere else -
      Loader.hs is a generic module for data loading, thus we move them there.
      19f38ee8
  14. May 27, 2009
    • Iustin Pop's avatar
      Add type synonyms for the node/instance indices · 608efcce
      Iustin Pop authored
      This is a first step towards full datatype renaming. That requires more
      changes, so at first we only want to document clearly what is a node
      index, what is an instance index, and what is a plain Int.
      608efcce
  15. 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
  16. May 25, 2009
  17. May 24, 2009
  18. May 23, 2009
  19. 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
  20. May 21, 2009
    • Iustin Pop's avatar
      Initial work on hail · 585d4420
      Iustin Pop authored
      This makes hail compile and get a request parsed via IAlloc, but nothing
      more.
      585d4420
  21. May 20, 2009
    • 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
    • Iustin Pop's avatar
      Switch from hand-written monads to a real one · 942403e6
      Iustin Pop authored
      This big patch converts from our home-grown monad-like constructs
      (the Either stuff) to a real, Either-like-but-another-name monad.
      
      We introduce a “Result a” monad, and this allows dropping many of the
      extra constructs. Hopefully the code is also more clear.
      
      Many of the functions could now be written in a generic-monad style,
      instead of Result specifically, but that will come in future patches.
      
      IAlloc.hs also has some unrelated patches.
      942403e6
  22. Apr 26, 2009
    • Iustin Pop's avatar
      hbal: add a --quiet option · d09b6ed3
      Iustin Pop authored
      This option is the opposite of the --verbose option, and it allows
      decreasing the verbosity level from the default of one to zero (which
      currently doesn't show the warning messages for missing disk/memory).
      d09b6ed3
  23. Apr 25, 2009
Loading