1. 18 Jun, 2015 1 commit
    • rht's avatar
      Replace Critical{,f} with Error{,f} · 78b6cc5f
      rht authored
      Except when there is an explicit os.Exit(1) after the Critical line,
      then replace with Fatal{,f}.
      golang's log and logrus already call os.Exit(1) by default with Fatal.
      
      License: MIT
      Signed-off-by: default avatarrht <rhtbot@gmail.com>
      78b6cc5f
  2. 15 Jun, 2015 1 commit
  3. 14 Jun, 2015 1 commit
  4. 08 Jun, 2015 2 commits
  5. 06 Jun, 2015 1 commit
  6. 01 Jun, 2015 1 commit
  7. 26 May, 2015 1 commit
  8. 20 May, 2015 2 commits
  9. 18 May, 2015 1 commit
  10. 10 May, 2015 1 commit
  11. 01 May, 2015 2 commits
  12. 28 Apr, 2015 1 commit
  13. 27 Apr, 2015 3 commits
  14. 26 Apr, 2015 1 commit
  15. 25 Apr, 2015 1 commit
  16. 21 Apr, 2015 2 commits
    • Juan Batiz-Benet's avatar
      init: lower default rsa key size to 2048 for now · 16f56e1c
      Juan Batiz-Benet authored
      I think we should lower the default rsa key size to 2048 for now -- until we have a proper focus on securing everything. It's always a pain for new users to get hung on 4096 rsa key gen, when we have not even made sure we're using the keys perfectly correctly yet. (And 2048 is still considered secure)
      16f56e1c
    • Travis Person's avatar
      Check to see if the daemon is currently running · e1f8dfa2
      Travis Person authored
      If the daemon is running we do not want to proceed with an
      an initialization.
      
      Return a client error telling the user to kill the daemon
      before proceeding with the command.
      e1f8dfa2
  17. 20 Apr, 2015 9 commits
    • Tor Arne Vestbø's avatar
      Remove daemon InitDone guard in interrupt handler · bfd12114
      Tor Arne Vestbø authored
      Instead of just terminating right there and then, we cancel the
      context, and let the daemon exit cleanly. This make take a few
      seconds, as the node builder and its child processes do not
      care too much about the context state while building nodes,
      but this can be improved by injecting checks for ctx.Done()
      before time-consuming steps.
      bfd12114
    • Tor Arne Vestbø's avatar
      Handle ipfs command interruption by cancelling the command context · cf6a268c
      Tor Arne Vestbø authored
      Instead of assuming the command is the daemon command and closing
      the node, which resulted in bugs like #1053, we cancel the context
      and let the context children detect the cancellation and gracefully
      clean up after themselves.
      
      The shutdown logging has been moved into the daemon command, where
      it makes more sense, so that commands like ping will not print out
      the same output on cancellation.
      cf6a268c
    • Tor Arne Vestbø's avatar
      Sync up request context with root context just before calling command · 3d057642
      Tor Arne Vestbø authored
      The context passed on from main() may change before we hit callCommand,
      so setting it in Parse is a bit optimistic.
      3d057642
    • Tor Arne Vestbø's avatar
      main: wait for interrupt to finish before ending command invocation · 00a6e595
      Tor Arne Vestbø authored
      If a command invocation such as 'daemon' is interrupted, the interrupt
      handler asks the node to close. The closing of the node will result in
      the command invocation finishing, and possibly returning from main()
      before the interrupt handler is done. In particular, the info logging
      that a graceful shutdown was completed may never reach reach stdout.
      
      As the whole point of logging "Gracefully shut down." is to give
      confidence when debugging that the shutdown was clean, this is
      slightly unfortunate.
      
      The interrupt handler needs to be set up in main() instead of Run(),
      so that we can defer the closing of the interrupt handler until just
      before returning from main, not when Run() returns with a streaming
      result reader.
      00a6e595
    • Tor Arne Vestbø's avatar
      Revert "fix ugly error message when killing commands" · 61efc4de
      Tor Arne Vestbø authored
      This reverts commit f74e71f9.
      
      The 'Online' flag of the command context does not seem to be set in
      any code paths, at least not when running commands such as 'ipfs daemon'
      or 'ipfs ping'. The result after f74e71f9 is that we never shutdown
      cleanly, as we'll always os.Exit(0) from the interrupt handler.
      
      The os.Exit(0) itself is also dubious, as conceptually the interrupt
      handler should ask whatever is stalling to stop stalling, so that
      main() can return like normal. Exiting with -1 in error cases where
      the interrupt handler is unable to stop the stall is fine, but the
      normal case of interrupting cleanly should exit through main().
      61efc4de
    • Jeromy's avatar
      make ipfs understand the new migration · c419a489
      Jeromy authored
      c419a489
    • Jeromy's avatar
      f3fbedf3
    • Juan Batiz-Benet's avatar
      remove debugerrors · 140cd1fd
      Juan Batiz-Benet authored
      We now consider debugerrors harmful: we've run into cases where
      debugerror.Wrap() hid valuable error information (err == io.EOF?).
      I've removed them from the main code, but left them in some tests.
      Go errors are lacking, but unfortunately, this isn't the solution.
      
      It is possible that debugerros.New or debugerrors.Errorf should
      remain still (i.e. only remove debugerrors.Wrap) but we don't use
      these errors often enough to keep.
      140cd1fd
    • Jeromy's avatar
      fix for #1008 and other pinning fixes · 0a6b880b
      Jeromy authored
      This commit adds a new set of sharness tests for pinning, and addresses
      bugs that were pointed out by said tests.
      
      test/sharness: added more pinning tests
      
      Pinning is currently broken. See issue #1051. This commit introduces
      a few more pinning tests. These are by no means exhaustive, but
      definitely surface the present problems going on. I believe these
      tests are correct, but not sure. Pushing them as failing so that
      pinning is fixed in this PR.
      
      make pinning and merkledag.Get take contexts
      
      improve 'add' commands usage of pinning
      
      FIXUP: fix 'pin lists look good'
      
      ipfs-pin-stat simple script to help check pinning
      
      This is a simple shell script to help check pinning.
      
      We ought to strive towards making adding commands this easy.
      The http api is great and powerful, but our setup right now
      gets in the way. Perhaps we can clean up that area.
      
      updated t0081-repo-pinning
      
      - fixed a couple bugs with the tests
      - made it a bit clearer (still a lot going on)
      - the remaining tests are correct and highlight a problem with
        pinning. Namely, that recursive pinning is buggy. At least:
        towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
        be pinned indirectly, but they're not. And thus get gc-ed out.
        There may be other problems too.
      
      cc @whyrusleeping
      
      fix grep params for context deadline check
      
      fix bugs in pin and pin tests
      
      check for block local before checking recursive pin
      0a6b880b
  18. 12 Apr, 2015 1 commit
  19. 07 Apr, 2015 1 commit
  20. 02 Apr, 2015 1 commit
  21. 31 Mar, 2015 1 commit
  22. 17 Mar, 2015 1 commit
  23. 14 Mar, 2015 1 commit
  24. 12 Mar, 2015 2 commits
  25. 09 Mar, 2015 1 commit