You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mustafa Karci <mk...@theipcompany.nl> on 2015/05/15 12:10:14 UTC

SVN write through proxy out off sync

Today ore svn mirrror got out off sync. The setup is as the headline
describes. We have setup a mirror that does only read actions and write
actions are committed to the master SVN server.

So on the mirror we have in the /etc/http/conf.d/mirror.conf file. this has
2 locations created. The private branch that redirects all writes to the
master "SVNMasterURI" and a second Where the sync from master is send to.

And yes, all hook scrip are executable. So the problem is : Some in 6
mounts the mirror would got out off sync because the locking mechanism was
in please. So normally We would do a

svn propdel --revprop -r0 svn:sync-lock http://mirror/svn-proxy-sync
svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private

But now doing a svnsync sync http://mirror/svn-proxyn-sync
file:///home/master/svn/private
we get an error messages like :

 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: Error setting property 'sync-lock':
 Can't find a temporary directory: Internal error

here are the config file:

master SVN

 <Location /svn/master >
  DAV svn
  SVNListParentPath Off
  SVNPath /home/master/svn/private
  #SVNParentPath /var/www/svn
  AuthType Basic
  AuthName "BLA BLA"
  AuthUserFile /home/master/svn/etc/htpasswd
  AuthzSVNAccessFile /home/master/svn/etc/private.access
  Require valid-user
 </Location>

Mirror write through proxy

 <Location /svn/mirror >
   DAV svn
   SVNListParentPath Off
   SVNPath /home/mirror/svn/private
   SVNMasterURI http://svnmaster/svn/master
   #SVNParentPath /var/www/svn
   AuthType Basic
   AuthName "BLA BLA BAL"
   AuthUserFile /home/mirror/svn/etc/htpasswd
   AuthzSVNAccessFile /home/mirror/svn/etc/private.access
   Require valid-user
 </Location>
<Location /svn-proxy-sync >
   DAV svn
   SVNListParentPath Off
   SVNPath /home/mirror/svn/private
   Order deny,allow
   Deny from all
   Allow from xxx.xxx.xxx.xxx</Location>

Also when we tried to do a

svnsync init commando we are getting the same output


-- 
Mustafa Karci


The IP Company
Kruisweg 609
2132 NB  Hoofddorp
The Netherlands

Website: www.theipcompany.nl
Phone number: 085 1119158
Direct phone number: 085 1119158

Re: SVN write through proxy out off sync

Posted by Mustafa Karci <mk...@theipcompany.nl>.
Well, the problem seems to be the logg. In de svn i had enabled logg. So
the /var/log/http was around 7gb. This is makes no sence because we still
had more than 20gb of free disk space. So disabled log and removing all
files in the http,  this seems to do the job.

And the question do we monitoring. Is yes and we also running a script that
will watch the revision diferance between master and mirror. And do a sync
when the 2 are out off sync. Wel the script does more than that. Timeout
prefention. Delay to do a sync, and so on.

Op 15 mei 2015 19:22 schreef "Eric Johnson" <er...@tibco.com>:

