1. 22 Mar, 2009 3 commits
    • 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
  2. 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
  3. 20 Mar, 2009 3 commits
  4. 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
  5. 13 Mar, 2009 5 commits
    • Iustin Pop's avatar
      Some more docstring updates · 00b51a14
      Iustin Pop authored
      00b51a14
    • Iustin Pop's avatar
      Enhance the command list for the solution · 142538ff
      Iustin Pop authored
      This patch moves the formatting of the command list to Cluster.hs and
      enhances it with separator messages between the steps.
      142538ff
    • Iustin Pop's avatar
      Add a new ReplaceAndFailover move · 79ac6b6f
      Iustin Pop authored
      This patch adds a new replace secondary and failover move (equals to
      “r:x f”), which can improve the solution (since we are testing more
      options at each step).
      79ac6b6f
    • Iustin Pop's avatar
      Convert hbal from multiple rounds to a step-method · 7dfaafb1
      Iustin Pop authored
      Currently hbal does multiple rounds, stopping when a rounds doesn't
      bring improvements. With the recent changes to not remove instances from
      the candidate list, this is obsolete as the first round will always run
      to the end of the improvements.
      
      This patch changes this so that the Cluster.checkMove function doesn't
      recurse, but just computes the next best move (as its docstring says).
      This means we can actually incrementally compute and print the solution,
      and this is needed as otherwise an instance could move twice and the
      second time it needs the current placement to compute the exact command
      line and operation needed for the move.
      7dfaafb1
    • Iustin Pop's avatar
      Rework the solution printing in Cluster.hs · ca8258d9
      Iustin Pop authored
      This abstracts the individual placement solution so that it can be used
      independently.
      ca8258d9
  6. 12 Mar, 2009 2 commits
    • Iustin Pop's avatar
      Remove the restriction of one-move-per-round · 0a0f2533
      Iustin Pop authored
      The current code restricts each instance to one move per round. This is
      bad, as an computation restarted in the middle of the solution will have
      a different set of instances to work and will thus lead to a different
      end-solution.
      
      Once this is applied, further rounds are not possible since the first
      round will have tried all instances at its end. As such, the removal of
      the rounds feature will be next.
      
      The code adds a hard-coded 100 moves limit, which for big clusters is
      actually small.
      0a0f2533
    • Iustin Pop's avatar
      Add a header to node lists and print more data · ced859f3
      Iustin Pop authored
      This prints the total memory/disk and also adds a header.
      ced859f3
  7. 11 Mar, 2009 3 commits
    • Iustin Pop's avatar
      Change the N1 score to percent of N1 failures · 34a6e127
      Iustin Pop authored
      Since for a very many N+1 failures in a cluster, we could actually
      degrade the N1 CV by making a node N+1 compliant, we need to make sure
      this value only decreases when fixing non-compliant nodes.
      
      The easiest way is to compute the N+1 score as a percentage of failed
      nodes, with the caveat that the domain of values might not be fully
      compatible with the other scores. It is still [0, 1] but does not vary
      like the others.
      34a6e127
    • Iustin Pop's avatar
      Add two new variables in the cluster score · d6be0775
      Iustin Pop authored
      This patch adds two new variables to the cluster score:
        - variance of the failN1 attribute
        - variance of the reserved memory percentage
      
      The variance of the failN1 helps make the cluster N+1 happy, whereas the
      reserved memory percentage helps balance the unused memory for
      redundancy on the nodes.
      d6be0775
    • Iustin Pop's avatar
      Record the running cluster CV in placements · c5c295bc
      Iustin Pop authored
      This patch adds a score variable to the placement type, so we can record
      the changes in the cluster CV for later display.
      
      This gives visibility in the decrease of the parameters and can show
      which are the most important steps to perform (out of the full move
      list).
      c5c295bc
  8. 10 Mar, 2009 2 commits
    • 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
    • Iustin Pop's avatar
      Beautify solution list · 671b85b9
      Iustin Pop authored
      This patch makes the tabular solution list nicer, by changing from tabs
      to explicit widths.
      671b85b9
  9. 09 Mar, 2009 1 commit
    • Iustin Pop's avatar
      Beautify: strip common suffix from names · a0529a64
      Iustin Pop authored
      This patch automatically removes the longest common (domain, i.e.
      starting with a dot) suffix from the node and instance names. This gives
      a much clearer display, and this format is compatible with the way
      Ganeti accepts shortened names.
      a0529a64
  10. 22 Feb, 2009 2 commits
    • 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
  11. 15 Feb, 2009 6 commits
    • Iustin Pop's avatar
      Documentation updates · d53264c0
      Iustin Pop authored
      d53264c0
    • Iustin Pop's avatar
      Simplify the checkInstanceMove function · 9dc6023f
      Iustin Pop authored
      This patch flattens the two folds into one, by simply building the whole
      list of moves instead  of the double recursion (nodes and the each
      node's moves). This has no functional change, but it's much cleaner.
      9dc6023f
    • Iustin Pop's avatar
      A small optimization in node computation · 256810de
      Iustin Pop authored
      Currently we always compute the available node list for moves (for an
      instances) based on the nodes of the initial table. This works find,
      however is a repeated calculation.
      
      We optimize this by passing a node list (of indexes, not full objects),
      which helps in two ways:
        - faster to filter later
        - allows restriction of target nodes by enforcing only this subset as
          target for moves
      256810de
    • Iustin Pop's avatar
      Replace a foldl by foldl' · d4f62d4e
      Iustin Pop authored
      d4f62d4e
    • Iustin Pop's avatar
      Split checkMove into two · 4e25d1c2
      Iustin Pop authored
      This cleans up and splits the individual instance move into a separate function.
      4e25d1c2
    • Iustin Pop's avatar
      Change the balancing algorithm · aaaa0e43
      Iustin Pop authored
      This patch changes the balancing algorithm to not iterate linearly over
      the instances (in a random, but fixed order), instead selecting at each
      step the best next move. This should allow a better score (most of the
      time), and usually also a shorter solution.
      aaaa0e43
  12. 13 Feb, 2009 1 commit
  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