csync2 broken, how to keep a few web servers in sync?

Тарас Савчук taras at 1adm.ru
Fri Sep 11 10:23:40 UTC 2009


Mitsuru, sorry for late answer.

I tested csync2 build with your path - all are OK! :)

--- Some test data ---

Two machines:

carp1: Intel Xeon 1.6Ghz QuadCore/3Gb RAM/7200RPM SATA/FreeBSD 7.2/amd64
carp2: AMD Athlon 64 Processor 3000+/1Gb RAM/7200RPM SATA/FreeBSD 7.2/amd64
PCs are connected with 100Mbit network.

Config file:

carp1#cat /usr/local/etc/csync.cfg
group mygroup
{
        host carp1.domain.tld carp2.domain.tld;

        key /usr/local/etc/csync2/csync2.key;

        include /usr/local/www;
        exclude *~;

        backup-directory /usr/backups/csync2;
        backup-generations 3;

        auto younger;
}

After clean install I added copied /usr/src to carp1 and run csync2 -x:

carp1# date; csync2 -x; date
Fri Sep 11 13:45:51 MSD 2009
Fri Sep 11 13:55:27 MSD 2009
carp1# du -h -d 0 /usr/local/www/
494M    /usr/local/www/
carp1# find /usr/local/www | wc -l
   43634
carp1#

Result: about 10 minutes to sync (~40000 files 500Mb in size)

Next I run csync2 -x on carp2:

carp2# date; csync2 -x; date
Fri Sep 11 13:59:30 MSD 2009
Fri Sep 11 13:59:43 MSD 2009
carp2#

Result: about 13 seconds to update db.

Next I added GLPI sources to carp1 and run csync2 -x again:

carp1# du -h -d 1 /usr/local/www
494M    /usr/local/www/src
 13M    /usr/local/www/glpi
508M    /usr/local/www
carp1# find /usr/local/www/glpi | wc -l
    1442
carp1# date; csync2 -x; date
Fri Sep 11 14:01:35 MSD 2009
Fri Sep 11 14:01:57 MSD 2009
carp1# date; csync2 -x; date
Fri Sep 11 14:02:26 MSD 2009
Fri Sep 11 14:02:32 MSD 2009
carp1#

Result: 22 seconds to sync anoter 1400 files 13M in size.

Not bad results :).
Another tip: generated certificates like described in http://oss.linbit.com/csync2/paper.pdf are not working (Pipe broken error), but generating from source (cd /usr/ports/net/csync2/work/csync2-1.34 && make cert) works well.

Mitsuru, do you have Western Union in Japan? I need your name & city to transfer a little financial thank you.

--
Savchuk Taras

-----Original Message-----
From: owner-freebsd-ports at freebsd.org [mailto:owner-freebsd-ports at freebsd.org] On Behalf Of mitsuru at zebu.riken.go.jp
Sent: Thursday, September 03, 2009 9:54 AM
To: freebsd-ports at freebsd.org
Subject: Re: csync2 broken, how to keep a few web servers in sync?

> Who interested in repair net/csync2 port, possibly for some amount of financial gratitude ;-)
 I've made a patch and compiled it, though I've not tested if it works.

--
Mitsuru



diff -ruN csync2.org/Makefile csync2/Makefile
--- csync2.org/Makefile	2009-09-03 14:39:39.000000000 +0900
+++ csync2/Makefile	2009-09-03 14:40:09.000000000 +0900
@@ -24,12 +24,11 @@
 
 MAN1=	csync2.1
 
-BROKEN=		does not compile with new gnuTLS
-
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/etc
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include"
 CONFIGURE_ENV+=	LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ENV+=	LIBGNUTLS_CONFIG="${LOCALBASE}/bin/pkg-config gnutls"
 
 PLIST_FILES=	etc/csync2.cfg-dist \
 		sbin/csync2 \
diff -ruN csync2.org/files/patch-configure csync2/files/patch-configure
--- csync2.org/files/patch-configure	1970-01-01 09:00:00.000000000 +0900
+++ csync2/files/patch-configure	2009-09-03 14:23:51.000000000 +0900
@@ -0,0 +1,11 @@
+--- configure.org	2009-09-03 14:22:32.000000000 +0900
++++ configure	2009-09-03 14:23:02.000000000 +0900
+@@ -3836,7 +3836,7 @@
+   else
+     LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags`
+     LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs`
+-    libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version`
++    libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --modversion`
+ 
+ 
+       ac_save_CFLAGS="$CFLAGS"


_______________________________________________
freebsd-ports at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"


More information about the freebsd-ports mailing list