1. 20 Dec, 2010 1 commit
  2. 01 Dec, 2010 3 commits
    • Iustin Pop's avatar
      Rework the types used during data loading · 99b63608
      Iustin Pop authored
      
      
      This improves on the previous change. Currently, the node and instance
      lists shipped around during data loading are (again) association lists.
      For instances it's not a big issue, but the node list is rewritten
      continuously while we assign instances to nodes, and that is very slow.
      The code was originally written for small (10-20 node) clusters, and
      today with multinodes… :)
      
      Rewriting to use Node.List/Instance.List makes a bit of a messy patch,
      but it allows to remove some custom functions for assoc. list
      processing, and also some custom unittests.
      
      At the end, the load time is almost halved, and we spend time now just
      in the string parsing code (which is, as we know, slow…).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      99b63608
    • Iustin Pop's avatar
      Loader functions: move from assoc lists to maps · 2d0ca2c5
      Iustin Pop authored
      
      
      When loading big clusters, the association lists become a bit slow, so
      we'll replace this with a simple Map String Int; the change is trivial
      and can be reverted easily, while it brings up a good speedup in the
      data loading.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      2d0ca2c5
    • Iustin Pop's avatar
      Convert some leftovers to NameAssoc · 6ff78049
      Iustin Pop authored
      
      
      The type alias NameAssoc has been introduced a long time ago, but there
      are some few not-yet-converted cases. In preparation for changes to that
      type, let's make sure we use it consistently.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
      6ff78049
  3. 20 May, 2010 3 commits
    • Iustin Pop's avatar
      Another haddoc fix… · 381be58a
      Iustin Pop authored
      381be58a
    • Iustin Pop's avatar
      Accept both full and short names in CLI · c854092b
      Iustin Pop authored
      This patch introduces some new functionality in the base Element type
      and in Container which supports searching for all 'known' names of an
      element, such that both short and full names are accept for various
      options like '-O' and '--excluded-instances'.
      c854092b
    • 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
  4. 25 Feb, 2010 1 commit
  5. 23 Feb, 2010 2 commits
  6. 22 Feb, 2010 1 commit
  7. 01 Dec, 2009 2 commits
  8. 27 Nov, 2009 1 commit
  9. 17 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Add a command-line option to filter exclusion tags · 0f15cc76
      Iustin Pop authored
      Since we don't want all instance tags to be used for exclusion, we add a
      command line option to filter on these. Since the iallocator protocol
      cannot accept command line options, currently it's not possible to
      specify these for hail, and thus it will never use any exclusion tags.
      0f15cc76
  10. 21 Oct, 2009 2 commits
  11. 18 Oct, 2009 1 commit
    • Iustin Pop's avatar
      Change the Container.findByName function · e7724ccc
      Iustin Pop authored
      This patch changes the signature and implementation of the function;
      returning the item makes more sense (saves a lookup later again in the
      container, and applying idx is cheap), and the previous implementation
      was ugly.
      e7724ccc
  12. 16 Oct, 2009 2 commits
    • Iustin Pop's avatar
      Add loading and processing of utilisation data · aa8d2e71
      Iustin Pop authored
      This patch adds loading and processing the utilisation data during
      instance moves. While the data is not yet used, it is correctly modified
      by instance changes between nodes.
      
      hbal has the new ‘-U’ command line argument for this. The format of the
      file is simply instance name and the four stats, space-separated.
      aa8d2e71
    • Iustin Pop's avatar
      Merge the Node.setPri and Node.addCpus functions · a488a217
      Iustin Pop authored
      The latter is only used right after the former in the Loader module, and
      we'll need more of this 'update not with the data of this instance'
      functionality (which is different than addPri where all information must
      be updated).
      
      The patch also changes the signature of Node.setSec (to remain
      consistent with setPri).
      a488a217
  13. 14 Oct, 2009 1 commit
    • Iustin Pop's avatar
      Style change: node and instance attributes · 2060348b
      Iustin Pop authored
      This changes from a_b to aB in all node and instance attributes, to
      match the standard Haskell style. Also attributes that should have been
      camel-cased but weren't were changed (e.g. plist → pList, pnode →
      pNode).
      2060348b
  14. 28 Sep, 2009 1 commit
    • Iustin Pop's avatar
      Split the exernal data loader out of CLI.hs · e8f89bb6
      Iustin Pop authored
      Currently the external data loader is in CLI.hs, which makes all
      programs that need cli functionality (options, etc.) link against the
      network modules (most importantly curl). This patch splits this
      functionality into a new module such that (for example) hail which only
      deals with file I/O doesn't link against these libraries.
      e8f89bb6
  15. 06 Jul, 2009 2 commits
    • Iustin Pop's avatar
      Take the foldl out of Loader.fixNodes · d71d0a1d
      Iustin Pop authored
      Currently Loader.fixNodes is foldl' with a complicated function. It
      makes more sense to take foldl' out of this function (and put it into
      the caller) and let fixNodes be only this internal function.
      d71d0a1d
    • 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
  16. 11 Jun, 2009 1 commit
    • 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
  17. 10 Jun, 2009 1 commit
    • Iustin Pop's avatar
      Add cpu-count-related attributes to nodes · 1a82215d
      Iustin Pop authored
      This patch adds cpu-count related attributes to nodes:
        - total cpus
        - cpus in use
        - ratio of virtual:physical cpus
      
      We also set correctly the cpu values at load time, but we don't do
      anything yet while moving instances around. The cpu ratio is shown in
      the cluster list.
      1a82215d
  18. 01 Jun, 2009 4 commits
  19. 27 May, 2009 3 commits
  20. 26 May, 2009 1 commit
    • 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
  21. 24 May, 2009 1 commit
  22. 23 May, 2009 5 commits