1. 27 May, 2009 2 commits
  2. 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
  3. 25 May, 2009 1 commit
  4. 24 May, 2009 2 commits
    • Iustin Pop's avatar
      Implement hail allocate (for 2-node requests) · 4a340313
      Iustin Pop authored
      This patch implements allocate for two node requests. One node requests
      can be done as soon as we have a valid allocateOn function for single
      nodes.
      4a340313
    • Iustin Pop's avatar
      Working implementation if relocate · 58709f92
      Iustin Pop authored
      This patch completes the implementation of hail relocate. It maps all
      valid destination nodes through a ReplaceSecondary IMove, filters out
      the failed relocations, computes the resulting scores and picks the
      lowest one.
      58709f92
  5. 23 May, 2009 3 commits
  6. 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
      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
    • 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.
      040afc35
  7. 21 May, 2009 4 commits
  8. 20 May, 2009 2 commits
    • Iustin Pop's avatar
      Add initial validation checks in Cluster.loadData · 9d3fada5
      Iustin Pop authored
      This patch converts loadTabular and loadData to a monadic form, thus
      allowing meaningful error messages from the node/instance load routines.
      9d3fada5
    • 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
  9. 19 May, 2009 2 commits
    • Iustin Pop's avatar
      Don't consider offline nodes as N+1 failed · 234d8af0
      Iustin Pop authored
      This is just a cosmetic (I hope) change; the nodes shouldn't be used
      anyway, and we only correct the display message.
      234d8af0
    • Iustin Pop's avatar
      Add support for 'offline' nodes · 00b15752
      Iustin Pop authored
      This patch drops compatiblity with Ganeti 1.2 and adds support for
      offline nodes in the cluster. When reading from RAPI, the drained nodes
      are considered offline so that we don't allocate on them too.
      00b15752
  10. 25 Apr, 2009 2 commits
  11. 20 Apr, 2009 1 commit
    • Iustin Pop's avatar
      Increase allowed missing memory to 512MB · 8930eef2
      Iustin Pop authored
      Since Xen seems to “steal” some amounts of memory (depending on total
      node memory), we increase the maximum allowed missing memory to 512MB,
      based on gathered data from multiple machines.
      8930eef2
  12. 18 Apr, 2009 1 commit
  13. 22 Mar, 2009 5 commits
    • Iustin Pop's avatar
      Add checks for missing disk space · 9cded5d3
      Iustin Pop authored
      This small patch adds disk space checks to the Cluster.checkData
      function, and simplifies a little the warning messages.
      9cded5d3
    • Iustin Pop's avatar
      Fix interaction between down instances and nodes · 53f00b20
      Iustin Pop authored
      If an instance is down, it's memory is not reflected in the node used
      memory, and thus the node free memory is higher than the actual value.
      This patch deducts the memory for such instances from the node free
      memory, allowing a correct calculation for such cases.
      53f00b20
    • 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
    • Iustin Pop's avatar
      Show the x_mem/i_mem in node list · a1c6212e
      Iustin Pop authored
      This patch adds checking of cluster data in the binaries and display of
      node's x_mem/i_mem in the node list.
      a1c6212e
    • Iustin Pop's avatar
      Add functions to check and fix cluster data · 5d1baf63
      Iustin Pop authored
      This patch adds a checkData function which goes over the node list and computes
      the unaccounted memory, returning a list of warning messages (if any) and the
      update nodes.
      5d1baf63
  14. 21 Mar, 2009 6 commits
    • 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
    • Iustin Pop's avatar
      Pass actual types to node/instance constructors · 47a8bade
      Iustin Pop authored
      This patch changes the parameters passed to the node and instance
      constructors from generic Strings (which are then parsed via “read”) to
      the actual used types, by converting them earlier in Cluster.loadData.
      47a8bade
    • Iustin Pop's avatar
      Some small changes in preparation for hscan · 7847a037
      Iustin Pop authored
      This patch does some small changes:
        - fixes a comment
        - export more node functions (unneeded now, but hscan will use them)
        - fixes Makefile rule for building the programs
      7847a037
    • Iustin Pop's avatar
      Add a separate type for the [(Int, String)] list · 740ec004
      Iustin Pop authored
      This is added for better readability, since this is very often used in
      declarations.
      740ec004
    • Iustin Pop's avatar
      Handle correctly offline nodes in cluster scoring · 19777638
      Iustin Pop authored
      This patch changes two things with regard to offline nodes:
        - first, it only calculates the various coefficients across online
      	nodes
        - second, it adds a new score denoting the percentage of instances
      	which live on such nodes
      
      The first change allows correct score computation in presence of offline
      nodes (whose properties we don't need to take into account), while the
      second change actively evacuates offline nodes.
      19777638
    • Iustin Pop's avatar
      Show offline nodes in the node status list · 352806f7
      Iustin Pop authored
      This patch adds a new ‘-’ flag for the node status which denotes offline
      nodes.
      352806f7
  15. 20 Mar, 2009 3 commits
  16. 14 Mar, 2009 3 commits
    • Iustin Pop's avatar
      Show the step counter in the solution list · ab271fc1
      Iustin Pop authored
      This patch changes the solution list to include a step counter so that
      it's more clear these are successive steps (in a definite order), and
      not just an unordered list of changes.
      ab271fc1
    • Iustin Pop's avatar
      Use gnt-instance migrate instead of failover · 9b91b5a3
      Iustin Pop authored
      This patch changes the gnt-instance failover to migrate, and fixes a bug
      in the formatting of commands.
      9b91b5a3
    • Iustin Pop's avatar
      Add a new move FailoverAndReplace · 19493d33
      Iustin Pop authored
      This patch adds a new instance move, FailoverAndReplace, which promotes
      the old secondary to primary and then uses a new secondary node.
      
      This is the last move that we can do within the limitations of one node
      changed per move.
      19493d33