1. 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
  2. 14 Oct, 2009 1 commit
    • Iustin Pop's avatar
      Style change: node and instance attributes · 2060348b
      Iustin Pop authored
      This changes from a_b to aB in all node and instance attributes, to
      match the standard Haskell style. Also attributes that should have been
      camel-cased but weren't were changed (e.g. plist → pList, pnode →
      pNode).
      2060348b
  3. 15 Jul, 2009 1 commit
    • Iustin Pop's avatar
      Unify the command line options and structures · 0427285d
      Iustin Pop authored
      This patch moves all the command line options and their internal
      representation into CLI.hs. This means that duplicated options between
      any two binaries are no longer declared twice, and that we no longer
      need the two *Option classes.
      0427285d
  4. 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
  5. 12 Jun, 2009 1 commit
    • Iustin Pop's avatar
      Fix some hscan bugs · d4c453d2
      Iustin Pop authored
      Currently hscan has a number of bugs:
        - doesn't add the common suffix (csf) to the instance's nodes
        - doesn't export the cpus for neither nodes nor instances
        - doesn't support single-node instances
      
      This patch fixes these issues.
      d4c453d2
  6. 11 Jun, 2009 1 commit
    • Iustin Pop's avatar
      Fix the various monomorphism warning · 78694255
      Iustin Pop authored
      In a few places (e.g. tryRead or any printf call) it's a little bit hard
      to add the correct type signatures, but in the it is possible to fix
      these warnings (which can bite one in subtle cases).
      78694255
  7. 01 Jun, 2009 1 commit
  8. 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
  9. 23 May, 2009 5 commits
  10. 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
  11. 20 May, 2009 3 commits
    • 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 hscan to save data for fully-spec'd URLs · 0944090a
      Iustin Pop authored
      In case we pass a fully-specified URL to hscan, currently it will use as
      is and that means the directory in which we want to save the status
      files changes from what we mean. This patch changes hscan to replace all
      slashes in the cluster name with underscores when generating the output
      filenames.
      0944090a
    • 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
  12. 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
  13. 22 Mar, 2009 4 commits
    • 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
      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
  14. 21 Mar, 2009 3 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
      Small change in hscan · 670b57ad
      Iustin Pop authored
      This fixes a mistake between Int/Integer. Should be more careful :)
      670b57ad
    • Iustin Pop's avatar
      Add the hscan tool · 1b7a5835
      Iustin Pop authored
      This patch adds an hscan tool that loads data from clusters via RAPI and
      writes it to files that can be later used offline.
      1b7a5835