1. 22 Feb, 2010 2 commits
  2. 01 Dec, 2009 1 commit
  3. 27 Nov, 2009 1 commit
  4. 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
  5. 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.
      17e7af2b
  6. 06 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Change the Utils.fromObj signature · 262f3e6c
      Iustin Pop authored
      Currently the fromObj function takes a JSON object which is then
      converted into a list of (String, JSValue) in which we make a lookup.
      However, most of the callers of this function call it repeatedly on the
      same object, which means we do the object→list conversion repeatedly.
      
      This patch converts it to take directly the list, and converts its
      callers to do the conversion themselves (and only once).
      
      While this is not in the hot-path today, it would be if we ever were to
      process much data over Luxi (or RAPI), and is a good cleanup in any
      case.
      262f3e6c
  7. 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
  8. 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.
      aa8d2e71
  9. 08 Oct, 2009 1 commit
    • Guido Trotter's avatar
      parseNode: don't lookup values in drained nodes · e97f211e
      Guido Trotter authored
      
      
      Currently parseNode skips looking for values in offline nodes, but tries
      to read them for drained ones. With this patch we treat offline and
      drained nodes in the same way (which is compatible with the iallocator
      protocol changes introduced in Ganeti 2.0.4, but also doesn't break
      retrocompatibility). As a bonus we don't need to calculate the value of
      the internal Node "offline" parameter, because we know that the node is
      going to be online anyway, if we lookup values (and it was statically
      set to offline, before, in the offline case).
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      e97f211e
  10. 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.
      9f6dcdea
  11. 10 Jun, 2009 3 commits
    • 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
    • Iustin Pop's avatar
      Add a new vcpus attribute to instances · d752eb39
      Iustin Pop authored
      This patch adds reading of vcpu count for instances, in preparation for
      using the vcpu ratio in cluster scoring.
      d752eb39
    • 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.
      734b1ff1
  12. 01 Jun, 2009 3 commits
  13. 27 May, 2009 2 commits
  14. 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.
      262a08a2
    • 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.
      1de50907
  15. 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.
      bd1794b2
    • 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).
      8c2ebac8
  16. 24 May, 2009 1 commit
  17. 23 May, 2009 4 commits
  18. 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.
      2727257a
    • 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
  19. 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
      more.
      585d4420
  20. 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.
      942403e6
    • Iustin Pop's avatar
      Small changes to the IAlloc module · 144f190b
      Iustin Pop authored
      Adding a small request type data structure.
      144f190b
  21. 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 
      3f6af65c
    • 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.
      9ba5c28f
    • 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 :)
      43643696
  22. 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...
      190ce47c
    • 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
      serialization.
      
      The run status is not yet used.
      f82f1f39
  23. 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.
      04be800a
  24. 20 Mar, 2009 1 commit