> Looks to me like the sync failed at one point, and there's a pending lock
> on the mirror repository. Remove the lock and try the sync again.
>
> On Fri, May 15, 2015 at 3:10 AM, Mustafa Karci <mk...@theipcompany.nl> wrote:
>
>> Today ore svn mirrror got out off sync. The setup is as the headline
>> describes. We have setup a mirror that does only read actions and write
>> actions are committed to the master SVN server.
>>
>> So on the mirror we have in the /etc/http/conf.d/mirror.conf file. this
>> has 2 locations created. The private branch that redirects all writes to
>> the master "SVNMasterURI" and a second Where the sync from master is send
>> to.
>>
>> And yes, all hook scrip are executable. So the problem is : Some in 6
>> mounts the mirror would got out off sync because the locking mechanism was
>> in please. So normally We would do a
>>
>> svn propdel --revprop -r0 svn:sync-lock http://mirror/svn-proxy-sync
>> svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
>>
>> But now doing a svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
>> we get an error messages like :
>>
>>  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: Error setting property 'sync-lock':
>>  Can't find a temporary directory: Internal error
>>
>> here are the config file:
>>
>> master SVN
>>
>>  <Location /svn/master >
>>   DAV svn
>>   SVNListParentPath Off
>>   SVNPath /home/master/svn/private
>>   #SVNParentPath /var/www/svn
>>   AuthType Basic
>>   AuthName "BLA BLA"
>>   AuthUserFile /home/master/svn/etc/htpasswd
>>   AuthzSVNAccessFile /home/master/svn/etc/private.access
>>   Require valid-user
>>  </Location>
>>
>> Mirror write through proxy
>>
>>  <Location /svn/mirror >
>>    DAV svn
>>    SVNListParentPath Off
>>    SVNPath /home/mirror/svn/private
>>    SVNMasterURI http://svnmaster/svn/master
>>    #SVNParentPath /var/www/svn
>>    AuthType Basic
>>    AuthName "BLA BLA BAL"
>>    AuthUserFile /home/mirror/svn/etc/htpasswd
>>    AuthzSVNAccessFile /home/mirror/svn/etc/private.access
>>    Require valid-user
>>  </Location>
>> <Location /svn-proxy-sync >
>>    DAV svn
>>    SVNListParentPath Off
>>    SVNPath /home/mirror/svn/private
>>    Order deny,allow
>>    Deny from all
>>    Allow from xxx.xxx.xxx.xxx</Location>
>>
>> Also when we tried to do a
>>
>> svnsync init commando we are getting the same output
>>
>>
>> --
>> Mustafa Karci
>>
>>
>> The IP Company
>> Kruisweg 609
>> 2132 NB  Hoofddorp
>> The Netherlands
>>
>> Website: www.theipcompany.nl
>> Phone number: 085 1119158
>> Direct phone number: 085 1119158
>>
>
>

Re: SVN write through proxy out off sync

Posted by Mustafa Karci <mk...@theipcompany.nl>.
Well, the problem seems to be the logg. In de svn i had enabled logg. So
the /var/log/http was around 7gb. This is makes no sence because we still
had more than 20gb of free disk space. So disabled log and removing all
files in the http,  this seems to do the job.

And the question do we monitoring. Is yes and we also running a script that
will watch the revision diferance between master and mirror. And do a sync
when the 2 are out off sync. Wel the script does more than that. Timeout
prefention. Delay to do a sync, and so on.

Op 15 mei 2015 19:22 schreef "Eric Johnson" <er...@tibco.com>:

> Looks to me like the sync failed at one point, and there's a pending lock
> on the mirror repository. Remove the lock and try the sync again.
>
> On Fri, May 15, 2015 at 3:10 AM, Mustafa Karci <mk...@theipcompany.nl> wrote:
>
>> Today ore svn mirrror got out off sync. The setup is as the headline
>> describes. We have setup a mirror that does only read actions and write
>> actions are committed to the master SVN server.
>>
>> So on the mirror we have in the /etc/http/conf.d/mirror.conf file. this
>> has 2 locations created. The private branch that redirects all writes to
>> the master "SVNMasterURI" and a second Where the sync from master is send
>> to.
>>
>> And yes, all hook scrip are executable. So the problem is : Some in 6
>> mounts the mirror would got out off sync because the locking mechanism was
>> in please. So normally We would do a
>>
>> svn propdel --revprop -r0 svn:sync-lock http://mirror/svn-proxy-sync
>> svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
>>
>> But now doing a svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
>> we get an error messages like :
>>
>>  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: Error setting property 'sync-lock':
>>  Can't find a temporary directory: Internal error
>>
>> here are the config file:
>>
>> master SVN
>>
>>  <Location /svn/master >
>>   DAV svn
>>   SVNListParentPath Off
>>   SVNPath /home/master/svn/private
>>   #SVNParentPath /var/www/svn
>>   AuthType Basic
>>   AuthName "BLA BLA"
>>   AuthUserFile /home/master/svn/etc/htpasswd
>>   AuthzSVNAccessFile /home/master/svn/etc/private.access
>>   Require valid-user
>>  </Location>
>>
>> Mirror write through proxy
>>
>>  <Location /svn/mirror >
>>    DAV svn
>>    SVNListParentPath Off
>>    SVNPath /home/mirror/svn/private
>>    SVNMasterURI http://svnmaster/svn/master
>>    #SVNParentPath /var/www/svn
>>    AuthType Basic
>>    AuthName "BLA BLA BAL"
>>    AuthUserFile /home/mirror/svn/etc/htpasswd
>>    AuthzSVNAccessFile /home/mirror/svn/etc/private.access
>>    Require valid-user
>>  </Location>
>> <Location /svn-proxy-sync >
>>    DAV svn
>>    SVNListParentPath Off
>>    SVNPath /home/mirror/svn/private
>>    Order deny,allow
>>    Deny from all
>>    Allow from xxx.xxx.xxx.xxx</Location>
>>
>> Also when we tried to do a
>>
>> svnsync init commando we are getting the same output
>>
>>
>> --
>> Mustafa Karci
>>
>>
>> The IP Company
>> Kruisweg 609
>> 2132 NB  Hoofddorp
>> The Netherlands
>>
>> Website: www.theipcompany.nl
>> Phone number: 085 1119158
>> Direct phone number: 085 1119158
>>
>
>

