Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 229811 - repo sync always uses ssh for rsync transfer - not appropriate for public mirrors
Summary: repo sync always uses ssh for rsync transfer - not appropriate for public mir...
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: 6
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Michael DeHaan
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-23 16:44 UTC by Jonathan Manton
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-06-28 19:45:32 UTC

Attachments (Terms of Use)

Description Jonathan Manton 2007-02-23 16:44:50 UTC
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.,


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-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 16:48:21 UTC
Strongly agreed.  Thanks for the report!

Comment 2 Michael DeHaan 2007-03-02 00:02:21 UTC
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 19:23:06 UTC
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 20:16:12 UTC
Interesting, with my environment and the same parameters, rsync doesn't hang.   Odd.

Anyhow, yes, I'll look at this in the future.  Thanks.

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