1. 31 Oct, 2013 1 commit
  2. 29 Oct, 2013 1 commit
  3. 30 Sep, 2013 2 commits
  4. 12 Sep, 2013 1 commit
  5. 01 Jul, 2013 1 commit
  6. 12 Jun, 2013 1 commit
  7. 10 Jun, 2013 1 commit
  8. 07 Jun, 2013 1 commit
  9. 22 May, 2013 2 commits
  10. 10 May, 2013 2 commits
  11. 07 May, 2013 1 commit
  12. 19 Apr, 2013 1 commit
  13. 12 Feb, 2013 1 commit
  14. 30 Jan, 2013 1 commit
    • Dato Simó's avatar
      harep: do not wait for repair job completion to set tags · 8af72964
      Dato Simó authored
      Because of instance locks, after submitting a repair job we weren't able to
      set the "pending" tag until at least the first opcode of the job finished.
      Introduce a small delay in the repair job so as to allow the subsequent
      TAGS_SET job to finish immediately, resulting in faster operation from the
      user's point of view.
      Make the duration of the delay configurable with --job-delay; if zero,
      avoid inserting the TestDelay opcode entirely.
      Signed-off-by: default avatarDato Simó <dato@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
  15. 29 Jan, 2013 1 commit
  16. 24 Dec, 2012 1 commit
  17. 19 Dec, 2012 1 commit
    • Iustin Pop's avatar
      Add a custom CLI module for DataCollectors · 55abd2c7
      Iustin Pop authored
      Currently, the mon-collector binary uses the HTools/CLI module, which
      is OK but mean it links in lots of htools code. By copying that module
      to DataCollectors/CLI and removing the unneeded code, we reduce the
      number of modules it depends on fro 20 to 12, meaning both a shorter
      compiler time (24s to 9s) and a smaller binary (~9.6MB to ~7MB).
      Also fixes a typo in the original HTools/CLI module, thanks Michele!
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
  18. 30 Nov, 2012 1 commit
  19. 13 Nov, 2012 1 commit
  20. 12 Nov, 2012 1 commit
    • Iustin Pop's avatar
      Remove unsafePerformIO usage · 29a30533
      Iustin Pop authored
      We need to change a few things, most importantly CLI options defaults,
      but otherwise we already used the path to files from functions which
      were already in the I/O monad, so we don't have to change much of the
      code flow.
      Additionally, Path.hs now has an explicit export list, to stop
      accidental leakage of symbols.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
  21. 08 Oct, 2012 3 commits
  22. 26 Sep, 2012 3 commits
  23. 18 Sep, 2012 1 commit
  24. 05 Sep, 2012 3 commits
    • Iustin Pop's avatar
      Further hlint fixes · 5b11f8db
      Iustin Pop authored
      Commit 2cdaf225, “Re-enable standard hlint warnings”, got it almost
      right. The only problem is that (confusingly) the default set of hints
      is not in HLint.Default, but in HLint.HLint (it includes Default and
      some built-ins).
      After changing the lint file to correctly include the defaults, we had
      another 128 suggestions:
        - Error: Eta reduce (2)
        - Error: Redundant bracket (4)
        - Error: Redundant do (17)
        - Error: Redundant lambda (7)
        - Error: Redundant return (1)
        - Warning: Avoid lambda (2)
        - Warning: Redundant $ (42)
        - Warning: Redundant bracket (35)
        - Warning: Use : (1)
        - Warning: Use String (4)
        - Warning: Use camelCase (10)
        - Warning: Use section (3)
      which are fixed by the current patch. Note that the 10 "Use camelCase"
      were all due to hlint not “knowing” the idiom of ‘case_’ (it does for
      ‘prop_’), for which I filled
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
    • Iustin Pop's avatar
      Rework CLI modules and tests · 51000365
      Iustin Pop authored
      While investigating how we could test the Daemon.hs module, I realised
      that we have a very, erm, sub-optimal situation:
      - HTools/CLI.hs has a nice IO/pure separation testing in cmdline
        parsing, which allows some basic functionality to be tested, but
        uses direct 'read' in many options, which fails at runtime when
        evaluating the argument, and not when parsing the options
      - Daemon.hs lacks that, but has a much nicer 'reqWithConversion'
        helper that can be used for nicer option parsing, and uses that +
        tryRead instead of plain 'read'
      Since this situation is very bad, let's clean it up. We introduce yet
      another module, Common.hs, that holds functionality common to all
      command line programs (daemons or not). We move the parsing to this
      module, and introduce a type class to handle option types which
      support --help/--version. This allows removal of duplicated code from
      CLI.hs and Daemon.hs.
      The other part of the patch is cleanup/rework of the tests for this
      code: we introduce some helpers (checkOpt, passFailOpt,
      checkEarlyExit) that can be used from the much-slimmer now tests for
      CLI and Daemon. In the common module, we just test the yes/no helper
      we have. Many new tests for boolean options and numeric options are
      A side change is the removal of the obsolete `--replay-count',
      `--test-size' options (unused since commit 95f6c931
      , “Switch Haskell
      test harness to test-framework”).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
    • Iustin Pop's avatar
      Move Version.hs up from under HTools/ · 2997cb0a
      Iustin Pop authored
      This is another module that is generic, and not htools-specific.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
  25. 27 Jul, 2012 1 commit
  26. 19 Jul, 2012 1 commit
    • Iustin Pop's avatar
      Reorganise the lookup functions · 2fc5653f
      Iustin Pop authored
      Currently, the LookupResult, MatchPriority and related functions are
      locate in Loader.hs, since (so far) only hbal needs them in the
      selection of instances. However, with the new functionality on confd
      side, we need these functions there too, but we don't want to import
      Loader.hs (which pulls in lots of balancing-related code). So we move
      all these function to BasicTypes.hs, since that module is a leaf one,
      with no other dependencies.
      Unittests are slightly adjusted (but they are still tested under the
      'Loader' group).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarAgata Murawska <agatamurawska@google.com>
  27. 28 Jun, 2012 1 commit
  28. 27 Jun, 2012 1 commit
  29. 25 Jun, 2012 2 commits
  30. 22 Mar, 2012 1 commit
    • Iustin Pop's avatar
      Rework exit model · 88a10df5
      Iustin Pop authored
      While updating the confd code, I realised that we have _lots_ of
      duplication in the exit model for the various programs.
      So this patch attempts to abstract all the exits via a couple of new
      functions; sorry for the somewhat big patch, but I hope the payoff is
      worth the change: the actual exit conditions are much clearer.
      Note that the patch (also) moves the exitIfBad function to Utils.hs,
      since that is more logical.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>