Scott Henson <shenson(a)redhat.com> wrote:
On Fri, 01 Apr 2011 00:36:36 -0700, petermity
<6t12-n6js(a)dea.spamcon.org> wrote:
> Thanks, I wasn't aware of replicate (it's not mentioned in
> Cobbler's top-level help). The documentation at:
>
>
https://fedorahosted.org/cobbler/wiki/ReplicateMaster
>
> is sparse, not enough examples of exactly how to use it.
> Apparently there used to be a parameter "--full-data-sync" -
> that's what I want to do. Would this be the equivalent (since I
> have no systems or images)?:
>
> cobbler replicate --master=$MASTER_SERVER_IP --distros=* --profiles=* --repos=*
>
> When looking into it, I ran across:
>
>
https://fedorahosted.org/cobbler/wiki/MovingYourInstallToAnotherBox
>
> which has an unhelpful statement, "use the right flags". Again,
> examples would help.
Yeah, I probably need to do a better job of documentation.
> I also ran across this bug, over a year old - it would seem to
> imply that it won't be worth replicating because I won't have
> access to distros - is this bug bogus, or there's a workaround,
> or what?:
>
>
https://fedorahosted.org/cobbler/ticket/566
Nope, this is fixed.
I was finally able to try replicating; it's not working quite
right. From old server to new server, both running Cobbler
V2.0.11, I did on the new server, as root:
cobbler replicate --master=IP --sync-all
The first problem was that I got a lot of failures like:
rsync: send_files failed to open "/cache/zsh-4.2.6-5.el5.i386.rpm-{GUID
string}" (in distro-CentOS5.6-i386): Permission denied (13)
and at the end of a set of such failures:
rsync error: some files/attrs were not transferred (see previous errors)
(code 23) at main.c(1508) [generator=3.0.7]
That happened for most but not all distros.
I finally tracked that down to the permissions in the "cache"
directories under most of the distros under
/var/www/cobbler/ks_mirror on the old server - they were only
readable by the owner and nobody else; fixed via "chmod +r *" in
each cache directory.
Now there are no errors shown during the replicate.
I think that Cobbler creates those cache directories, is there a
bug (or was there a bug) in setting permissions correctly on
them? I'd never fooled manually with permissions there.
Secondly, it still isn't replicating correctly. After
replicating with no errors, using "cobbler distro list", distros
on the old server:
CentOS4.4-i386
CentOS5.5-i386
CentOS5.5-x86_64
CentOS5.6-i386
CentOS5.6-x86_64
Fedora14-i386
Fedora14-x86_64
But on the new server:
CentOS5.6-x86_64
Fedora14-x86_64
However, I noticed that for some reason the names under
/var/www/cobbler/ks_mirror are different between the two servers,
and the only distros showing up are those with the same name:
Old server:
dr-xr-xr-x 8 root root 4096 Feb 22 17:10 CentOS4.4
drwxr-xr-x 8 root root 4096 Feb 18 19:08 CentOS5.5
drwxr-xr-x 8 root root 4096 Feb 22 13:00 CentOS5.5-x64
drwxrwxr-x 7 root root 4096 Apr 12 20:10 CentOS5.6
drwxr-xr-x 7 root root 4096 Apr 12 20:31 CentOS5.6-x86_64
drwxr-xr-x. 2 root root 4096 Apr 26 12:07 config
drwxr-sr-x 8 root root 4096 Feb 22 14:42 Fedora14
drwxr-sr-x 8 root root 4096 Feb 23 13:20 Fedora14-x86_64
New server:
dr-xr-xr-x 8 root root 4096 Feb 22 17:10 CentOS4.4-i386
drwxr-xr-x 8 root root 4096 Feb 18 19:08 CentOS5.5-i386
drwxr-xr-x 8 root root 4096 Feb 22 13:00 CentOS5.5-x86_64
drwxrwxr-x 7 root root 4096 Apr 12 20:10 CentOS5.6-i386
drwxr-xr-x 7 root root 4096 Apr 12 20:31 CentOS5.6-x86_64
drwxr-xr-x 2 root root 4096 Apr 26 12:07 config
drwxr-sr-x 8 root root 4096 Feb 22 14:42 Fedora14-i386
drwxr-sr-x 8 root root 4096 Feb 23 13:20 Fedora14-x86_64
What's the solution to get the new server to actually fully sync
to the old one so all distros are available?