Re: SVN write through proxy out off sync

Posted by Eric Johnson <er...@tibco.com>.
Looks to me like the sync failed at one point, and there's a pending lock
on the mirror repository. Remove the lock and try the sync again.

On Fri, May 15, 2015 at 3:10 AM, Mustafa Karci <mk...@theipcompany.nl> wrote:

> Today ore svn mirrror got out off sync. The setup is as the headline
> describes. We have setup a mirror that does only read actions and write
> actions are committed to the master SVN server.
>
> So on the mirror we have in the /etc/http/conf.d/mirror.conf file. this
> has 2 locations created. The private branch that redirects all writes to
> the master "SVNMasterURI" and a second Where the sync from master is send
> to.
>
> And yes, all hook scrip are executable. So the problem is : Some in 6
> mounts the mirror would got out off sync because the locking mechanism was
> in please. So normally We would do a
>
> svn propdel --revprop -r0 svn:sync-lock http://mirror/svn-proxy-sync
> svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
>
> But now doing a svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
> we get an error messages like :
>
>  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: Error setting property 'sync-lock':
>  Can't find a temporary directory: Internal error
>
> here are the config file:
>
> master SVN
>
>  <Location /svn/master >
>   DAV svn
>   SVNListParentPath Off
>   SVNPath /home/master/svn/private
>   #SVNParentPath /var/www/svn
>   AuthType Basic
>   AuthName "BLA BLA"
>   AuthUserFile /home/master/svn/etc/htpasswd
>   AuthzSVNAccessFile /home/master/svn/etc/private.access
>   Require valid-user
>  </Location>
>
> Mirror write through proxy
>
>  <Location /svn/mirror >
>    DAV svn
>    SVNListParentPath Off
>    SVNPath /home/mirror/svn/private
>    SVNMasterURI http://svnmaster/svn/master
>    #SVNParentPath /var/www/svn
>    AuthType Basic
>    AuthName "BLA BLA BAL"
>    AuthUserFile /home/mirror/svn/etc/htpasswd
>    AuthzSVNAccessFile /home/mirror/svn/etc/private.access
>    Require valid-user
>  </Location>
> <Location /svn-proxy-sync >
>    DAV svn
>    SVNListParentPath Off
>    SVNPath /home/mirror/svn/private
>    Order deny,allow
>    Deny from all
>    Allow from xxx.xxx.xxx.xxx</Location>
>
> Also when we tried to do a
>
> svnsync init commando we are getting the same output
>
>
> --
> Mustafa Karci
>
>
> The IP Company
> Kruisweg 609
> 2132 NB  Hoofddorp
> The Netherlands
>
> Website: www.theipcompany.nl
> Phone number: 085 1119158
> Direct phone number: 085 1119158
>

Re: SVN write through proxy out off sync

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, May 15, 2015 at 6:10 AM, Mustafa Karci <mk...@theipcompany.nl> wrote:
> Today ore svn mirrror got out off sync. The setup is as the headline
> describes. We have setup a mirror that does only read actions and write
> actions are committed to the master SVN server.

Andreas pointed out a likely file permissions problem. I'm going to
step up to a slightly more abstract level for the general "my mirror
or broken!" problem.

For a more robust, longer term solutions, you might consider not doing
this yourself. Factor in the time you just spent and the likelihood of
similar problems maintaining multiple Subversion mirrors, and strongly
consider laying out some money for WanDisco's "multi-master" setup,
described at http://www.wandisco.com/subversion/multisiteplus

Re: SVN write through proxy out off sync

Posted by Eric Johnson <er...@tibco.com>.
Looks to me like the sync failed at one point, and there's a pending lock
on the mirror repository. Remove the lock and try the sync again.

On Fri, May 15, 2015 at 3:10 AM, Mustafa Karci <mk...@theipcompany.nl> wrote:

