Bug 1323798

Summary: [supportability] rsync command needs verbose option for troubleshooting.
Product: OpenShift Container Platform Reporter: Eric Rich <erich>
Component: RFEAssignee: Ryan Murphy <rymurphy>
Status: CLOSED NOTABUG QA Contact: Wang Haoran <haowang>
Severity: high Docs Contact:
Priority: medium    
Version: 3.1.0CC: aos-bugs, bparees, dyan, erich, haowang, jokerman, mmccomas
Target Milestone: ---Keywords: RFE
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-29 15:21:34 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:

Description Eric Rich 2016-04-04 18:17:26 UTC
Description of problem:

Currently there is no way to debug a failed rsync command from oc, A debug option for rsync command, should be allowed. 

In short the following should be updated, to add 'verbose' as an option

https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/rsync/rsync.go#L101-L114
https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/rsync/copyrsync.go#L38-L44


The following also likely needs to be updated. 
https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/rsync/copyrsync.go#L31

Comment 2 Ben Parees 2016-07-25 03:10:43 UTC
Ryan is implementing this RFE this sprint.

Comment 3 Ryan Murphy 2016-07-28 21:11:30 UTC
From the code, it looks like is --verbose is already set if --quiet is not set (rsync/util.go:86), and the command automatically gives all the debug information that rsync and tar report.  What information are you looking for?  We could print more information from the Openshift side.  Could you give me an example?

Thank you!

Comment 4 Eric Rich 2016-07-28 21:38:35 UTC
(In reply to Ryan Murphy from comment #3)
> From the code, it looks like is --verbose is already set if --quiet is not
> set (rsync/util.go:86), and the command automatically gives all the debug
> information that rsync and tar report.  What information are you looking
> for?  We could print more information from the Openshift side.  Could you
> give me an example?
> 
> Thank you!

In the links I provided I don't see where verbose is set or enabled? 

https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/rsync/rsync.go#L101-L114
https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/rsync/copyrsync.go#L38-L44

The following is example output where quite is false (the default), and there are no verbose messages, that one could use for troubleshooting an rsync error with this command. 

> oc rsync hawkular-metrics-m4pdv:.m2/settings.xml .
>receiving incremental file list
>settings.xml
>
>sent 30 bytes  received 5816 bytes  11692.00 bytes/sec
>total size is 5729  speedup is 0.98

Comment 5 Ryan Murphy 2016-07-29 15:10:57 UTC
Hello

Here is where verbose is set for Rsync
https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/rsync/util.go#L81-L104

As long as --quiet isn't used, -v is set for rsync.

I'm not sure how your example is failing, it looks like it succeeds? What information are you expecting?

Thank you!

Comment 6 Eric Rich 2016-07-29 15:21:34 UTC
(In reply to Ryan Murphy from comment #5)
> Hello
> 
> Here is where verbose is set for Rsync
> https://github.com/openshift/origin/blob/master/pkg/cmd/cli/cmd/rsync/util.
> go#L81-L104
> 
> As long as --quiet isn't used, -v is set for rsync.
> 
> I'm not sure how your example is failing, it looks like it succeeds? What
> information are you expecting?
> 
> Thank you!

The example used was when a transfer is good, however if the transfer is bad, its (which its not clear from the output I provided) that debug information is supplied. 

We can close this, given that the setting are already set.