Skip to content
Permalink
Branch: master
Commits on Mar 19, 2019
  1. man: add a line for --version option

    elboulangero authored and poettering committed Feb 26, 2019
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Commits on Feb 26, 2019
  1. Display time statistics for casync extract

    elboulangero committed Feb 26, 2019
    This commit adds the following lines to casync extract statistics:
    
      Time spent seeding: 2min 29.401s (82%)
      Time spent decoding: 31.178s (17%)
      Total extract time: 3min 631ms
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  2. Fix build for every files that rely on time utils

    elboulangero committed Feb 26, 2019
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  3. Move time-related utils from util.h to time-util.h

    elboulangero committed Feb 26, 2019
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  4. format_timespan: use UINT64_C() macro

    elboulangero committed Feb 26, 2019
    Once again for consistency with the rest of casync's source
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  5. format_timespan: work with nsec instead of usec, remove unused USEC_*…

    elboulangero committed Feb 26, 2019
    … symbols
    
    Lennart:
    
      Hmm, let's stick to uint64_t as type in casync, and only deal with ns
      as unit. Patching through format_timespan() fixing up the factor sounds
      easy enough to me. Yes, this means systemd and casync will deviate from
      each other in this case, but I think that's fine, if we do it for a
      reason.
    
      In casync we mostly deal with ns, since we mostly deal with file system
      objects, and Linux exposes ns granularity for those, hence I think it
      is a good idea to standardize on ns time units. In systemd that's a bit
      different though...
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  6. format_timespan: remove print definitions

    elboulangero committed Feb 26, 2019
    To be consistent with the rest of casync's source.
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  7. format_timespan: get rid of usec_t/nsec_t types, use uint64_t instead

    elboulangero committed Feb 26, 2019
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  8. Import format_timespan() from systemd

    elboulangero committed Feb 26, 2019
    We also introduce a new couple of files: time-util.{c,h}. For now this is
    a verbatim copy from systemd c20db3887569e0c0d9c0e2845c5286e7edf0133a
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  9. Add casync runtime function

    elboulangero committed Feb 26, 2019
    This function returns the runtime of the sync object so far.
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  10. Add decoding time function

    elboulangero committed Feb 21, 2019
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  11. Add seeding time functions

    elboulangero committed Feb 21, 2019
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  12. Add --log-level option

    elboulangero authored and poettering committed Feb 22, 2019
    Now the log level can be set with:
    
        casync --log-level debug|info|error ...
    
    This command-line argument overrides the environment variable
    `CASYNC_LOG_LEVEL`.
    
    Closes: #185
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  13. casync-http: Log downloaded chunks with debug level (was info+verbose)

    elboulangero authored and poettering committed Feb 21, 2019
    With this commit, one must set casync log level to debug in order to see
    each downloaded chunks.
    
        CASYNC_LOG_LEVEL=debug casync extract ...
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Commits on Feb 19, 2019
  1. Display percentage in casync extract summary

    elboulangero authored and poettering committed Feb 4, 2019
    This commit adds percentage to the output of `casync extract`, to easily
    see the distribution of incoming chunks among local store, local seed
    and remote store.
    
    The new output looks like that:
    
      $ casync extract -v test.caibx yop.img
      Zero bytes written as sparse files: 7.3G
      Bytes cloned through reflinks: 0B
      Chunk requests fulfilled from local store: 127661 (100%)
      Bytes used from local store: 13.9G (100%)
      Chunk requests fulfilled from local seed: 0 (0%)
      Bytes used from local seed: 0B (0%)
      Chunk requests fulfilled from remote store: 0 (0%)
      Bytes used from remote store: 0B (0%)
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Commits on Feb 13, 2019
  1. casync-http: retry when curl fails to connect

    elboulangero authored and poettering committed Jul 6, 2018
    This patch implements a retry in casync-http, in the case where
    curl_easy_perform returns CURLE_COULDNT_CONNECT.
    
    Issue (how to reproduce)
    ------------------------
    
    Guest is a QEmu VM, host is Debian testing.
    
        $ qemu-system-x86_64 -enable-kvm \
            -nic user,hostfwd=tcp::2222-:22 \
            ...
    
    Python3 http server is running on the host.
    
        $ python3 -m http.server
        Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
    
    CASync is used on the guest.
    
        $ casync --version
        casync 2
        $ apt-cache show casync | grep ^Version
        Version: 2+20180321-2
    
    With this setup, 'casync extract' fails consistently with:
    
        $ casync extract http://10.0.2.2:8000/rootfs.img.caibx /dev/sda6
        Failed to acquire http://10.0.2.2:8000/default.castr/890d/890d...0c74a.cacnk
        Failed to run synchronizer: Broken pipe
    
    Debug
    -----
    
    Investigation shows that the sub-process casync-http fails at some point,
    curl_easy_perform() returns CURLE_COULDNT_CONNECT. This error is not
    handled and the process exits.
    
    Some more research seems to indicate that this error is not considered
    as a transient error by curl developers, hence curl won't retry [1]. How
    to handle that is left to the caller.
    
    So it's up to casync to decide if it should retry automatically, or if
    it should defer this decision one layer up to the caller.
    
    I must say that the error here is not reproducible if I use a proper
    http server on the host (namely nginx) instead of python http server.
    However I think that casync should be more robust in this regard.
    
    I could just blindly restart casync when it fails, however `casync
    extract` starts by chunking its seeds, which is an expensive operation.
    So it's much more efficient if casync can handle this error internally.
    
    ----
    
    [1]: https://curl.haxx.se/mail/tracker-2012-02/0014.html
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Commits on Feb 4, 2019
  1. Correct some logs in casync-tool

    elboulangero authored and poettering committed Jan 28, 2019
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Commits on Dec 6, 2018
  1. Add exit signal handler to casync-http

    elboulangero authored and poettering committed Jul 9, 2018
    When hitting "Ctrl-C" during `casync extract`, the casync-http worker
    receives a signal which is not handled, resulting in an unclean exit:
    the `/var/tmp/<...>.carem` directory is not deleted.
    
    This commit adds basic signal handling for exit signals, ensuring clean
    exit and deletion of the temporary work directory in `/var/tmp`.
    
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Commits on Aug 14, 2018
  1. casync-http: log acquiring file with info instead of err

    elboulangero committed Aug 14, 2018
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
  2. casync-tool: log extract summary with info instead of err

    elboulangero committed Aug 14, 2018
    Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.