> Today ore svn mirrror got out off sync. The setup is as the headline
> describes. We have setup a mirror that does only read actions and write
> actions are committed to the master SVN server.
>
> So on the mirror we have in the /etc/http/conf.d/mirror.conf file. this
> has 2 locations created. The private branch that redirects all writes to
> the master "SVNMasterURI" and a second Where the sync from master is send
> to.
>
> And yes, all hook scrip are executable. So the problem is : Some in 6
> mounts the mirror would got out off sync because the locking mechanism was
> in please. So normally We would do a
>
> svn propdel --revprop -r0 svn:sync-lock http://mirror/svn-proxy-sync
> svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
>
> But now doing a svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private
> we get an error messages like :
>
>  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: Error setting property 'sync-lock':
>  Can't find a temporary directory: Internal error
>
> here are the config file:
>
> master SVN
>
>  <Location /svn/master >
>   DAV svn
>   SVNListParentPath Off
>   SVNPath /home/master/svn/private
>   #SVNParentPath /var/www/svn
>   AuthType Basic
>   AuthName "BLA BLA"
>   AuthUserFile /home/master/svn/etc/htpasswd
>   AuthzSVNAccessFile /home/master/svn/etc/private.access
>   Require valid-user
>  </Location>
>
> Mirror write through proxy
>
>  <Location /svn/mirror >
>    DAV svn
>    SVNListParentPath Off
>    SVNPath /home/mirror/svn/private
>    SVNMasterURI http://svnmaster/svn/master
>    #SVNParentPath /var/www/svn
>    AuthType Basic
>    AuthName "BLA BLA BAL"
>    AuthUserFile /home/mirror/svn/etc/htpasswd
>    AuthzSVNAccessFile /home/mirror/svn/etc/private.access
>    Require valid-user
>  </Location>
> <Location /svn-proxy-sync >
>    DAV svn
>    SVNListParentPath Off
>    SVNPath /home/mirror/svn/private
>    Order deny,allow
>    Deny from all
>    Allow from xxx.xxx.xxx.xxx</Location>
>
> Also when we tried to do a
>
> svnsync init commando we are getting the same output
>
>
> --
> Mustafa Karci
>
>
> The IP Company
> Kruisweg 609
> 2132 NB  Hoofddorp
> The Netherlands
>
> Website: www.theipcompany.nl
> Phone number: 085 1119158
> Direct phone number: 085 1119158
>

Re: SVN write through proxy out off sync

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, May 15, 2015 at 6:10 AM, Mustafa Karci <mk...@theipcompany.nl> wrote:
> Today ore svn mirrror got out off sync. The setup is as the headline
> describes. We have setup a mirror that does only read actions and write
> actions are committed to the master SVN server.

Andreas pointed out a likely file permissions problem. I'm going to
step up to a slightly more abstract level for the general "my mirror
or broken!" problem.

For a more robust, longer term solutions, you might consider not doing
this yourself. Factor in the time you just spent and the likelihood of
similar problems maintaining multiple Subversion mirrors, and strongly
consider laying out some money for WanDisco's "multi-master" setup,
described at http://www.wandisco.com/subversion/multisiteplus

Re: SVN write through proxy out off sync

Posted by Andreas Stieger <an...@gmx.de>.
Hi,

On 15/05/15 12:10, Mustafa Karci wrote:
> Today ore svn mirrror got out off sync. The setup is as the headline
> describes. We have setup a mirror that does only read actions and write
> actions are committed to the master SVN server.
> 
> So on the mirror we have in the /etc/http/conf.d/mirror.conf file. this
> has 2 locations created. The private branch that redirects all writes to
> the master "SVNMasterURI" and a second Where the sync from master is
> send to.
> 
> And yes, all hook scrip are executable. So the problem is : Some in 6
> mounts the mirror would got out off sync because the locking mechanism
> was in please.

And you don't have out-of-band monitoring?

> |svn propdel --revprop -r0 svn:sync-lock http://mirror/svn-proxy-sync

Side note: This should be svnsync sync --steal-lock [...]

> svnsync sync http://mirror/svn-proxyn-sync file:///home/master/svn/private|
>
> But now doing a svnsync
> sync http://mirror/svn-proxyn-sync file:///home/master/svn/private we
> get an error messages like :

Typo...? svn-proxyn-sync != svn-proxy-sync.
(Also never really liked the band.)

> svnsync: Error setting property 'sync-lock': 
> Can't find a temporary directory: Internal error

The server is unable to create a temporary directory.
(subversion/libsvn_subr/io.c) Check file permissions in the repository
as well as temporary paths the system may be using.

Andreas