Bug 1271913

Summary: [devexp_public_681]oc rsync cannot work when the rsync command not installed locally
Product: OKD Reporter: Wang Haoran <haowang>
Component: ocAssignee: Cesar Wong <cewong>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Sun <wsun>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, haowang, mbukatov, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 21:17:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wang Haoran 2015-10-15 06:11:25 UTC
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-28 02:32:48 UTC
https://github.com/openshift/origin/pull/5351

Comment 2 Wang Haoran 2015-10-28 06:16:27 UTC
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 17:57:35 UTC
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 07:40:32 UTC
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