Bug 1271913 - [devexp_public_681]oc rsync cannot work when the rsync command not installed locally
[devexp_public_681]oc rsync cannot work when the rsync command not installed ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Cesar Wong
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-15 02:11 EDT by Wang Haoran
Modified: 2015-11-23 16:17 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:17:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wang Haoran 2015-10-15 02:11:25 EDT
Description of problem:

when remove the rsync command locally , cannot sync file to the pod using oc rsync
Version-Release number of selected component (if applicable):
openshift v1.0.6-610-g1bc373b
kubernetes v1.1.0-alpha.1-653-g86b4e77
AMI:qe_devenv-rhel7_2465

How reproducible:

always
Steps to Reproduce:
1.create a project
2.new app
 $oc new-app registry.access.redhat.com/openshift3/ruby-20-rhel7~https://github.com/openshift/ruby-hello-world.git
3.remove rsync locally
 yum remove rsync
4.sync files after the deploy success
  $oc rsync testfile <pod>:/tmp

Actual results:
get message : rsync not found in local computer

Expected results:
could sync file successfully.


Additional info:
Comment 1 Cesar Wong 2015-10-27 22:32:48 EDT
https://github.com/openshift/origin/pull/5351
Comment 2 Wang Haoran 2015-10-28 02:16:27 EDT
test again using AMI:devenv-rhel7_2576
1. it works with absolute path . 
2. and have problem with relative path, after rsync , the directory name changed.see the log:
[root@ip-172-18-2-7 ~]# mkdir test
[root@ip-172-18-2-7 ~]# echo "tet" >> test/testfile
[root@ip-172-18-2-7 ~]# oc rsync ./test ruby-hello-world-2-udfux:/tmp
W1028 02:05:32.654473    7498 rsync.go:106] rsync command not found in path. Please use your package manager to install it.
st/testfile
[root@ip-172-18-2-7 ~]# oc rsh ruby-hello-world-2-udfux
bash-4.2$ ls -rlt /tmp
total 20
-rw-------. 1 root       root       0 Aug 26 11:54 yum.log
-rwx------. 1 root       root     663 Aug 26 11:56 ks-script-R4xZy7
-rw-r--r--. 1 root       root    1879 Aug 26 11:56 anaconda-post.log
drwxr-xr-x. 6 default    default 4096 Oct 28 01:59 src
-rw-r--r--. 1 1000030000 root       1 Oct 28 02:00 rack.pid
drwxr-xr-x. 2 1000030000 root    4096 Oct 28 02:05 st
bash-4.2$ ls -rlt /tmp/st
total 4
-rw-r--r--. 1 1000030000 root 4 Oct 28 02:05 testfile
Comment 3 Cesar Wong 2015-10-28 13:57:35 EDT
The problem with relative directory name truncation has been fixed in 
https://github.com/openshift/origin/pull/5445
Comment 4 Wang Haoran 2015-10-29 03:40:32 EDT
test again using AMI :devenv-rhel7_2589
1. can sync file using relative path
2. when the cannot sync to a not exited directory will track with this bug :
   https://bugzilla.redhat.com/show_bug.cgi?id=1276008

Note You need to log in before you can comment on or make changes to this bug.