1. 10 Jun, 2009 1 commit
    • Iustin Pop's avatar
      Fix reading of total disk space in iallocator · 734b1ff1
      Iustin Pop authored
      IAllocator currently uses a wrong key name for reading the total disk
      space (‘disk_usage’ which was copied from RAPI, but the actual
      iallocator key is ‘disk_space_total’).
      This patch fixes that and also makes iallocator always use this key,
      instead of computing the size by itself—with Ganeti 2.0 this is
      key is always available.
  2. 01 Jun, 2009 3 commits
  3. 27 May, 2009 2 commits
  4. 26 May, 2009 2 commits
    • 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.
    • Iustin Pop's avatar
      Port offline node fixes from Rapi to IAllocator · 1de50907
      Iustin Pop authored
      The IAllocator source was copied from Rapi before the offline node fixes
      were made. This changes such that offline nodes are accepted correctly.
  5. 25 May, 2009 2 commits
    • Iustin Pop's avatar
      Fix loading of plain instances via iallocator · bd1794b2
      Iustin Pop authored
      Currently iallocator is broken when reading single-node instances (and
      with an ugly error message). This patch fixes this case, by marking them
      with secondary node “noSecondary” like the rest of the code.
    • Iustin Pop's avatar
      hail: do not allocate on offline/drained nodes · 8c2ebac8
      Iustin Pop authored
      This patch implements filtering out of the offline/drained nodes and
      fixes a bug in IAllocator.hs parsing (similar to an older bug in Rapi.hs
      from where the code was copied).
  6. 24 May, 2009 1 commit
  7. 23 May, 2009 4 commits
  8. 22 May, 2009 2 commits
    • Iustin Pop's avatar
      Add back names to nodes/instances · 2727257a
      Iustin Pop authored
      In order to simplify the data structures, we add back the name on the
      node and instance objects. We still keep the index for, well, indexing,
      but we will use the name directly from the object, in order to get rid
      of the ktn/kti arguments which are passed around everywhere.
    • 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
  9. 21 May, 2009 1 commit
    • 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
  10. 20 May, 2009 2 commits
    • 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.
    • Iustin Pop's avatar
      Small changes to the IAlloc module · 144f190b
      Iustin Pop authored
      Adding a small request type data structure.
  11. 18 May, 2009 3 commits
    • Iustin Pop's avatar
      Update the IAlloc module · 3f6af65c
      Iustin Pop authored
      We know have a working parseData function that returns the node and
      instance data. This uncovered bad support for non-drbd instances 
    • Iustin Pop's avatar
      Move the JSON utilities to Utils.hs · 9ba5c28f
      Iustin Pop authored
      This patch moves the generic/reusable JSON functions to Utils.hs, so
      that they're shared between RAPI/IAlloc.
    • Iustin Pop's avatar
      Add a copy of Rapi.HS as IAlloc.hs · 43643696
      Iustin Pop authored
      This will be used in two ways:
        - format the response to Ganeti (easy, implemented)
        - parse the input data and build the node/instance lists (hard :)
  12. 22 Mar, 2009 2 commits
    • Iustin Pop's avatar
      Include DRBD overhead in sda/sdb size · 190ce47c
      Iustin Pop authored
      For Ganeti 1.2 which doesn't have the ‘disk_usage’ instance query field,
      we need to manually include the DRBD overhead (per disk). This patch
      modifies the RAPI collection to do this, but loading from disk does not
      as it's unknown if the query came from hscan or RAPI 1.2 or RAPI 2.0...
    • Iustin Pop's avatar
      Add a new instance field denoting run status · f82f1f39
      Iustin Pop authored
      This patch modifies Rapi, the Cluster.loadData and hscan serialization to load
      and save the instance run status. At instance level, we add both a boolean
      field denoting the true/false run status, and a string field which holds the
      original value (since we don't have a 1-to-1 mapping) for use in hscan
      The run status is not yet used.
  13. 21 Mar, 2009 1 commit
    • Iustin Pop's avatar
      Add node memory field to Node objects · 04be800a
      Iustin Pop authored
      This patch adds a new n_mem field to the node objects, and implements
      read/save/show support for it. The field is not currently used (except
      in the node list) but will be used for checking data consistency and
      instance up/down status.
  14. 20 Mar, 2009 1 commit
  15. 14 Feb, 2009 3 commits
  16. 13 Feb, 2009 1 commit
    • Iustin Pop's avatar
      Add compatibility with rapi v1 · aab26f2d
      Iustin Pop authored
      The patch adds compatibility with RAPI v1, and this required some new
      JSON functions as valFromObj doesn't behave nicely.
      Some other unrelated changes were done too.
  17. 12 Feb, 2009 1 commit
  18. 11 Feb, 2009 1 commit