Re: [Replicator-users] Re: A look in "repli-update"
Status: Beta
Brought to you by:
schaumat
|
From: Sebastien C. <Seb...@en...> - 2002-10-30 18:45:41
|
Le mer 30/10/2002 =E0 18:55, Bernd Harmsen a =E9crit :
> On Tue, Oct 29, 2002 at 11:40:20PM +0100, Jerome Warnier wrote:
> > Before anything else, tell me which version you are currently using.
>=20
> I use a Debian-Package from the CVS-Version from 20.08.2002 with some
> small bugfixes (see my bug reports) and some fixes to allow the package
> build prozess.
>=20
> Today I have build a new debian package with the upstream changes and
> my fixes. CVS from 30.10.2002. I will test it tomorrow.
>=20
>=20
> > >--------------------------------------------------------------------
> > >2) Write a list of the Param "repli-update" understands and what they
> > >should do.
> > >--------------------------------------------------------------------
> > >
> > >repli-install calls:
> > >repli-update --config $confile $ssh_opt --dev $rupdate_dry=20
> > >$netcopy_exclude --model $model --destdir $installtarget
> > >But I don't know, what is in the variables at that time.
> > >
> > >
> > >repli-sync calls:
> > >$share_dir_on_server/repli-update --destdir / --model $model --config=20
> > >$confile @ARGV
> > >$confile is "/etc/replicator/repli-sync" on the replicated host and
> > >$model ist taken from that file.
> > >
> > >Why these calls behave different ?
>=20
> Can you explain the contents of the params during the call from
> repli-install.
>=20
>=20
>=20
> > >--------------------------------------------------------------------
> > >3) Take a deeper look in the code of "repli-update" and understand
> > >what is doing what.
> > >--------------------------------------------------------------------
>=20
> > >$excludefile =3D "/tmp/excl.rsync.$$";
> > >$fh =3D new FileHandle $excludefile,"w" or die "opening exclude file:$=
!\n";;
> > >foreach (@slash_exclude) { print $fh "- $_\n"; }
> > >$fh->close; =20
> > >dosystem("rsync $rsyncopt --one-file-system --exclude-from=3D$excludef=
ile=20
> > >${model}::replicator/ $destdir 2>&1");
> > >
> > >The content of the list @slash_exclude is written to a file, line by
> > >line. But for what is the "-" in { print $fh "- $_\n"; } ?
>=20
> Can you explain this ?
>=20
sure: the "-" tell rsync to force exclusion of the file even if there is
a wildcard to include it.
>=20
> > >my $usr_exclude =3D '';
> > >foreach (@usr_exclude) { $usr_exclude .=3D " --exclude '- $_' "; } =
=20
> > >dosystem("rsync $rsyncopt $usr_exclude ${model}::replicator/usr/.=20
> > >$destdir/usr/. 2>&1");
> > >
> > >Interesting in how many different way a list can be passed to rsync. I=
s
> > >there a matter for the different ways? I have somewhere heard about a
> > >maximum length of the command line. Do you know how long a command lin=
e
> > >can be?
>=20
>=20
> > >$dryrun or -d "$destdir/var/." or mkdir "$destdir/var",0755 or die "ca=
nnot=20
> > >make $destdir/var";;
> > >dosystem("rsync $rsyncopt --include '+ */' --exclude '- *'=20
> > >${model}::replicator/var/. $destdir/var/.");
> > >foreach (@var_include) {
> > >dosystem("rsync $rsyncopt ${model}::replicator/var/$_/ $destdir/var/$_=
=20
> > >2>&1");
> > >}
> > >
> > >For what is the "+" and the "-" sign in the [ei][xn]clude-rules? Is is=
t
> > >perl-syntax or parsed by rsync?
>=20
> Can you enlight this ?
>=20
rsync
>=20
>=20
> > >--------------------------------------------------------------------
> > >4) Correct "repli-update" and/or call it with other params
> > >--------------------------------------------------------------------
>=20
I will correct repli-update : this is my first taskj after fixing the
woody package.
> > >- What do you think about a @change_hostname list with files in which
> > > the name of the model should be replaced with the name of the target
> > > host. This can be implemented in repli-update or the example
> > > repli-postint.
> > I don't understand.
>=20
> After repli-install there are some files in which the name of the model
> must be replaced with the name of the targed. eg:
> /etc/hostname
> /etc/hosts
> /etc/logcheck/ignore.d/local (in my setup)
> /etc/mailname
> /etc/motd
> /etc/ssmtp/ssmtp.conf
> I think it is nice to have a list to put such files in to let
> replicator do the replacing (e.g. using seed).
> I want files like /etc/logcheck/ingore.d/local and
> /etc/ssmtp/ssmtp.conf updated during repli-sync. So the names must
> replaced often.
>=20
>=20
>=20
> > >- The config files replicator.conf and update_rules are not copied to
> > > the target during repli-install bacause of the default
> > > @shlash_exclude list. If we need them for repli.sync we should remove
> > > /etc/replicator from this list.
> > I did notice this too.
>=20
I'll look at this.
> Because /etc/replicator in the modell contains only the following files
> I feel it is save to remove them from #slash_exclude
>=20
> bilbo:/etc/replicator# ls -l
> insgesamt 32
> -rw-r--r-- 1 root root 6661 21. Sep 19:28 replicator.conf
> -rw-r--r-- 1 root root 684 21. Sep 19:32 repli-postinst
> -rw-r--r-- 1 root root 94 26. Aug 12:03 repli-sync.conf
> -rw-r--r-- 1 root root 215 20. Aug 17:14 rsyncd.conf
> -rw-r--r-- 1 root root 1780 26. Aug 11:17 update_rules
>=20
>=20
> > >- More ideas ?
> > Yes, a lot.
> > Sadly, I don't have access today to the machine were my replicator has=20
> > been modified. I cannot tell much more today, and probably this week.
>=20
> I like to hear.
>=20
>=20
> Regards,
> Bernd
--=20
Sebastien CHAUMAT =20
Ecole Normale Superieure Laboratoire de Physique / PR@TIC
46, All=E9e d'Italie +33 4 72 72 84 66 fax: +33 4 72 72 81 81
69364 LYON CEDEX 07 FRANCE E-mail : Seb...@en...
|