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).
Version-Release number of selected component (if applicable): 0.4.0-2.fc6
Steps to Reproduce:
1. cobbler repo add
2. cobbler reposync
rsync -av -e ssh ...<rest of rsync command>
rsync -av ...<rest of rsync command>
It makes sense to have this as an option - but not hard-coded in the python code.
Strongly agreed. Thanks for the report!
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.
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.
Interesting, with my environment and the same parameters, rsync doesn't hang. Odd.
Anyhow, yes, I'll look at this in the future. Thanks.