0

I am developing a python3 script which replicates data from PersistentVolumeClaims mounted in a pod, via rsync. This script is executed in a pod, therefore, the rsync connection is from a pod to another remote pod.

The problem is that whenever the volume of data to replicate is a little bit large, rsync fails with the following error:

2020-05-05 16:14:06,330 - OCPRSYNCER - INFO - rsync -ahrvz --quiet --delete --progress=true --rsh='oc rsh -n test-rsyncer -c postgresql' postgresql-2-h8qjb:/var/lib/pgsql/data/ /opt/app-root/backup/PVCs/test-rsyncer/postgresql/

E0505 16:14:09.843986      26 v2.go:147] write /dev/stdout: resource temporarily unavailable

The container's user is root, and these are the ulimits settings inside the pod:

sh-4.2# whoami
root
sh-4.2# ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 128597
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1048576
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1048576
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
sh-4.2# 

1 Answer 1

2

In the end, the option --blocking-io did the trick for me.

Quoting from man: --blocking-io use blocking I/O for the remote shell

The following command works successfully:

rsync --blocking-io -ahrvz --delete --rsh='oc rsh -n test-rsyncer -c postgresql' postgresql-2-h8qjb:/var/lib/pgsql/data/ /backup/PVCs/test-rsyncer/postgresql

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .