1. 31 Mar, 2010 2 commits
    • Iustin Pop's avatar
      Fix iallocator crash when no solutions exist · 57587760
      Iustin Pop authored
      Commit 54365762 added an un-guarded `head' call, which crashes with
      “Prelude.head: empty list” when no results exists for the per-instance
      allocation/relocation calls.
      
      This patch fixes this, and also adds another check for an unguarded
      `head' call during parsing of input data.
      (cherry picked from commit e41f4ba0)
      57587760
    • Iustin Pop's avatar
      Fix IAllocator multi-evacuate message · 934c62dc
      Iustin Pop authored
      Since Ganeti passes full host names (not common-suffix-stripped), we
      need to remove the suffix from the evac_nodes keys too. In case one node
      is not part of the cluster, it will lead to a wrong error message, but
      for now it fixes the problem.
      934c62dc
  2. 22 Feb, 2010 8 commits
  3. 03 Feb, 2010 2 commits
  4. 14 Jan, 2010 2 commits
    • Iustin Pop's avatar
      Move instance relocation test upper in the chain · a804261a
      Iustin Pop authored
      Currently we test each instance for relocation in checkMove; however, it
      is a little more clear if we pass only the relocatable instances to
      checkMove. The patch also slightly rewrites (indendation/style) the
      second half of the checkMove function.
      a804261a
    • Iustin Pop's avatar
      Split the balancing function in two parts · 5ad86777
      Iustin Pop authored
      Currently in the balancing function we do two thing:
      
      - take the decision where to do a new balancing round or not
      - and actually computing the balancing round
      
      This is not nice, as the two parts are conceptually separate, so this
      patch splits the decision on whether to descend or not to a new
      function.
      5ad86777
  5. 12 Jan, 2010 1 commit
  6. 07 Jan, 2010 2 commits
    • Iustin Pop's avatar
      Switch the text file format to single-file · 16c2369c
      Iustin Pop authored
      This patch changes from the two separate files to a single file, with
      sections separated by a blank line. Currently only the node and instance
      data is accepted, later the cluster tags will be read too via this
      format.
      
      This makes all the programs accept the new format, but hscan doesn't yet
      generate it.
      16c2369c
    • Iustin Pop's avatar
      Change the signatures of the text loader slightly · f5197d89
      Iustin Pop authored
      This is in preparation for the text format changes.
      f5197d89
  7. 11 Dec, 2009 4 commits
    • Iustin Pop's avatar
      Convert n1_score metric from % to count · 0c860cff
      Iustin Pop authored
      This increases the priority of fixing N+1 failures compared to balancing
      metrics.
      0c860cff
    • Iustin Pop's avatar
      Metric: count of primary instances/offline nodes · 673f0f00
      Iustin Pop authored
      This helps with evacuation/failover of instances on 2-node clusters with
      one one offline.
      673f0f00
    • Iustin Pop's avatar
      Offline instance metric: change from % to count · e4d31268
      Iustin Pop authored
      Currently we use the offline instance percentage (with range [0, 1]),
      but this is not good, since we want the evacuation of such instances to
      have a high priority; therefore we change this to a count of offline
      instances, which has higher weight than a metric with range [0, 1].
      e4d31268
    • Iustin Pop's avatar
      Use the oper_ram field if available · 6402a260
      Iustin Pop authored
      For the RAPI and LUXI backends, we can get the actual memory usage (if
      instances are running) via the oper_ram, whereas backend/memory only
      tell what the instance will use at the next boot.
      
      Not using oper_ram means that the node model is flawed and we consider
      wrong values for the instance's memory (resulting sometimes in hilarious
      values such as x_mem = -700 MB).
      6402a260
  8. 09 Dec, 2009 1 commit
    • Iustin Pop's avatar
      rapi, luxi: treat drained nodes as offline · b45222ce
      Iustin Pop authored
      Commit e97f211e changed the iallocator backend to handle drained nodes as
      offline. This commit completes that change by making the rapi and luxi
      backend do the same (the text backend ignores any '?' values which are
      returned by ganeti when nodes have problems, so it doesn't need this
      change).
      b45222ce
  9. 02 Dec, 2009 2 commits
  10. 01 Dec, 2009 4 commits
  11. 27 Nov, 2009 1 commit
  12. 17 Nov, 2009 7 commits
    • Iustin Pop's avatar
      Collapse the statistical functions into one · 185297fa
      Iustin Pop authored
      This allows us to get rid of two duplicate list length computations,
      with a minor speedup.
      185297fa
    • Iustin Pop's avatar
      Specialize the math functions · e27eb8ab
      Iustin Pop authored
      The statistics functions are currently defined as polymorphic with a
      Floating constraint. Changing this to monomorphic on Double type makes
      them stricter and much more performant (~70% speedup). This is a cheap
      way to recoup some of the loses incurred by the recent proliferation of
      metrics.
      e27eb8ab
    • Iustin Pop's avatar
      Use conflicting primaries count in cluster score · d844fe88
      Iustin Pop authored
      This small patch adds the number of conflicting primaries in the cluster
      score. This is different from the other non-CV metrics where we usually
      compute the percentage of failing instances (for that metric); but for a
      somewhat big cluster, 1-2% failing instances will be a too small value
      to cause the relocation of conflicting instances (future patches will
      also switch other non-CV metrics to this method).
      d844fe88
    • Iustin Pop's avatar
      1e4b5230
    • Iustin Pop's avatar
      Add a new node list field · b2999982
      Iustin Pop authored
      This patch adds a new node list field (ptags), showing the primary
      instance tags.
      b2999982
    • Iustin Pop's avatar
      Add a command-line option to filter exclusion tags · 0f15cc76
      Iustin Pop authored
      Since we don't want all instance tags to be used for exclusion, we add a
      command line option to filter on these. Since the iallocator protocol
      cannot accept command line options, currently it's not possible to
      specify these for hail, and thus it will never use any exclusion tags.
      0f15cc76
    • Iustin Pop's avatar
      Introduce tag-based exclusion of primary instances · 5f0b9579
      Iustin Pop authored
      This patch introduces exclusion of primary instances based on tags. This
      is incomplete as currently all tags are being excluded, and we don't
      optimise towards relocation of instances sharing tags on the same node.
      5f0b9579
  13. 11 Nov, 2009 2 commits
  14. 10 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Allow overriding the field list in -p · e98fb766
      Iustin Pop authored
      The print nodes option can now accept an optional field list to
      customise the output. This is ugly, since the field names do not match
      the header names, but it is at least barely customisable (at runtime).
      e98fb766
  15. 09 Nov, 2009 1 commit