1. 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
  2. 23 May, 2009 2 commits
  3. 22 May, 2009 3 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
    • 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
  4. 19 May, 2009 1 commit
    • 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
  5. 22 Mar, 2009 5 commits
    • Iustin Pop's avatar
      Update all needed node fields on f_mem change · 0ee8fd76
      Iustin Pop authored
      This fixes the setFmem function which didn't compute other related
      fields after free memory change. Ideally, this should be abstracted so
      that add/remove Pri and similar functions could reuse it instead of
      duplicating code.
      0ee8fd76
    • 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
      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 a new node filed x_mem · 8c5b0a0d
      Iustin Pop authored
      Nodes can have some memory unaccounted for, due to (e.g.) hypervisor
      overhead, rounding errors in reporting, etc.
      
      It is better if we model this memory explicitly instead of hiding it,
      and actually since the n_mem addition it is actually required to do so.
      
      The new attribute is not yet used.
      8c5b0a0d
    • Iustin Pop's avatar
      Remove unused and obsolete function · 6e75a445
      Iustin Pop authored
      The Node.str function is very old and is not useful since the node
      objects have much more fields today. This patch removes it, and if
      needed a full node display can be done via ‘show’.
      6e75a445
  6. 21 Mar, 2009 4 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
      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
  7. 20 Mar, 2009 3 commits
  8. 12 Mar, 2009 3 commits
  9. 11 Mar, 2009 1 commit
    • Iustin Pop's avatar
      Add the node reserved memory percentage · dfc749e6
      Iustin Pop authored
      This patch adds the node attribute “reserved memory percentage” that is
      derived from the maximum reserved memory for a node and its total
      memory.
      
      This will be useful for enhancing the balancing algorithm.
      dfc749e6
  10. 10 Mar, 2009 1 commit
    • Iustin Pop's avatar
      Beautify the cluster status list · af53a5c4
      Iustin Pop authored
      This patch removes the primary/secondary instance lists from the node
      status and also removes the tabbed formatting with explicit width
      formatting.
      af53a5c4
  11. 09 Mar, 2009 2 commits
    • Iustin Pop's avatar
      Change the node N+1 check model · d10b27ef
      Iustin Pop authored
      Currently, we fail a new instance placement if the new node status is
      not N+1 compliant. This means that an allocation on an already N+1
      failed node still fails, even though (conceptually) we're not worse than
      before.
      
      This patch changes this model to fail the allocation *only* if the node
      was N+1 compliant before. This allows balancing to work on non-N+1 happy
      clusters, with the caveat that they probably won't be N+1 happy at the
      end.
      
      Since we skip N+1 check in some cases, we add a new “failHealth” check
      that verifies the node still has strict positive free memory and disk
      space.
      d10b27ef
    • Iustin Pop's avatar
      Show which nodes are not N+1 compliant in output · 2cf878a5
      Iustin Pop authored
      This patch adds a '*' character to nodes which are not N+1 compliant to
      the output, to help with understanding pre- and post-changes cluster
      status.
      2cf878a5
  12. 22 Feb, 2009 3 commits
    • Iustin Pop's avatar
      Change the total disk/mem to Double · 38f63ae6
      Iustin Pop authored
      Since we only use the totals for computations, and we always convert
      them via fromIntegral, let's just store them directly as Doubles.
      38f63ae6
    • Iustin Pop's avatar
      A no-code change s/disk/dsk/ · 962367fe
      Iustin Pop authored
      This just makes indendation nicer in many expressions.
      962367fe
    • Iustin Pop's avatar
      Compute the p_mem / p_dsk statically · 0335fe4a
      Iustin Pop authored
      This patch changes the computation of p_mem / p_dsk from on-demand
      (whenever the cluster stats are computed) to after-modify (after a node
      is modified, we update its stats). This brings a god speed-up as only
      one node or two are usually changed between cluster-wide stats are
      computed.
      0335fe4a
  13. 12 Feb, 2009 1 commit
    • Iustin Pop's avatar
      Change the input file formats · 01f6a5d2
      Iustin Pop authored
      This patch changes the format of the input node and instance lists. It
      removes the list of primary and secondary instances from the nodes, and
      adds the primary and secondary nodes to the instance list.
      
      This is done so that we can have the same input data from commands as
      from the RAPI.
      01f6a5d2
  14. 28 Jan, 2009 1 commit