1. 19 Oct, 2015 4 commits
    • Ruslan Kuprieiev's avatar
      pycriu: add criu class · 85856e9d
      Ruslan Kuprieiev authored
      This class is essentially libcriu in python(yet for now it
      has only some basic functions such as check/dump/restore).
      It is needed to make life for python users even more easier,
      i.e. hiding some nasty connection stuff. It is also using
      criu swrk(COMM_BIN) communication method, instead of an old
      system service, as we no longer recommend it.
      Signed-off-by: 's avatarRuslan Kuprieiev <rkuprieiev@cloudlinux.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      85856e9d
    • Kir Kolyshkin's avatar
      restore_root_task(): fix calling try_clean_remaps · 44562737
      Kir Kolyshkin authored
      1. As pointed out by Coverity (CID 114629), mnt_ns_fd is closed,
      but then the function calls try_clean_remaps(mnt_ns_fd)
      which tries to close the file descriptor which is already closed.
      
      To address this, let's use safe_close() which sets closed fd to -1.
      As it also checks its argument, there's no need for explicit check
      so let's remove "if" check before close().
      
      2. As Pavel pointed out, "calling the whole try_clean_remaps()
      is not required once we've passed the cleanup_mnt_ns() point".
      This could be addressed by introducing yet another label, but
      it's cleaner to just use a flag variable.
      
      Note that since the second issue is being addressed, the first one
      goes away, but let's keep the fix for it anyway, it might help in
      the future.
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      44562737
    • Kir Kolyshkin's avatar
      tcp_read_sysctl_limits: hide a useless error, leave a warning · 75fa3c6e
      Kir Kolyshkin authored
      When running tests, there are a lot of errors like this:
      
       (00.000053) Error (sysctl.c:367): Can't open sysctl net/ipv4/tcp_rmem: No such file or directory
      
      As Andrew explained, tests are running in a netns that lacks
      this sysctl. Use CTL_FLAGS_OPTIONAL flag to hide the error message.
      
      Since with this flag sysctl_op() will most probably return 0,
      add an additional check for vect[0] == 0 to detect that the file
      was not read and show an appropriate warning, i.e.
      "TCP mem sysctls are not available. Using defaults."
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      75fa3c6e
    • Kir Kolyshkin's avatar
      tcp_read_sysctl_limits(): simplify vect · b1599c3d
      Kir Kolyshkin authored
      I spent some time trying to figure out why vect array
      is declared as [2][3], also why vect[0] is not used.
      The answer is commit 4bca68ba that removed code using it.
      
      Let's save a few bytes, and make the code more readable.
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      b1599c3d
  2. 15 Oct, 2015 6 commits
  3. 14 Oct, 2015 6 commits
  4. 12 Oct, 2015 17 commits
  5. 09 Oct, 2015 7 commits