Red Hat Bugzilla – Full Text Bug Listing
|Summary:||repo sync always uses ssh for rsync transfer - not appropriate for public mirrors|
|Product:||[Fedora] Fedora||Reporter:||Jonathan Manton <jmanton>|
|Component:||cobbler||Assignee:||Michael DeHaan <mdehaan>|
|Status:||CLOSED WORKSFORME||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2007-06-28 15:45:32 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Jonathan Manton 2007-02-23 11:44:50 EST
Description of problem: The code to perform a "cobbler reposync" has the use of ssh on the remote host hard-coded into the python code when the URL given includes "rsync://". This is not appropriate when, for instance, using public rsync mirrors of repositories (e.g., gtlib.gatech.edu). See Version-Release number of selected component (if applicable): 0.4.0-2.fc6 How reproducible: Completely reproducible. Steps to Reproduce: 1. cobbler repo add --mirror=rsync://rsync.gtlib.gatech.edu/fedora-linux-core/6/i386 --mirror-name=fc6i386core --local-filename=local_fc6i386core 2. cobbler reposync 3. ? 4. Profit! Actual results: Python executes: rsync -av -e ssh ...<rest of rsync command> Expected results: Python executes: rsync -av ...<rest of rsync command> Additional info: It makes sense to have this as an option - but not hard-coded in the python code.
Comment 1 Michael DeHaan 2007-02-23 11:48:21 EST
Strongly agreed. Thanks for the report!
Comment 2 Michael DeHaan 2007-03-01 19:02:21 EST
Thinking this back over, what I should have said is "SSH shouldn't be mandatory" -- though I don't think cobbler is doing SSH to that mirror. For instance, if using rsync to mirror a mounted DVD (yes, somewhat weird, but supported, and happens to work quite well in practice), there's no reason to use SSH. SSH just makes things a bit slower, and we'd want to turn that off. In the case of the public mirror running the rsync daemon, it's not allowing you to log into the box (try to SSH to that server for an example of why that won't work -- it actually segfaults ssh on my machine), so cobbler isn't doing rsync over SSH at all. Unless I'm grossly mistaken, rsync shouldn't be trying to the ssh connection and will fallback appropriately to rsync protocol. The rsync manpage indicates rsync:// is rsync protocol and the -e ssh should be ignored as it's not relevant. So, it would be nice to have optional control over whether the "-e ssh" is passed in or not, though it is not like were putting extra load on the mirror since the mirror isn't actually involved in a SSH connection. I will make this an option, though, (please correct me if I'm wrong here, as I haven't read the rsync source) this shouldn't be abusing an public mirrors -- which is something I definitely don't want.
Comment 3 Jonathan Manton 2007-03-02 14:23:06 EST
To clarify - when I ran cobbler out of the box, it would not sync. It would run the "rsync -av -e ssh ..." and just sit there. I only let it run for 2 or 3 minutes, so maybe it times out after a while... I don't know. I modified the code so that instead of adding in "-e ssh" to the argument list, it adds in "", and it "works". When I say "it works", I mean "using my very specific config, it does what I want it to do". However, this is admittedly a very ugly way to get around the problem, perhaps breaking other stuff, so it should definately not be looked at as a patch. But it shows that (at least in my environment) if the "-e ssh" is there, it hangs, and if you don't have it, with everything else being equal, it works.
Comment 4 Michael DeHaan 2007-03-02 15:16:12 EST
Interesting, with my environment and the same parameters, rsync doesn't hang. Odd. Anyhow, yes, I'll look at this in the future. Thanks.