1. 30 Dec, 2010 4 commits
  2. 20 Dec, 2010 3 commits
    • Iustin Pop's avatar
      Text.hs: serialize cluster tags when writing data · 716c6be5
      Iustin Pop authored
      This is the complement to the reading part. Now the live-test works
      correctly against clusters with configured exclusion tags.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
    • Iustin Pop's avatar
      Change the Node.group attribute · 10ef6b4e
      Iustin Pop authored
      Currently, the Node.group attribute is the UUID of the group, as until
      recently Ganeti didn't export the node group properties. Since it does
      so now, we make the following changes (again apologies for a big
      - we change the group attribute to be an index, similar to the way an
        Instance.pnode and snode attributes point to the parent node(s)
      - on load, we read the group.uuid attribute and we use that to lookup
        the actual group index, from previously-loaded groups info
      - this means that we now first read groups, then read nodes using the
        group info, and then read instances using the node info
      This patch leaves a few functions showing the group index (ugly since
      it's htools internal), will be converted later.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
    • Iustin Pop's avatar
      Rework the data loader pipelines to read groups · a679e9dc
      Iustin Pop authored
      This (invasive) patch changes all the loader pipelines to read the node
      groups data from the cluster, via the various backends. It is invasive
      as it needs coordinated changes across all the loaders.
      Note that the new group data is not used, just returned.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
  3. 01 Dec, 2010 1 commit
    • 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>
  4. 30 Aug, 2010 1 commit
  5. 24 Aug, 2010 1 commit
  6. 23 Jul, 2010 1 commit
  7. 20 May, 2010 1 commit
    • 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.
  8. 25 Feb, 2010 3 commits
  9. 23 Feb, 2010 2 commits
  10. 07 Jan, 2010 1 commit
  11. 27 Nov, 2009 1 commit
  12. 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.
  13. 11 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Add a tags attribute to instances · 17e7af2b
      Iustin Pop authored
      … and read it in all the loaders. hscan is modified to save it to the
      files it generates.
      The attribute is not yet used in any place.
  14. 10 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Allow overriding the field list in -p · e98fb766
      Iustin Pop authored
      The print nodes option can now accept an optional field list to
      customise the output. This is ugly, since the field names do not match
      the header names, but it is at least barely customisable (at runtime).
  15. 16 Oct, 2009 1 commit
    • 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.
  16. 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 →
  17. 15 Jul, 2009 1 commit
    • 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.
  18. 06 Jul, 2009 1 commit
    • 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.
  19. 12 Jun, 2009 1 commit
    • Iustin Pop's avatar
      Fix some hscan bugs · d4c453d2
      Iustin Pop authored
      Currently hscan has a number of bugs:
        - doesn't add the common suffix (csf) to the instance's nodes
        - doesn't export the cpus for neither nodes nor instances
        - doesn't support single-node instances
      This patch fixes these issues.
  20. 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).
  21. 01 Jun, 2009 1 commit
  22. 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.
  23. 23 May, 2009 5 commits
  24. 22 May, 2009 2 commits
    • 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
        - 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
    • 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.
  25. 20 May, 2009 3 commits
    • 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.
    • Iustin Pop's avatar
      Allow hscan to save data for fully-spec'd URLs · 0944090a
      Iustin Pop authored
      In case we pass a fully-specified URL to hscan, currently it will use as
      is and that means the directory in which we want to save the status
      files changes from what we mean. This patch changes hscan to replace all
      slashes in the cluster name with underscores when generating the output
    • 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.