You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Byrne <sb...@penguinis.org> on 2009/09/11 18:28:06 UTC
write-thru proxy lossage
HELP! I'm at my wits end.
I am trying to validate that Subversion write-thru proxying works (at
all) before my company will adopt Subversion, displacing Perforce. So
far, it's not looking good for Subversion.
To validate the write-thru behavior, I have a single server hosting both
the master and a single slave repository, and a single Apache hosting
both WEBDav configurations.
Mirroring from the master to the slave works fine. I have not attempted
to do any kind of securing of the connection yet as that would introduce
additional complications into an already frustrating set up.
Where I am having problems is with making changes to the slave and
having them propagate to the master without error. I've never had that
actually work.
Yesterday, the error involved MERGE failures (sorry, I didn't capture
the exact text, but it was something like
MERGE failed /svn/trunk/foo is not a child of /svn-mirror/trunk
So, I read here:
http://blogs.open.collab.net/svn/2007/10/yesterday-at-th.html that using
a trailing slash on the SVNMasterURI would solve this problem.
Indeed it solved that problem, and replaced it with a new one:
svn: Commit failed (details follow):
svn: At least one property change failed; repository is unchanged
svn: Server sent unexpected return value (405 Method Not Allowed) in
response to PROPPATCH request for
'/svn-mirror!svn/wbl/b2d7fdeb-96bc-4fe7-999a-7a4d07ba9ac1/223'
Note the missing slash after /svn-mirror.
So I'm stuck. I can have MERGE failures, or PROPPATCH failures. I'd
like to have success.
Can someone help me please?
Details:
Both master and slave repositories are owned by Apache's "www-data" user
and have group "svn" , which is common to all users of Subversion on
this system.
SSH is a freshly built 1.6.5, and I am encountering this error when
operating directly on the machine hosting the repositories.
Apache is 2.2.11 (Ubuntu), and this installation is on an Ubuntu 9.04
Linux box.
The master repository lives in /var/svn/testrepo
The slave repository lives in /var/svn/web-mirror
Here is dav_svn.conf:
# the local, master repo
<Location /svn>
DAV svn
SVNPath /var/svn/testrepo
</Location>
# the mirror for clients
<Location /svn-mirror>
DAV svn
SVNPath /var/svn/web-mirror
# note trailing slash here -- this leads to the PROPPATCH / mal-formed
URL problem above
SVNMasterURI http://localhost/svn/
</Location>
# the sync
<Location /svn-proxy-sync/>
DAV svn
SVNPath /var/svn/web-mirror
</Location>
The slave has repository has both start-commit and pre-revprop-change
hooks set to "exit 0" (well /bin/sh shebang and then exit 0)
master's post-revprop-change hook
#!/bin/sh
REV=${2}
svnsync copy-revprops file:///var/svn/repos-mirror ${REV} > /dev/null
svnsync copy-revprops http://localhost/svn-proxy-sync ${REV} > /dev/null
master's post-commit hook
#!/bin/sh
# replicate changes to the mirror
svnsync sync file:///var/svn/repos-mirror > /dev/null 2>&1
svnsync sync http://localhost/svn-proxy-sync > /dev/null 2>&1
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2393691
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: write-thru proxy lossage
Posted by Steve Byrne <sb...@penguinis.org>.
Ulli,
Thanks for getting back to me on this.
> - Set up two different Hosts (I think in your case, you could use two
> different virtual hosts, two distinct machines would be better, however)
> - have the same <location> on both of them for client access (the client
> needs to see the same path, while the hostnames can differ)
>
This I think you have provided me with the key: only one or two messages
in the scant email traffic on this problem say "must have the same
path". Oh. Which path??? Location? File system path to repo???
Proxy sync path? Something else??? Arrrgh. Thank you VERY much for
disambiguating this for me.
> Verbose explanation I found:
>
> When copying, is basically sends the command to create a copy
> of /svn-mirror/testrepo/path_to_source
> at /svn-mirror/testrepo/copy_of_path_to_source. The slave knows it
> should forward that request to the master, so it does. It even rewrites
> one of the paths to match the master path. The master, however, knows
> nothing about the (non-rewritten) copy source (I think it rewrote the
> destination - the change sent contains a COPYFROM: ...), it doesn't know
> about the /svn-mirror/ path, so it gets confused and sends an error.
>
Wonderful -- I'd seen a hint about this "confusion", which to me sounded
like a bug in the code whereby it was using the wrong frame of reference
for creating these paths.
> I hope this helps solving your problem.
>
I bet it will!
Thanks again for your very detailed and clear explanation of not only
what to fix but why. I'm sure this will put me on the path to success!
Steve
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2394639
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: write-thru proxy lossage
Posted by Ullrich Jans <ul...@elektrobit.com>.
On Fri, 2009-09-11 at 11:28 -0700, Steve Byrne wrote:
> To validate the write-thru behavior, I have a single server hosting
> both the master and a single slave repository, and a single Apache
> hosting both WEBDav configurations.
I think that's the mistake. See below.
> Mirroring from the master to the slave works fine. I have not
> attempted to do any kind of securing of the connection yet as that
> would introduce additional complications into an already frustrating
> set up.
>
> Where I am having problems is with making changes to the slave and
> having them propagate to the master without error. I've never had
> that actually work.
>
> Yesterday, the error involved MERGE failures (sorry, I didn't capture
> the exact text, but it was something like
>
> MERGE failed /svn/trunk/foo is not a child of /svn-mirror/trunk
>
> So, I read here:
> http://blogs.open.collab.net/svn/2007/10/yesterday-at-th.html that
> using a trailing slash on the SVNMasterURI would solve this problem.
>
> Indeed it solved that problem, and replaced it with a new one:
>
> svn: Commit failed (details follow):
> svn: At least one property change failed; repository is unchanged
> svn: Server sent unexpected return value (405 Method Not Allowed) in
> response to PROPPATCH request for '/svn-mirror!
> svn/wbl/b2d7fdeb-96bc-4fe7-999a-7a4d07ba9ac1/223'
>
> Note the missing slash after /svn-mirror.
>
> So I'm stuck. I can have MERGE failures, or PROPPATCH failures. I'd
> like to have success.
>
> Can someone help me please?
>
> Details:
>
> Both master and slave repositories are owned by Apache's "www-data"
> user and have group "svn" , which is common to all users of Subversion
> on this system.
>
> SSH is a freshly built 1.6.5, and I am encountering this error when
> operating directly on the machine hosting the repositories.
>
> Apache is 2.2.11 (Ubuntu), and this installation is on an Ubuntu 9.04
> Linux box.
>
> The master repository lives in /var/svn/testrepo
> The slave repository lives in /var/svn/web-mirror
>
>
> Here is dav_svn.conf:
>
> # the local, master repo
> <Location /svn>
> DAV svn
> SVNPath /var/svn/testrepo
> </Location>
>
> # the mirror for clients
> <Location /svn-mirror>
> DAV svn
> SVNPath /var/svn/web-mirror
> # note trailing slash here -- this leads to the PROPPATCH / mal-formed
> URL problem above
> SVNMasterURI http://localhost/svn/
> </Location>
>
> # the sync
> <Location /svn-proxy-sync/>
> DAV svn
> SVNPath /var/svn/web-mirror
> </Location>
>
[...stuff deleted...]
While I can't say anything about your exact problem, I ran into
something similar before: Master/Slave config, everything looked fine,
but svn copy would always fail on the slave. (I don't remember the
error, but I think it was 405 Method not allowed or something)
I tracked it down to the different paths on the master and the slave.
The solution:
- Set up two different Hosts (I think in your case, you could use two
different virtual hosts, two distinct machines would be better, however)
- have the same <location> on both of them for client access (the client
needs to see the same path, while the hostnames can differ)
Verbose explanation I found:
When copying, is basically sends the command to create a copy
of /svn-mirror/testrepo/path_to_source
at /svn-mirror/testrepo/copy_of_path_to_source. The slave knows it
should forward that request to the master, so it does. It even rewrites
one of the paths to match the master path. The master, however, knows
nothing about the (non-rewritten) copy source (I think it rewrote the
destination - the change sent contains a COPYFROM: ...), it doesn't know
about the /svn-mirror/ path, so it gets confused and sends an error.
I hope this helps solving your problem.
Cheers,
Ulli
--
Ullrich Jans, Application Support, IM
Phone: +49 9131 7701-6627, mailto:ullrich.jans@elektrobit.com
Fax: +49 9131 7701-6333, www.elektrobit.com
Elektrobit Automotive GmbH, Am Wolfsmantel 46, 91058 Erlangen, Germany
Managing Directors: Otto Fößel, Jarkko Sairanen
Register Court Fürth HRB 4886
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.