1. 19 Jul, 2010 2 commits
    • Iustin Pop's avatar
      hbal: print short names in steps list · 14c972c7
      Iustin Pop authored
      This was a regression from the name handling changes, as we started
      using the original names for the solution list (which is not designed
      for parsing/feeding back into ganeti).
    • Iustin Pop's avatar
      Remove an obsolete function · fb33aaaf
      Iustin Pop authored
      printSolution is no longer used, as we print the solution iteratively
  2. 18 Jul, 2010 3 commits
    • Iustin Pop's avatar
      Allow '+' in node list fields · 6dfa04fd
      Iustin Pop authored
      When the field list is prefixed with a plus sign, this will extend the
      default field list, instead of replacing it entirely.
    • Iustin Pop's avatar
      Update the node list fields · 16f08e82
      Iustin Pop authored
      This patch renames the pri/sec to pcnt/scnt, and adds the real primary
      and secondary instance lists, the peermap and the index of a node as
      selectable options.
    • Iustin Pop's avatar
      Cleanup a node's peer map when possible · 124b7cd7
      Iustin Pop authored
      If the last secondary instance of a peer is deleted (detected by the new
      peer memory value being equal to zero), then the pair (pdx, 0) should be
      deleted completely. This is not optimization per se, but rather cleanup
      (the speedup is at most a percent, and only in some corner cases).
  3. 16 Jul, 2010 1 commit
  4. 21 Jun, 2010 4 commits
  5. 08 Jun, 2010 1 commit
    • Iustin Pop's avatar
      Optimise the Luxi.recvMsg function · 95f490de
      Iustin Pop authored
      Since the current buffer cannot contain (during network reads) an EOM,
      we should look for the EOM only in the newly-received string.  While
      this shouldn't make much difference, in some tests it cuts the recvMsg
      total time by around half.
      On entering recvMsg, we have though to search the old buffer for a
      message though, since we could have received two Luxi messages on the
      last network query; this is however a one-off cost, compared to
      continuously looking for the EOM in the old string (at each receive
  6. 07 Jun, 2010 2 commits
    • Iustin Pop's avatar
      Complete the client Luxi implementation · 04282772
      Iustin Pop authored
      All current Luxi calls are supported after this patch. A bug in
      ArchiveJob is also fixed (Ganeti's job IDs are strings).
    • Iustin Pop's avatar
      Add support for more LUXI calls · 9622919d
      Iustin Pop authored
      While not are directly useful, having them will open some possibilities
      (e.g. polling for job changes in hbal's -X mode, and auto-archiving the
      jobs once they are successful).
  7. 02 Jun, 2010 2 commits
    • Iustin Pop's avatar
      Fix some lint errors in the unit tests · 4a007641
      Iustin Pop authored
    • Iustin Pop's avatar
      Change the Luxi operations structure · 683b1ca7
      Iustin Pop authored
      Currently, we define the LuxiOp type as a simple enumeration, and leave
      the arguments structure to the users of the Ganeti.Luxi module. This is
      suboptimal for a couple of reasons: first, we decouple the operation
      type from operation arguments, and that means we don't use the type
      system for validation of the arguments; second, the clients themselves
      have to know about the JSON encoding of the protocol.
      For the above arguments, we change the operation type to contain the
      arguments too, and then the entire conversion/serialization is
      restricted to the Ganeti.Luxi module. Also, the removal of the JSON
      encoding from the clients results in an overall simplification of the
  8. 01 Jun, 2010 2 commits
  9. 30 May, 2010 1 commit
    • Iustin Pop's avatar
      Modify the test runner to show test exceptions · 8c5652f6
      Iustin Pop authored
      QuickCheck's batch driver (at least v1) doesn't show the test aborts,
      but simply discards the specific exception and increases the abort
      count. This makes it hard to debug the tests, so we modify our own test
      wrapper (which so far only tracked total failures) to show any
  10. 28 May, 2010 1 commit
    • Iustin Pop's avatar
      Reduce the warnings during the unittests · 9e35522c
      Iustin Pop authored
      Since the unittests are not 'clean' from the p.o.v. of type
      declarations, and cannot be made clean in all respects (e.g. orphan
      instances), we silence some warnings for the test target, to have a
      cleaner output.
  11. 27 May, 2010 6 commits
    • Iustin Pop's avatar
      Improve the test driver · 06fe0cea
      Iustin Pop authored
      The tests are moved to a separate data structure, and we can select a
      subset of tests to run.
    • Iustin Pop's avatar
      Introduce OpCode unittests · 88f25dd0
      Iustin Pop authored
    • Iustin Pop's avatar
      Introduce suport for optional keys in JObjects · f36a8028
      Iustin Pop authored
      Some keys are optional in the Ganeti opcodes (e.g. ‘node’ in the
      OpReplaceDisks), and as such we need to transform them in a Maybe value,
      instead of failing.
      The patch reworks a bit fromObj and adds maybeFromObj which parses such
      optional values. It then uses it in the opcode reading.
    • Iustin Pop's avatar
      Replace fromJResult with annotateJResult · c96d44df
      Iustin Pop authored
      This patch removes all old uses of fromJResult with the annotated
      version, and removes the non-annotated version. All JSON parsing points
      should now have annotated errors.
    • Iustin Pop's avatar
      Add annotations to loadJSArray · c8b662f1
      Iustin Pop authored
      This allows, for example, the RAPI backend to detail which information
      (instance or node data) fails to parse.
    • Iustin Pop's avatar
      Change fromObj error messages · 50d26669
      Iustin Pop authored
      Currently fromObj doesn't detail what we're trying to read, which can
      lead to cryptic messages: "Cannot read Int". The patch changes this
      function to annotate the error messages with the key/value we're trying
      to convert, by using a new version of fromJResult.
      Since the display of the key in tryFromObj is now redundant (it was
      already redundant in the 'not found' case), we remove it.
      The new version of fromJResult (annotateJResult) simply prepends a
      description string to the actual error message.
  12. 26 May, 2010 1 commit
  13. 25 May, 2010 1 commit
  14. 20 May, 2010 9 commits
    • Iustin Pop's avatar
      Add more unit tests for allocation/balance · 3fea6959
      Iustin Pop authored
      The patch adds some simple unit-tests for both the allocation function
      (we can allocate small instances on an empty cluster, we can allocate in
      tiered more starting from any size) and the balancing functions (one
      single instance is placed optimally, a full cluster plus an empty node
      can be rebalanced). The coverage has increased greatly, since this is
      the bulk of the algorithm/code.
      Also, the cluster tests are now being run with different options, since
      they are much slower.
    • Iustin Pop's avatar
      Move two functions from hspace to Cluster.hs · 3ce8009a
      Iustin Pop authored
      This is done so we can test a longer pipeline.
    • Iustin Pop's avatar
      Make CStats instance of show · 8423f76b
      Iustin Pop authored
      This helps debugging via ghci.
    • Iustin Pop's avatar
      Clarify options related to name passing · ada2fc6d
      Iustin Pop authored
      After the name patches, we can pass in either the short or the full
      name, so update the hbal man page accordingly.
    • Iustin Pop's avatar
      Another haddoc fix… · 381be58a
      Iustin Pop authored
    • Iustin Pop's avatar
      Accept both full and short names in CLI · c854092b
      Iustin Pop authored
      This patch introduces some new functionality in the base Element type
      and in Container which supports searching for all 'known' names of an
      element, such that both short and full names are accept for various
      options like '-O' and '--excluded-instances'.
    • Iustin Pop's avatar
      Stop modifying names for internal computations · 3e4480e0
      Iustin Pop authored
      Currently the name used internally is modified and holds the shortened
      name of the nodes/instances. This has caused issues before, since we
      always have to strip the suffix from input data and reapply it if we
      need to send data back to Ganeti.
      This patch changes the code such that the names are never modified, only
      the alias, and all the internal computations can forget about the common
      suffix addition/removal.
    • Iustin Pop's avatar
      Add a new node/instance field · 8bcdde0c
      Iustin Pop authored
      This new field ('alias') will hold the shortened/beautified display
      name. When resetting the name, the alias is reset too, and there's a new
      function to update only the alias.
    • Iustin Pop's avatar
      Change some test constants · 49f9627a
      Iustin Pop authored
      First, we reduce the max size of the disks, since Int on 32bits will
      overflow for big simulated clusters. This is a real issue, that will
      need fixing in real life, but for now we just "silence" this test.
      Second, we increase the amount of time a test is allowed to run,
      otherwise on slower computers some tests might time-out.
  15. 19 May, 2010 3 commits
  16. 18 May, 2010 1 commit
    • Iustin Pop's avatar
      Remove the noLimit values and always use limits · f4c0b8c5
      Iustin Pop authored
      This patch moves from allowing no-limits for disk/cpu ratios, and always
      use a real limit. For disk, it's simple since we use 0, which means no
      reservations for disks. For CPU, we set an (arbitrary) limit of 64 v/p,
      which should be reasonable as a default limit (it can be changed via the
      command line).