Bug 1271945

Summary: [devexp_public_681]oc rsync -c option cannot work with rsync and tar both installed in the client and container
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, 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:14:44 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:48:29 UTC
Description of problem:
oc rsync -c option cannot work even when rsync and tar are both installed in the client and container with below warning:
W1015 02:09:12.316932    9257 rsync.go:343] rsync not found in container 854c7c715f35 of pod ruby-hello-world-1-vgpf

Version-Release number of selected component (if applicable):
oc v1.0.6-610-g1bc373b
openshift v1.0.6-610-g1bc373b
kubernetes v1.1.0-alpha.1-653-g86b4e77
AMI:devenv-rhel7_2465

How reproducible:
always

Steps to Reproduce:
1.create a project
2.Create a new app
 $oc new-app registry.access.redhat.com/openshift3/ruby-20-rhel7~https://github.com/openshift/ruby-hello-world.git
3.sync files after the deploy success
  oc rsync ./file1 ruby-hello-world-1-vgpfl:/tmp -c 777e2986b970

Actual results:
[root@ip-172-18-8-1 somefiles]# oc rsync ./file1 ruby-hello-world-1-vgpfl:/tmp -c 854c7c715f35
W1015 02:09:12.316932    9257 rsync.go:343] rsync not found in container 854c7c715f35 of pod ruby-hello-world-1-vgpf


Expected results:
Should sync file successfully

Additional info:
commands existed on local:
[root@ip-172-18-8-1 somefiles]# which tar
/bin/tar
[root@ip-172-18-8-1 somefiles]# which rsync
/bin/rsync

command existed on container
[root@ip-172-18-8-1 somefiles]# oc rsync ./file1 ruby-hello-world-1-vgpfl:/tmp -c 854c7c715f35
W1015 02:09:12.316932    9257 rsync.go:343] rsync not found in container 854c7c715f35 of pod ruby-hello-world-1-vgpfl
error: error executing remote command: Error executing command in container: container not found ("854c7c715f35")
[root@ip-172-18-8-1 somefiles]# docker exec -t -i 854c7c715f35 /bin/bash
bash-4.2$ which tar
/usr/bin/tar
bash-4.2$ which rsync
/usr/bin/rsync

Comment 1 Cesar Wong 2015-10-28 02:33:51 UTC
https://github.com/openshift/origin/pull/5351

Comment 2 Wang Haoran 2015-10-28 06:46:41 UTC
test with AMI :devenv-rhel7_2576, have the same problem as the bug description.

Comment 3 Wang Haoran 2015-10-28 10:04:50 UTC
cewong, sorry , the bug was verified using AMI :devenv-rhel7_2576, it's my command problem. should use the container name in the --container option not the container id.