Skip to content
Snippets Groups Projects
  1. May 20, 2009
    • 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
    • Iustin Pop's avatar
      Allow overriding the RAPI port/scheme · e015b554
      Iustin Pop authored
      This patch adds a very dumb way to override the port and scheme for
      RAPI: if the master string doesn't contain a colon, we consider it a
      simple hostname specification, and thus prepend ‘https://’ and append
      ‘:5080’, (the default RAPI port); otherwise, we consider it a fully
      specified URL, and don't do any mangling to it.
      
      This allows to use saved RAPI responses in testing, with the “file://”
      scheme, or to use another port or non https mode with an actual RAPI
      instance.
      e015b554
    • Iustin Pop's avatar
      Remove some 1.2 specific code · ba00ad4d
      Iustin Pop authored
      Now that we dropped 1.2 compatibility, we can removed the special casing
      for RAPI differences.
      ba00ad4d
    • Iustin Pop's avatar
      Generalize some Result function into monad ones · 5aa48dbe
      Iustin Pop authored
      We don't really needed, but is more clean like this.
      5aa48dbe
    • 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
  2. May 19, 2009
  3. May 18, 2009
    • 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
  4. Apr 25, 2009
  5. Apr 20, 2009
    • 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
    • Iustin Pop's avatar
      Add reading the file names from env vars · 8032b3b5
      Iustin Pop authored
      This patch adds support for selecting the instance/node file names via
      two environment variables (HTOOLS_NODES, HTOOLS_INSTANCES).
      
      Unfortunately we still have lots of duplicated code, since the options
      are not unified.
      8032b3b5
  6. Apr 18, 2009
  7. Apr 16, 2009
  8. Mar 23, 2009
    • Iustin Pop's avatar
      More documentation updates · 6ef35e3c
      Iustin Pop authored
      This removes most of the content of the README file (obsoleted by new
      algorithm and man pages), modifies the Makefile to include the built
      documentation in the source archive (so that haddock/hscolour are not
      needed) and updates the haddock-prologue with current information.
      6ef35e3c
  9. Mar 22, 2009
    • 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
      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
      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
      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
    • 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
      Split common CLI functionality into a module · 209b3711
      Iustin Pop authored
      This patch moves the common CLI functionality (as much as currently
      possible) into a separate module. This means we only have one parseOpts
      and that Utils.hs doesn't keep this kind of functions anymore.
      209b3711
    • 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
  10. Mar 21, 2009
    • 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
  11. Mar 20, 2009
Loading