Mirror SVN Repository [Write-through proxying]

2014-06-11 Thread Mustafa Karci
Dear all,

I have doing some test with svn mirror. The idee is to have a mirror that
would only get his read from his local svn. And the writing is done to the
master.

So
http://stackoverflow.com/questions/2286586/mirror-svn-repository-write-through-proxying
started with this.

Have a master svn " svnmaster/svn/master"

*config MASTER: *
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so


DocumentRoot /var/www/svn



DAV svn
SVNParentPath /var/www/svn
  AuthType Basic
  AuthName "IPCO repositories"
  AuthUserFile /var/www/svn/etc/passwdfile
  Require valid-user



And a slave svn " svnslave/svn/slave"

*config SLAVE:*
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so


DocumentRoot /var/www/svn



   DAV svn
   SVNParentPath /var/www/svn
   SVNMasterURI http://svnmaster/svn/master   <-- added the master svn
  AuthType Basic
  AuthName "IPCO Mirror"
  AuthUserFile /var/www/svn/etc/passwdfile
  Require valid-user


I created on both master as slave a new repro

* * svnadmin create master {slave}*


** chown -R apache.apache master / slave*
When i try to initialize from the master the next error accour
*svnsync initialize http://svnmirror/svn/slave 
file://var/www/svn/ (http://svnmaster/svn/master
)*

*Error:*
svnsync: DAV request failed; it's possible that the repository's
pre-revprop-change hook either failed or is non-existent
svnsync: At least one property change failed; repository is unchanged
svnsync: Could not open the requested SVN filesystem

On my slave svn i have pre-revprop-change. For testing im doing a exit 0 so
that every thing is allowed. and made it executable chmod +x ...


Also i tried the standaard config pre.revprop.change with no luck
Also tried the example given in the official document. With no luck

and this is the /var/log/http/errror_log
[Thu Jun 05 17:01:52 2014] [error] [client 10.254.128.216] user root not
found: /svn/slave
[Thu Jun 05 17:01:56 2014] [debug] proxy_util.c(1540): [client
xxx.xxx.xxx.xxx] proxy: *: found reverse proxy worker for
http://svnmaster/svn/slave/!svn/bln/0
[Thu Jun 05 17:01:56 2014] [debug] mod_proxy.c(1020): Running scheme http
handler (attempt 0)
[Thu Jun 05 17:01:56 2014] [debug] mod_proxy_http.c(1962): proxy: HTTP:
serving URL http://svnmaster/svn/slave/!svn/bln/0
[Thu Jun 05 17:01:56 2014] [debug] proxy_util.c(2026): proxy: HTTP: has
acquired connection for (*)
[Thu Jun 05 17:01:56 2014] [debug] proxy_util.c(2082): proxy: connecting
http://svnmaster/svn/slave/!svn/bln/0 to svnmaster:80
[Thu Jun 05 17:01:56 2014] [debug] proxy_util.c(2209): proxy: connected
/svn/slave/!svn/bln/0 to svnmaster:80
[Thu Jun 05 17:01:56 2014] [debug] proxy_util.c(2460): proxy: HTTP: fam 2
socket created to connect to *
[Thu Jun 05 17:01:56 2014] [debug] proxy_util.c(2592): proxy: HTTP:
connection complete to 10.254.128.216:80 (svnmaster)
[Thu Jun 05 17:01:56 2014] [debug] mod_proxy_http.c(1732): proxy: start
body send
[Thu Jun 05 17:01:56 2014] [debug] mod_proxy_http.c(1836): proxy: end body
send
[Thu Jun 05 17:01:56 2014] [debug] proxy_util.c(2044): proxy: HTTP: has
released connection for (*)

So the connection is astablished.

error svnmaster
[error] [client svnmaster] Could not open the requested SVN filesystem
[500, #2]

So what im i doing wrong. Is it the location that is incorrect or is de
/svn/slave/hooks/pre-revprop-change misconfigurated?

/var/log/http/svn_log
This is the logging *without* the option SVNMasterURI
http://svnmaster/svn/master/
[10/Jun/2014:12:24:46 +0200] mkarci change-rev-prop r0 svn:sync-from-url
[10/Jun/2014:12:24:46 +0200] mkarci change-rev-prop r0 svn:sync-from-uuid
[10/Jun/2014:12:24:46 +0200] mkarci change-rev-prop r0
svn:sync-last-merged-rev
[10/Jun/2014:12:24:46 +0200] mkarci change-rev-prop r0 svn:date

And with the option SVNMasterURI http://svnmaster/svn/master/  enabled i
can not init the svn folder.

[10/Jun/2014:15:37:25 +0200] mkarci rev-proplist r0
[10/Jun/2014:15:47:06 +0200] mkarci rev-proplist r0
[10/Jun/2014:16:14:28 +0200] mkarci rev-proplist r0
[10/Jun/2014:16:14:53 +0200] mkarci rev-proplist r0

kind regards

-- 
Mustafa Karci

The IP Company
Kruisweg 609-619
2132 NB  Hoofddorp
The Netherlands

Web: www.theipcompany.nl
Tel: 085 1119111
Direct: 085 1119158


Re: Mirror SVN Repository [Write-through proxying]

2014-06-11 Thread Gert Kello
> And a slave svn " svnslave/svn/slave"
>
> config SLAVE:
> LoadModule dav_svn_module modules/mod_dav_svn.so
> LoadModule authz_svn_module   modules/mod_authz_svn.so
>
> 
> DocumentRoot /var/www/svn
> 
>
> 
>DAV svn
>SVNParentPath /var/www/svn
>SVNMasterURI http://svnmaster/svn/master   <-- added the master svn
>   AuthType Basic
>   AuthName "IPCO Mirror"
>   AuthUserFile /var/www/svn/etc/passwdfile
>   Require valid-user
> 

AFAIK You need one additional svn location at mirror that does not
have "SVNMasterUri". If You try to use this location the sync will be
redirected back to master server.
See the  part in
http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy

Gert