Skip to content
Snippets Groups Projects
  1. Jul 07, 2009
    • Iustin Pop's avatar
      Show errors on stderr instead of stdout · 2795466b
      Iustin Pop authored
      Currently many of the exit and warning conditions mistakenly display error
      messages on stdout, which makes parsing the output of programs harder. This
      patch attempts to fix such occurrences.
      2795466b
    • Iustin Pop's avatar
      Fix score calculation to work with empty clusters · 16103319
      Iustin Pop authored
      Currently the cluster score calculation includes an offline instance
      percentage, expressed as “offline inst / (offline + online inst)”, which
      results in NaN for empty clusters. This patch changes the calculation
      such that clusters with no offline instances (this criteria includes
      completely empty clusters) get a score of zero on this component of the
      total score.
      16103319
    • Iustin Pop's avatar
      hspace: convert N1 error exit into FailN1 result · dca7f396
      Iustin Pop authored
      Currently hspace exits with an error if the cluster is not N+1 compliant
      at the beginning of the run. This patch changes hspace such that this
      condition is instead treated as a zero-allocation-possible, FailN1 mode.
      This allows the same stats to be reported in this case as in the normal
      case.
      dca7f396
    • Iustin Pop's avatar
      Some docstring updates · 58631b72
      Iustin Pop authored
      58631b72
    • Iustin Pop's avatar
      hspace: add display of instance spec · 7e74e7db
      Iustin Pop authored
      This is mostly for user-friendliness in the default mode, when we don't
      specify the instance parameters.
      7e74e7db
  2. Jul 06, 2009
    • Iustin Pop's avatar
      Optimize the Utils.stdDev function · e6f4f05c
      Iustin Pop authored
      This patch optimizes the stdDev function in two respects:
        - first, we don't do sum . map which builds an intermediate list, but
      	instead use a fold over the list to build incrementally the sum;
      	this should reduce both the time and space characteristics, as we
      	have fewer objects created
        - second, we move from “a ^ 2” to “a * a” as the latter has a much
      	simpler implementation and thus a higher performance
      
      Since the ‘square’ function is obsoleted by the above the patch also
      removes it.
      e6f4f05c
    • Iustin Pop's avatar
      Take the foldl out of Loader.fixNodes · d71d0a1d
      Iustin Pop authored
      Currently Loader.fixNodes is foldl' with a complicated function. It
      makes more sense to take foldl' out of this function (and put it into
      the caller) and let fixNodes be only this internal function.
      d71d0a1d
    • Iustin Pop's avatar
      Simplify Cluster.computeMoves · 41c3b292
      Iustin Pop authored
      This patch changes the function Cluster.computeMoves to use guards and a
      couple of subexpressions in order to greatly simplify it.
      41c3b292
    • 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
  3. Jul 05, 2009
    • Iustin Pop's avatar
      Add computation of the failure reason in hspace · 44763b51
      Iustin Pop authored
      This patch enhances hspace to report why the allocation sequence
      stopped, both in absolute error count and for the top reason.
      44763b51
    • Iustin Pop's avatar
      Return correct failure data from Node.add* · c43c3354
      Iustin Pop authored
      This patch alters the Node.addPri/addSec to return correct failure data.
      It removes the computeFailN1 function from the module as that used to
      combine both mem and disk checks in the same function and thus the real
      error reason cannot be deduced when using it.
      c43c3354
    • Iustin Pop's avatar
      Introduce a new type for allocation results · f2280553
      Iustin Pop authored
      Currently the allocation/move operations workflow return ‘Maybe a’,
      which is very convenient but loses all details about the failure mode.
      
      This patch introduces a new data type which encodes the specific failure
      mode. It is not yet used correctly (e.g. all node operations result in
      FailN1), but the workflow is updated. Most of the changes are in the
      hail/hspace tools, the library code required only trivial adjustments.
      f2280553
    • Iustin Pop's avatar
      Remove hn1 and related code · 266aea94
      Iustin Pop authored
      hn1 was deprecated for a while and this patch removes it altogether. The
      support code in Cluster.hs is also removed.
      266aea94
  4. Jul 03, 2009
    • Iustin Pop's avatar
      Display two more stats in hspace · 78ecfa8f
      Iustin Pop authored
      This adds two new stats - sum of reserved ram and disk.
      78ecfa8f
    • Iustin Pop's avatar
      Fix totalResources avail disk computation · 301789f4
      Iustin Pop authored
      This uses the newly-added Node.availDisk to compute the actual available
      disk correctl, and display the total allocatable disk in hspace.
      301789f4
    • Iustin Pop's avatar
      Add an availDisk node function · fe3d6f02
      Iustin Pop authored
      This function returns the amount of available disk, which depends on
      whether a low disk limit has been configured or not and on the free disk
      space of the node.
      fe3d6f02
    • Iustin Pop's avatar
      Add two new autocomputed vars to Nodes · 836533fa
      Iustin Pop authored
      Currently we track the max disk usage/max vcpus as percentages, however
      sometimes it's easier to check against minimum free disk or maximum
      number of cpus, as units instead of percentages.
      
      This patch adds two new variables, lo_dsk, hi_cpu, which are recomputed
      whenever we change the m_dsk/m_cpu 'master' values.
      836533fa
  5. Jul 02, 2009
    • Iustin Pop's avatar
      Add a new type for cluster statistics · 1a7eff0e
      Iustin Pop authored
      Currently totalResources returns a 5-tuple of integers. This is not easy
      to handle, as each change on the return type means that each caller must
      be updated.
      
      This patch adds a new type for cluster stats and uses that instead as
      its return type. This simplifies its callers while complicating only a
      little the computation of the stats.
      1a7eff0e
    • Iustin Pop's avatar
      Enhance hspace resource display · 621de5b7
      Iustin Pop authored
      The display of cluster resources is extracted into a separate function
      and enhanced to display more stats.
      621de5b7
    • Iustin Pop's avatar
      Add display of more stats in hspace · e2af3156
      Iustin Pop authored
      This patch changes Cluster.totalResources to compute more details about
      the cluster status, and enhances hspace to display more of these.
      e2af3156
  6. Jun 16, 2009
  7. Jun 12, 2009
  8. Jun 11, 2009
    • Iustin Pop's avatar
      Add two new node attributes · 844eff86
      Iustin Pop authored
      Two new min disk free ratio and max cpu usage attributes are added to the
      nodes. These will be used in the future to restrict allocation.
      844eff86
    • Iustin Pop's avatar
      Fix 'unused X' warnings · c6484f0b
      Iustin Pop authored
      This removes some unused functions and imports to cleanup the warnings.
      c6484f0b
    • 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
    • Iustin Pop's avatar
      Small changes to the node list output · 3c64b5aa
      Iustin Pop authored
      This is just some cleanup of the node list output, adding pcpu/vcpu
      counters, and making the display slightly nicer.
      3c64b5aa
  9. Jun 10, 2009
  10. Jun 05, 2009
  11. Jun 04, 2009
    • Iustin Pop's avatar
      Fix the ReplacePrimary instance move · 70db354e
      Iustin Pop authored
      During a replace-primary instance move, on the real cluster the instance
      is temporarily started on the secondary, and as such we must check that
      the secondary node can hold it for this duration. Currently the code
      does not, and depending on cluster scoring it will put instances on such
      'bad' secondaries (usually without enough memory).
      
      This patch fixes this by adding/removing the instance as a primary on
      the secondary node; and then using the result node as the new secondary.
      (Since we're in a monad, we could have just tried the allocation and
      dropped the result, but this is more clear).
      70db354e
  12. Jun 02, 2009
  13. Jun 01, 2009
Loading