Thread: [Replicator-users] How to use "repli-sync"
Status: Beta
Brought to you by:
schaumat
|
From: Bernd H. <bj...@da...> - 2002-10-25 18:31:37
|
Hello, I have replicated two hosts (frodo, giga) from one modell-most (bilbo) using the cvs version from replicator. Now I have made some changes to the modell and want to synchronice the replicated hosts. This mail describes how I try to get repli-sync working. At the end there are some new files an the model (bilbo) missing on the replicat (frodo). It would be nice if you can give me a hint, how I get the hosts completly synchronizes with repli-sync. If you need some additional information or if I can do some tests I like to do it. Thanke Bernd ----------------- 8< ----------------------------------------- On "frodo" I have the following repli-sync.conf: frodo:~# cat /etc/replicator/repli-sync.conf=20 $model =3D "bilbo"; $nousr =3D 0; $noboot =3D 1; $norcd =3D 1; #do not remove the following line.. $the_end=3D1; If I try to start repli-sync I get the following error: frodo:~# /usr/share/replicator/repli-sync=20 Name "main::share_dir_on_server" used only once: possible typo at /usr/shar= e/replicator/repli-sync line 41. Can't exec "/repli-update": No such file or directory at /usr/share/replica= tor/repli-sync line 41. The I try to set the variable $share_dir_on_server in repli-sync.conf on frodo to /usr/share/replicator, where i have found repli-update: frodo:~# cat /etc/replicator/repli-sync.conf=20 $share_dir_on_server =3D "/usr/share/replicator"; $model =3D "bilbo"; $nousr =3D 0; $noboot =3D 1; $norcd =3D 1; #do not remove the following line.. $the_end=3D1; frodo:~# /usr/share/replicator/repli-sync=20 Name "main::share_dir_on_server" used only once: possible typo at /usr/shar= e/replicator/repli-sync line 41. dpkg: warning, architecture `i386-none' not in remapping table Erreur: no file /etc/replicator/replicator.conf available ; at /usr/share/replicator/repli-common line 70. Compilation failed in require at /usr/share/replicator/repli-update line 45. It seems that repli-update wants am /etc/replicator/replicator.conf. But this file is on the modell (bilbo) and was not copied to frodo during initial replication. Now I copy the /etc/replicator/replicator.conf from bilbo to frodo. Next try I got: frodo:/etc/replicator# /usr/share/replicator/repli-sync=20 Name "main::share_dir_on_server" used only once: possible typo at /usr/shar= e/replicator/repli-sync line 41. dpkg: warning, architecture `i386-none' not in remapping table Can't locate /etc/replicator/update_rules at /usr/share/replicator/repli-up= date line 56. Ok. I also copy /etc/replicator/update_rules form bilbo to frodo. After that, repli-sync seems to work, may file names are scrolling over the window. But not all new files seems to be copied: bilbo:/home/bernd# whereis lyx lyx: /usr/bin/lyx /usr/share/lyx /usr/share/man/man1/lyx.1.gz frodo:/etc/replicator# whereis lyx lyx: |
|
From: Bernd H. <bj...@da...> - 2002-10-26 18:54:14
|
Hello Jerome, On Fri, Oct 25, 2002 at 08:37:49PM +0200, Jerome Warnier wrote: > >This mail describes how I try to get repli-sync working. At the end > >there are some new files an the model (bilbo) missing on the replicat > >(frodo). > >It would be nice if you can give me a hint, how I get the hosts > >completly synchronizes with repli-sync. If you need some additional > >information or if I can do some tests I like to do it. > > > I have the exact same problem, and I am going to fix it some near day. > Do you have *any* knowledge about Perl? I have *very* less perl knowledge but good programming experience in some other languages. I like to help. At first I feel, that there is less concept or less (detailed) dokumentation. (What are the function of the different skripts of replicator). First I think it is important to fully understand the function of repli-update. What do you think about writing some dokumentation, as preparation for programming an fixing error? Are one of the Maintainers willing to to help on this, answer questions ? What do you think the next step should be? Regards, Bernd |
|
From: Jerome W. <jwa...@bx...> - 2002-10-26 19:05:16
|
Bernd Harmsen wrote: >Hello Jerome, > >On Fri, Oct 25, 2002 at 08:37:49PM +0200, Jerome Warnier wrote: > > >>>This mail describes how I try to get repli-sync working. At the end >>>there are some new files an the model (bilbo) missing on the replicat >>>(frodo). >>>It would be nice if you can give me a hint, how I get the hosts >>>completly synchronizes with repli-sync. If you need some additional >>>information or if I can do some tests I like to do it. >>> >>> >>> >>I have the exact same problem, and I am going to fix it some near day. >>Do you have *any* knowledge about Perl? >> >> > >I have *very* less perl knowledge but good programming experience in >some other languages. I like to help. > > ;-) >At first I feel, that there is less concept or less (detailed) >dokumentation. (What are the function of the different skripts of >replicator). > > You do not mean "less", but "not much". >First I think it is important to fully understand the function of >repli-update. > >What do you think about writing some dokumentation, as preparation for >programming an fixing error? Are one of the Maintainers willing to to >help on this, answer questions ? > > I can help documenting the whole lot, but starting with repli-sync and repli-update is a good idea, as I'll have to use them soon also, and have recently put an eye on them. Sadly, I'm not someone who makes things by itself, I always need a reason. The maintainers are good-willing, off course, but have other things to do right now, as I understood. >What do you think the next step should be? > > We should contact each other and discuss (on IRC) about the code (I know it enough to reply to common questions). >Regards, >Bernd > > |
|
From: Bernd H. <bj...@da...> - 2002-10-29 00:04:14
|
Hello Jerome,
On Sat, Oct 26, 2002 at 09:04:28PM +0200, Jerome Warnier wrote:
> >At first I feel, that there is less concept or less (detailed)
> You do not mean "less", but "not much".
Ok, my english is not the best.
> I can help documenting the whole lot, but starting with repli-sync and=20
> repli-update is a good idea, as I'll have to use them soon also, and=20
> have recently put an eye on them.
Ok, lets start with repli-update.
> Sadly, I'm not someone who makes things by itself, I always need a reason.
> The maintainers are good-willing, off course, but have other things to=20
> do right now, as I understood.
Ok, I hope, that there is at leat a bit more of dokumentation
afterwards, to make it easier for other people to work on or use
replicator.
> >What do you think the next step should be?
> We should contact each other and discuss (on IRC) about the code (I know=
=20
> it enough to reply to common questions).
I have never used IRC and I'm not shure if I will like it. I like using
a dictionarie wenn writing english texts and this slow down my
typespeed very much.
I, think we should do the following things next. (No matter, how we
communicate). I already started a bit.
--------------------------------------------------------------------
1) Write a short overview of how "repli-update" should work.
--------------------------------------------------------------------
1. root-filesystem without @slash_exclude
It replicates the root (/) filesystem except for what is mentioned in
@slash_exclude. If you use cfengine, replicator parses
/etc/cfengine/cfengine.conf and does not copy files handled by cfengine
copying facility.=20
2. /usr-directory without @usr_exclude
It replicates the /usr directory (not the filesystem) except for what
is mentioned in @usr_exclude. Be aware that it may cross filesytems to
acheive this.
3. /var structure and files mentioned in @var_include=20
It replicates the directories structure of /var (only directories, no
files). It replicates the contents of the /var subdirectories mentioned
in @var_include.
This meschanism should be the same, no matter if repli-update is called
from repli-install or repli-sync
--------------------------------------------------------------------
2) Write a list of the Param "repli-update" understands and what they
should do.
--------------------------------------------------------------------
Because the first replication is working for me with repli-install but
not with repli-sync, and repli-sync uses other params to call
repli-update then repli-install, maybe there is a fault.
Correct me if I'm wrong, please.
--model <masterdir>
Name of the Modell host, e.g. DNS-Name. No directory.
--destdir
Directorie-tree which content should be synchroniced with the model.
During repli-sync this should be "/"
--real
Sets the variable $dryrun to "", else ist is $dryrun=3D"--dry-run"
which is an option to rsync.
--dev
Sets the variable $withdev=3D1 (true). This adds the string "/dev" to
the list @slash_exclude bevor syncing the root-filesystem.
--nousr
Sets the variable $nousr=3D1 (true). (Default is 0 ?????). This
completly skips the replication of the /usr-directory.
--cfengine
Sets variable $cfengine=3D1 (true). Bevor the sync of / the config from
cfengine is copied from the model. Using the local cfengine all files
handled by this tool are extracted and added to the list @slash_exclude
--noboot
Sets $noboot=3D1 and skips a separately rsync for the /boot-directory.
This rsync-run is necessary if /boot is as usual a own partition,
because repli-update only syncs the root-filesystem, not the
directory. (/boot is in the default @slash_exclude list to.)
-e
Get the cfengine configuration from the model using ssh and scp
instead of rsh and rcp.
--exclude
Adds the argument to the @slash_exclude list.
--usr_exclude
Adds the armunet to the @usr_exclude list.
=20
--config
Additional reads the given file. Can be used to set additional
variables and override settings in /etc/replicator/replicator.conf,
which is alway loaded first by repli-common.
repli-install calls:
repli-update --config $confile $ssh_opt --dev $rupdate_dry $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 $conf=
ile @ARGV
$confile is "/etc/replicator/repli-sync" on the replicated host and
$model ist taken from that file.
Why these calls behave different ?
--------------------------------------------------------------------
3) Take a deeper look in the code of "repli-update" and understand
what is doing what.
--------------------------------------------------------------------
rsync is startet with different params during repli-update. I don't
understand some things, maybe because of my perl knowledge. Can you
help me ?
dosystem("rsync $rsyncopt ${model}::replicator/boot/ $destdir/boot/. 2>&1");
Clear.
$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$excludefile $=
{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"; } ?
my $usr_exclude =3D '';
foreach (@usr_exclude) { $usr_exclude .=3D " --exclude '- $_' "; } =20
dosystem("rsync $rsyncopt $usr_exclude ${model}::replicator/usr/. $destdir=
/usr/. 2>&1");
Interesting in how many different way a list can be passed to rsync. Is
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 line
can be?
$dryrun or -d "$destdir/var/." or mkdir "$destdir/var",0755 or die "cannot =
make $destdir/var";;
dosystem("rsync $rsyncopt --include '+ */' --exclude '- *' ${model}::repli=
cator/var/. $destdir/var/.");
foreach (@var_include) {
dosystem("rsync $rsyncopt ${model}::replicator/var/$_/ $destdir/var/$_ 2>&1=
");
}
For what is the "+" and the "-" sign in the [ei][xn]clude-rules? Is ist
perl-syntax or parsed by rsync?
What more?
--------------------------------------------------------------------
4) Correct "repli-update" and/or call it with other params
--------------------------------------------------------------------
- Do you have write access to the CVS-repository?
- 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.
=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.
=20
- More ideas ?
=20
=20
Enough for today.
What du you think about that?
Regards,
Bernd
|
|
From: Jerome W. <jwa...@bx...> - 2002-10-29 22:41:08
|
Before anything else, tell me which version you are currently using.
Bernd Harmsen wrote:
>Hello Jerome,
>
>On Sat, Oct 26, 2002 at 09:04:28PM +0200, Jerome Warnier wrote:
>
>
>>>At first I feel, that there is less concept or less (detailed)
>>>
>>>
>>You do not mean "less", but "not much".
>>
>>
>
>Ok, my english is not the best.
>
>
You don't have to apologize, I probably make other mistakes.
I just wanted you to know so that you learn something.
:-)
>>I can help documenting the whole lot, but starting with repli-sync and
>>repli-update is a good idea, as I'll have to use them soon also, and
>>have recently put an eye on them.
>>
>>
>
>Ok, lets start with repli-update.
>
>
Ok, as it is the next tool I'll have to use.
>>Sadly, I'm not someone who makes things by itself, I always need a reason.
>>The maintainers are good-willing, off course, but have other things to
>>do right now, as I understood.
>>
>>
>
>Ok, I hope, that there is at leat a bit more of dokumentation
>afterwards, to make it easier for other people to work on or use
>replicator.
>
>
Replicator is truly a cool tool, working surprisingly well... when you
are able to fix the big bugs you find in it.
Hopefully, we will fix those very soon.
>>>What do you think the next step should be?
>>>
>>>
>>We should contact each other and discuss (on IRC) about the code (I know
>>it enough to reply to common questions).
>>
>>
>
>I have never used IRC and I'm not shure if I will like it. I like using
>a dictionarie wenn writing english texts and this slow down my
>typespeed very much.
>
>
>
Well, let's forget it then.
>I, think we should do the following things next. (No matter, how we
>communicate). I already started a bit.
>
>--------------------------------------------------------------------
>1) Write a short overview of how "repli-update" should work.
>--------------------------------------------------------------------
>
>1. root-filesystem without @slash_exclude
>It replicates the root (/) filesystem except for what is mentioned in
>@slash_exclude. If you use cfengine, replicator parses
>/etc/cfengine/cfengine.conf and does not copy files handled by cfengine
>copying facility.
>
>2. /usr-directory without @usr_exclude
>It replicates the /usr directory (not the filesystem) except for what
>is mentioned in @usr_exclude. Be aware that it may cross filesytems to
>acheive this.
>
>3. /var structure and files mentioned in @var_include
>It replicates the directories structure of /var (only directories, no
>files). It replicates the contents of the /var subdirectories mentioned
>in @var_include.
>
>This meschanism should be the same, no matter if repli-update is called
>from repli-install or repli-sync
>
>
>--------------------------------------------------------------------
>2) Write a list of the Param "repli-update" understands and what they
>should do.
>--------------------------------------------------------------------
>
>Because the first replication is working for me with repli-install but
>not with repli-sync, and repli-sync uses other params to call
>repli-update then repli-install, maybe there is a fault.
>
>Correct me if I'm wrong, please.
>
>--model <masterdir>
> Name of the Modell host, e.g. DNS-Name. No directory.
>
>
Ok, but you can also use an ip address, I think.
>--destdir
> Directorie-tree which content should be synchroniced with the model.
> During repli-sync this should be "/"
>
>
Ok
>--real
> Sets the variable $dryrun to "", else ist is $dryrun="--dry-run"
> which is an option to rsync.
>
>--dev
> Sets the variable $withdev=1 (true). This adds the string "/dev" to
> the list @slash_exclude bevor syncing the root-filesystem.
>
>--nousr
> Sets the variable $nousr=1 (true). (Default is 0 ?????). This
> completly skips the replication of the /usr-directory.
>
>--cfengine
> Sets variable $cfengine=1 (true). Bevor the sync of / the config from
> cfengine is copied from the model. Using the local cfengine all files
> handled by this tool are extracted and added to the list @slash_exclude
>
>--noboot
> Sets $noboot=1 and skips a separately rsync for the /boot-directory.
> This rsync-run is necessary if /boot is as usual a own partition,
> because repli-update only syncs the root-filesystem, not the
> directory. (/boot is in the default @slash_exclude list to.)
>
>-e
> Get the cfengine configuration from the model using ssh and scp
> instead of rsh and rcp.
>
>--exclude
> Adds the argument to the @slash_exclude list.
>
>--usr_exclude
> Adds the armunet to the @usr_exclude list.
>
>--config
> Additional reads the given file. Can be used to set additional
> variables and override settings in /etc/replicator/replicator.conf,
> which is alway loaded first by repli-common.
>
>
>repli-install calls:
>repli-update --config $confile $ssh_opt --dev $rupdate_dry $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 $confile @ARGV
>$confile is "/etc/replicator/repli-sync" on the replicated host and
>$model ist taken from that file.
>
>Why these calls behave different ?
>
>
>--------------------------------------------------------------------
>3) Take a deeper look in the code of "repli-update" and understand
>what is doing what.
>--------------------------------------------------------------------
>
>rsync is startet with different params during repli-update. I don't
>understand some things, maybe because of my perl knowledge. Can you
>help me ?
>
>
>dosystem("rsync $rsyncopt ${model}::replicator/boot/ $destdir/boot/. 2>&1");
>Clear.
>
>
>$excludefile = "/tmp/excl.rsync.$$";
>$fh = new FileHandle $excludefile,"w" or die "opening exclude file:$!\n";;
>foreach (@slash_exclude) { print $fh "- $_\n"; }
>$fh->close;
>dosystem("rsync $rsyncopt --one-file-system --exclude-from=$excludefile ${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"; } ?
>
>
>my $usr_exclude = '';
>foreach (@usr_exclude) { $usr_exclude .= " --exclude '- $_' "; }
>dosystem("rsync $rsyncopt $usr_exclude ${model}::replicator/usr/. $destdir/usr/. 2>&1");
>
>Interesting in how many different way a list can be passed to rsync. Is
>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 line
>can be?
>
>
>$dryrun or -d "$destdir/var/." or mkdir "$destdir/var",0755 or die "cannot make $destdir/var";;
>dosystem("rsync $rsyncopt --include '+ */' --exclude '- *' ${model}::replicator/var/. $destdir/var/.");
>foreach (@var_include) {
>dosystem("rsync $rsyncopt ${model}::replicator/var/$_/ $destdir/var/$_ 2>&1");
>}
>
>For what is the "+" and the "-" sign in the [ei][xn]clude-rules? Is ist
>perl-syntax or parsed by rsync?
>
>
>What more?
>
>
>
>--------------------------------------------------------------------
>4) Correct "repli-update" and/or call it with other params
>--------------------------------------------------------------------
>
>- Do you have write access to the CVS-repository?
>
>
No, I don't, but we may ask, and I'll probably get it.
>- 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.
>- 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.
>
>- More ideas ?
>
>
Yes, a lot.
Sadly, I don't have access today to the machine were my replicator has
been modified. I cannot tell much more today, and probably this week.
>
>Enough for today.
>What du you think about that?
>
>
Tell me the exact version you are using before anything else.
>Regards,
>Bernd
>
>
|
|
From: Bernd H. <bj...@da...> - 2002-10-30 18:02:19
|
On Tue, Oct 29, 2002 at 11:40:20PM +0100, Jerome Warnier wrote:
> Before anything else, tell me which version you are currently using.
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.
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.
> >--------------------------------------------------------------------
> >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 ?
Can you explain the contents of the params during the call from
repli-install.
> >--------------------------------------------------------------------
> >3) Take a deeper look in the code of "repli-update" and understand
> >what is doing what.
> >--------------------------------------------------------------------
> >$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$excludefil=
e=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"; } ?
Can you explain this ?
> >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. Is
> >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 line
> >can be?
> >$dryrun or -d "$destdir/var/." or mkdir "$destdir/var",0755 or die "cann=
ot=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 ist
> >perl-syntax or parsed by rsync?
Can you enlight this ?
> >--------------------------------------------------------------------
> >4) Correct "repli-update" and/or call it with other params
> >--------------------------------------------------------------------
> >- 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.
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.
> >- 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.
Because /etc/replicator in the modell contains only the following files
I feel it is save to remove them from #slash_exclude
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
> >- 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.
I like to hear.
Regards,
Bernd
|
|
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...
|
|
From: Jerome W. <jwa...@bx...> - 2002-10-30 18:55:31
|
> > >>>>-------------------------------------------------------------------- >>>>4) Correct "repli-update" and/or call it with other params >>>>-------------------------------------------------------------------- >>>> >>>> > >I will correct repli-update : this is my first taskj after fixing the >woody package. > > You don't have to: I already did it. I have working Woody packages since june, working fine, but much tweaked. |
|
From: Jerome W. <jwa...@bx...> - 2002-10-31 08:11:19
|
Sebastien Chaumat wrote: >Le mer 30/10/2002 =E0 19:54, Jerome Warnier a =E9crit : > =20 > >>> =20 >>> >>>>>>-------------------------------------------------------------------= - >>>>>>4) Correct "repli-update" and/or call it with other params >>>>>>-------------------------------------------------------------------= - >>>>>> =20 >>>>>> >>>>>> =20 >>>>>> >>>I will correct repli-update : this is my first taskj after fixing the >>>woody package. >>>=20 >>> >>> =20 >>> >>You don't have to: I already did it. >>I have working Woody packages since june, working fine, but much tweake= d. >> >> =20 >> > >Send it :) > =20 > Arrrrgh!! I just realized my copy is on a laptop running far away from=20 any Internet connection till next Monday! What I've got corrected was the automatic generation of documentation=20 (or help), which didn't work at all. It was a mix between fixing and=20 disabling components. Other small fixes were in update_rules.defaults. I also updated the pci.lst to the last version in discover-data. I don't remember the other things, but if you wait until Monday, I'd=20 make a cvs diff. During this time, I suggest to document the items Bernd asked for. Sorry |
|
From: Bernd H. <bj...@da...> - 2002-10-31 14:08:11
Attachments:
replicator-cvs20021030-bernd.patch
|
Hello all,
On Wed, Oct 30, 2002 at 07:45:34PM +0100, Sebastien Chaumat wrote:
It's nice to read from you. Hope that you had a good holiday.
> > > >--------------------------------------------------------------------
> > > >3) Take a deeper look in the code of "repli-update" and understand
> > > >what is doing what.
> > > >--------------------------------------------------------------------
> >
> > > >$excludefile = "/tmp/excl.rsync.$$";
> > > >$fh = new FileHandle $excludefile,"w" or die "opening exclude file:$!\n";;
> > > >foreach (@slash_exclude) { print $fh "- $_\n"; }
> > > >$fh->close;
> > > >dosystem("rsync $rsyncopt --one-file-system --exclude-from=$excludefile
> > > >${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"; } ?
> sure: the "-" tell rsync to force exclusion of the file even if there is
> a wildcard to include it.
From the manpage of rsync (I have thought the - is perl syntax, before):
o if the pattern starts with "+ " (a plus followed by a space) then it is
always considered an include pattern, even if specified as part of an
exclude option. The "+ " part is discarded before matching.
o if the pattern starts with "- " (a minus followed by a space) then it is
always considered an exclude pattern, even if specified as part of an
include option. The "- " part is discarded before matching.
As I understand in an exclude-option you never need a "-" and in an
include-option you never need a "+". (But is does no harm) The exclude
and include options are parsed from the first to the last param and in
the e/i-lists from the first line to the last. The first patern match
is valid, no matter if there is a "+" or "-" sign.
> > > >--------------------------------------------------------------------
> > > >4) Correct "repli-update" and/or call it with other params
> > > >--------------------------------------------------------------------
> I will correct repli-update : this is my first taskj after fixing the
> woody package.
Because Jerome already fixed the woody package, I feel it is good to
wait for his patch and concentrate on repli-update in the meantime.
I will run some deeper tests this afternoon, to find out what files are
exclude during repli-sync and what files not. Do you think it is good
to do a new repli-install before or is it sufficient only to install
the new debian package (CVS from 30.10.2002) on model and target.
I you like that I run a spezial test, watch a spezial behavior or
include a spezial patch before, just write me.
After repli-update is working I think it is good to:
a) write some documentation (e.g. manpages, more clean installation
instructions)
b) implement some nice new features (e.g. the @change_hostname list).
Attached you find my "cvs diff" from today.
Regards,
Bernd
|
|
From: Sebastien C. <Seb...@en...> - 2002-10-31 21:15:28
|
Hi,
about your patch
The "-text2" is superseeded by the future -t$fs :)
(I though I did commit this... maybe it still on my hd)
The point is that repli-update need cleaning. I want to use standard
argument parser (as in repli-miniroot).
The folowing maybe interresting :
split replicator.deb in 3 :
replicator-miniroot-server : only repli-miniroot=20
replicator-model-server : only repli-bootdisk and something to get info
about the model (I guess maximum info about the model should be gathered
at replication time only via rsync)
replicator-target-syncer : repli-sync
I'm busy for the next 2 days (conferences :)
Le jeu 31/10/2002 =E0 15:07, Bernd Harmsen a =E9crit :
>=20
> Hello all,
>=20
> On Wed, Oct 30, 2002 at 07:45:34PM +0100, Sebastien Chaumat wrote:
> It's nice to read from you. Hope that you had a good holiday.
>=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 fi=
le:$!\n";;
> > > > >foreach (@slash_exclude) { print $fh "- $_\n"; }
> > > > >$fh->close; =20
> > > > >dosystem("rsync $rsyncopt --one-file-system --exclude-from=3D$excl=
udefile=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"; } ?
> > sure: the "-" tell rsync to force exclusion of the file even if there i=
s
> > a wildcard to include it.
>=20
> From the manpage of rsync (I have thought the - is perl syntax, before):
>=20
> o if the pattern starts with "+ " (a plus followed by a space) =
then it is
> always considered an include pattern, even if specified as pa=
rt of an
> exclude option. The "+ " part is discarded before matching.
>=20
> o if the pattern starts with "- " (a minus followed by a space) =
then it is
> always considered an exclude pattern, even if specified as pa=
rt of an
> include option. The "- " part is discarded before matching.
>=20
> As I understand in an exclude-option you never need a "-" and in an
> include-option you never need a "+". (But is does no harm) The exclude
> and include options are parsed from the first to the last param and in
> the e/i-lists from the first line to the last. The first patern match
> is valid, no matter if there is a "+" or "-" sign.
>=20
>=20
>=20
> > > > >------------------------------------------------------------------=
--
> > > > >4) Correct "repli-update" and/or call it with other params
> > > > >------------------------------------------------------------------=
--
> > I will correct repli-update : this is my first taskj after fixing the
> > woody package.
>=20
> Because Jerome already fixed the woody package, I feel it is good to
> wait for his patch and concentrate on repli-update in the meantime.
>=20
> I will run some deeper tests this afternoon, to find out what files are
> exclude during repli-sync and what files not. Do you think it is good
> to do a new repli-install before or is it sufficient only to install
> the new debian package (CVS from 30.10.2002) on model and target.
>=20
> I you like that I run a spezial test, watch a spezial behavior or
> include a spezial patch before, just write me.
>=20
Can you check, in documentations, if "mkfs -t fs" works whatever fs is?
I mean is there any filesysteme that do not follow the "mkfs -t"
convention.=20
Thanks for you interrest in this project
SEb
> After repli-update is working I think it is good to:
> a) write some documentation (e.g. manpages, more clean installation
> instructions)=20
> b) implement some nice new features (e.g. the @change_hostname list).
>=20
> Attached you find my "cvs diff" from today.
>=20
>=20
> Regards,
> Bernd
> ----
>=20
> ? Replicator-UserGuide.ps
> ? build-stamp
> ? debian/tmp
> Index: Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/Makefile,v
> retrieving revision 1.35
> diff -u -r1.35 Makefile
> --- Makefile 7 Aug 2002 10:37:56 -0000 1.35
> +++ Makefile 31 Oct 2002 13:09:30 -0000
> @@ -1,4 +1,4 @@
> -DESTDIR=3D
> +DESTDIR=3D./debian/tmp/
> VERSION=3D2.1.0
> CFLAGS=3D-O
> INSTALL=3Dinstall -o root -g root
> @@ -15,7 +15,7 @@
> #pci.lst
> MINIROOT-FILES-DEST=3D$(DESTDIR)/usr/share/replicator
> =20
> -DOC=3Dreplicator.conf.example repli-postinst.example\
> +DOC=3Dreplicator.conf.example examples/repli-postinst.example\
> Replicator-UserGuide.ps\
> Replicator-UserGuide.tex copyright TODO=20
> #repli-postinst.diskless.example=20
> Index: repli-install
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/repli-install,v
> retrieving revision 1.81
> diff -u -r1.81 repli-install
> --- repli-install 1 Oct 2002 06:18:47 -0000 1.81
> +++ repli-install 31 Oct 2002 13:09:31 -0000
> @@ -402,7 +402,7 @@
> if (!$firstpart or $firstpart ne $p) {
> print STDERR "mkpath:/target\n";
> $dryrun or mkpath(["/target"],1,0755);
> - dodryrun('mount',$p->[$PDEVICE],"/target");
> + dodryrun("mount -text2 $p->[$PDEVICE] /target");
> }
> }
> }
> @@ -413,7 +413,7 @@
> print STDERR "mkpath:$dir\n";
> $dryrun or mkpath([$dir],1,0755);
> if (!$firstpart or $firstpart ne $p) {
> - dodryrun('mount',$p->[$PDEVICE],$dir);
> + dodryrun("mount -text2 $p->[$PDEVICE] $dir");
> }
> }
> }
> Index: update_rules.default
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/update_rules.default,v
> retrieving revision 1.17
> diff -u -r1.17 update_rules.default
> --- update_rules.default 14 Jun 2002 16:14:12 -0000 1.17
> +++ update_rules.default 31 Oct 2002 13:09:31 -0000
> @@ -19,7 +19,6 @@
> /etc/isapnp.conf
> /etc/minirc*
> /etc/gpm.conf
> -/etc/replicator*
> /etc/fstab
> /etc/lilo.conf
> /etc/hostname
> Index: debian/changelog
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/debian/changelog,v
> retrieving revision 1.9
> diff -u -r1.9 changelog
> --- debian/changelog 14 Jun 2002 16:14:12 -0000 1.9
> +++ debian/changelog 31 Oct 2002 13:09:31 -0000
> @@ -1,3 +1,16 @@
> +replicator (3.0-cvs20021030) unstable; urgency=3Dlow
> +
> + * Add updates from CVS
> +
> + -- Bernd Harmsen <bj...@da...> Wed, 30 Oct 2002 18:12:43 +0100
> +
> +replicator (3.0-cvs20020820) unstable; urgency=3Dlow
> +
> + * Compiled from CVS.
> + * Add -text2 to mount options in repli-install
> +
> + -- Bernd Harmsen <bj...@da...> Wed, 30 Oct 2002 18:11:52 +0100
> +
> replicator (3.0) unstable; urgency=3Dlow
> =20
> * woody compliance improved
> Index: debian/control
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/debian/control,v
> retrieving revision 1.11
> diff -u -r1.11 control
> --- debian/control 14 Jun 2002 16:14:12 -0000 1.11
> +++ debian/control 31 Oct 2002 13:09:31 -0000
> @@ -7,7 +7,7 @@
> =20
> Package: replicator
> Architecture: i386
> -Depends: rsync (>=3D 2.3.2), ${perl:Depends}, wget, dialog, nfs-server, =
grub, debootstrap (>=3D 0.1.16.3)
> +Depends: rsync (>=3D 2.3.2), ${perl:Depends}, wget, dialog, nfs-server, =
grub, debootstrap (>=3D 0.1.16.3), binutils
> Description: automate new computer installations in a networked site.
> Using a nfs-root filesystem and rsync, replicator allow=20
> you to non-interactively install a target computer=20
> Index: debian/files
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/debian/files,v
> retrieving revision 1.1
> diff -u -r1.1 files
> --- debian/files 20 Feb 2001 20:25:28 -0000 1.1
> +++ debian/files 31 Oct 2002 13:09:31 -0000
> @@ -1 +1 @@
> -replicator_2.0.1_i386.deb admin optional
> +replicator_3.0-cvs20021030_i386.deb admin optional
> Index: debian/postinst.debhelper
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/debian/postinst.debhelper,v
> retrieving revision 1.2
> diff -u -r1.2 postinst.debhelper
> --- debian/postinst.debhelper 17 May 2001 13:45:18 -0000 1.2
> +++ debian/postinst.debhelper 31 Oct 2002 13:09:31 -0000
> @@ -6,7 +6,7 @@
> fi
> # End automatically added section
> # Automatically added by dh_installdocs
> -if command -v install-docs >/dev/null 2>&1; then
> +if [ "$1" =3D configure ] && command -v install-docs >/dev/null 2>&1; th=
en
> install-docs -i /usr/share/doc-base/replicator
> fi
> # End automatically added section
> Index: debian/prerm.debhelper
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/debian/prerm.debhelper,v
> retrieving revision 1.2
> diff -u -r1.2 prerm.debhelper
> --- debian/prerm.debhelper 17 May 2001 13:45:18 -0000 1.2
> +++ debian/prerm.debhelper 31 Oct 2002 13:09:31 -0000
> @@ -4,7 +4,8 @@
> fi
> # End automatically added section
> # Automatically added by dh_installdocs
> -if command -v install-docs >/dev/null 2>&1; then
> +if [ "$1" =3D remove -o "$1" =3D upgrade ] && \
> + command -v install-docs >/dev/null 2>&1; then
> install-docs -r replicator
> fi
> # End automatically added section
> Index: debian/substvars
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/replicator/replicator/debian/substvars,v
> retrieving revision 1.2
> diff -u -r1.2 substvars
> --- debian/substvars 17 May 2001 13:45:18 -0000 1.2
> +++ debian/substvars 31 Oct 2002 13:09:31 -0000
> @@ -1 +1 @@
> -perl:Depends=3Dperl5
> +perl:Depends=3Dperl
--=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...
|
|
From: Bernd H. <bj...@da...> - 2002-11-04 12:23:18
Attachments:
How-to-use-repli-sync.pdf
How-to-use-repli-sync.lyx
|
Hello,
first of all, I should apologize. In the repli-sync test I report on
Fri, 25 Oct 2002, I forget the --real param. After working around some
bugs I have simply forgotten it.
To prevent this in futur and to help others using repli-sync I write a
small howto. You find it attached in the formats PDF and LyX.
At the End of this document you find a list of bugs I found and a list
of proposals for the futur of replicator. The howto must be corrected
after fixing the mentioned bugs, but then I like it t be included in
replicator.
What do you think about that?
On Thu, Oct 31, 2002 at 10:15:16PM +0100, Sebastien Chaumat wrote:
> The "-text2" is superseeded by the future -t$fs :)
> (I though I did commit this... maybe it still on my hd)
> Can you check, in documentations, if "mkfs -t fs" works whatever fs is?
> I mean is there any filesysteme that do not follow the "mkfs -t"
> convention.
Looking in the manpage I see that the following types are supportet:
-t vfstype
The argument following the -t is used to indicate the file system type.
The file system types which are currently supported are: adfs, affs, aut
ofs, coda, cramfs, devpts, efs, ext2, ext3, hfs, hpfs,
iso9660, jfs, minix, msdos, ncpfs, nfs, ntfs, proc, qnx4, reiserfs, romfs,
smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xfs.
I had some problems with the "autofs" type in the past. Sometimes (on
floppies) the filesystem was not correctly detected. I think you should
not use this option.
> The point is that repli-update need cleaning. I want to use standard
> argument parser (as in repli-miniroot).
Is this important enough to delay the first release for woody or can it
wait for the relase after that.
> The folowing maybe interresting :
>
> split replicator.deb in 3 :
>
> replicator-miniroot-server : only repli-miniroot
> replicator-model-server : only repli-bootdisk and something to get info
> about the model (I guess maximum info about the model should be gathered
> at replication time only via rsync)
> replicator-target-syncer : repli-sync
I do not understand what the goal of this is. Replicator is a small
tool and it does no harm, I think, to have all tools present on all
hosts. Nevertheless this makes it nessesary to prevent
"replicator-*-server" from beeing synchronized to the targets.
I feel, this is less important extra work, but maybe you can explain it
a bit.
What do you think are the things, that should be done for the first
woody release and what do you plan after this?
My proposal is:
1.) Make a list of the known bugs. (e.g. the ones listed in my
attachment and in the buglist on sourceforge.
2.) Fix this bugs.
3.) Update documentation.
I can provide an (update) howto for the first replication
(repli-install) and repli-sync.
4.) Release replicator for woody.
5.) Collecting wishes for the next release.
What do you think about this? I like to help on all points.
Regards,
Bernd
|
|
From: Bernd H. <bj...@da...> - 2002-11-05 11:23:10
|
Hi, On Mon, Nov 04, 2002 at 09:57:54PM +0100, Sebastien Chaumat wrote: > To be precise : I fix bugs, add $fs, fix doc, upload woody package. > Then I start cleaning repli-update and add new functionnality. > I start tommorow (I'm still in vacation :). Please commit to CVS frequently. I like to have a look and test it. Have you get the patch for the woody-packaging from Jerome ? > > My proposal is: > >=20 > > 1.) Make a list of the known bugs. (e.g. the ones listed in my > > attachment and in the buglist on sourceforge. > > 2.) Fix this bugs. > > 3.) Update documentation. > > I can provide an (update) howto for the first replication > > (repli-install) and repli-sync. >=20 > Yep send it! The Howto for repli-sync is what you get with my last mail. I update it after the known bugs are fixed. The Howto for repli-install can be a rewrite of chapter 4 of your Replicator-UserGuide.tex. Whats up with the source format of the documentation. I like to write docs with LyX. Are you using another tool that directly reads/writes LaTeX ? I see the following possibilities. a) I rewrite all docs using LyX and we put the lyx-file in CVS and the debian source package. The debian/rules can than build the docs using e.g.: lyx -x buffer-open Source-File.lyx -e ps But then we Build-Depends on LyX and some additional tools. b) I rewrite all docs using LyX and we put the lyx-file and a manually=20 generated LaTex-file in CVS. The package-building scripts will only use the LaTeX-file but all changes go to the LyX-file. =20 c) You tell my which tools you use to write the last docs and I have a look if it is to much work to learn it. (I do not want to learn LaTeX, except a few single commands) What do you think? > > 4.) Release replicator for woody. > > 5.) Collecting wishes for the next release. > > What do you think about this? I like to help on all points. > Great. The bug list will help me a lot. Do you use IRC? I have zero experience in IRC. I can try it if it is important, but because of my slow english typespeed and full diary I feel I like e-mail more. I can write it when I have time and you can read it when you have time. Should we keep discussing on replicator-user, create a replicator-devel or simply CC all interested persons (you, Jerome and me?) I prefer replicator-devel. Regards, Bernd |
|
From: Sebastien C. <Seb...@en...> - 2002-10-31 11:58:43
|
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.
> > >
ouch..I feel a mistake here...
I'll check that=20
> > >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
>=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
>=20
>=20
> > >--------------------------------------------------------------------
> > >4) Correct "repli-update" and/or call it with other params
> > >--------------------------------------------------------------------
>=20
> > >- 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
> 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...
|
|
From: Sebastien C. <Seb...@en...> - 2002-10-30 18:15:05
|
Hi all, I'm back from vacations (my phd is over :)) So lets go for replicator. I have a talk about debian in 2 days so I'm still a bit busy but replicator is now on top of my todo list. Lets Rock! SEb Le sam 26/10/2002 =E0 21:04, Jerome Warnier a =E9crit : > Bernd Harmsen wrote: >=20 > >Hello Jerome, > > > >On Fri, Oct 25, 2002 at 08:37:49PM +0200, Jerome Warnier wrote: > > =20 > > > >>>This mail describes how I try to get repli-sync working. At the end > >>>there are some new files an the model (bilbo) missing on the replicat > >>>(frodo). > >>>It would be nice if you can give me a hint, how I get the hosts > >>>completly synchronizes with repli-sync. If you need some additional > >>>information or if I can do some tests I like to do it. > >>> > >>> =20 > >>> > >>I have the exact same problem, and I am going to fix it some near day. > >>Do you have *any* knowledge about Perl? > >> =20 > >> > > > >I have *very* less perl knowledge but good programming experience in > >some other languages. I like to help. > > =20 > > > ;-) >=20 > >At first I feel, that there is less concept or less (detailed) > >dokumentation. (What are the function of the different skripts of > >replicator). > > =20 > > > You do not mean "less", but "not much". >=20 > >First I think it is important to fully understand the function of > >repli-update. > > > >What do you think about writing some dokumentation, as preparation for > >programming an fixing error? Are one of the Maintainers willing to to > >help on this, answer questions ? > > =20 > > > I can help documenting the whole lot, but starting with repli-sync and=20 > repli-update is a good idea, as I'll have to use them soon also, and=20 > have recently put an eye on them. > Sadly, I'm not someone who makes things by itself, I always need a reason= . > The maintainers are good-willing, off course, but have other things to=20 > do right now, as I understood. >=20 > >What do you think the next step should be? > > =20 > > > We should contact each other and discuss (on IRC) about the code (I know=20 > it enough to reply to common questions). >=20 > >Regards, > >Bernd > > =20 > > >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: ApacheCon, November 18-21 in > Las Vegas (supported by COMDEX), the only Apache event to be > fully supported by the ASF. http://www.apachecon.com > _______________________________________________ > Replicator-users mailing list > Rep...@li... > https://lists.sourceforge.net/lists/listinfo/replicator-users --=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... |