Re: svn: E000005: Can't check path '/net/.svn': Input/output error

2013-11-07 Thread Blair Zajac

On 11/06/2013 08:05 PM, Ben Reser wrote:

On 11/6/13 6:21 PM, Blair Zajac wrote:

I'm wondering if its a regression with older versions of Subversion as it walks
up the tree to find a .svn directory.


Well the error is coming from io_check_path() in subversion/libsvn_subr/io.c.
Specifically we run apr_stat() on the path and are expecting a valid status or
something that is true when passed to APR_STATUS_IS_ENOENT() or
SVN__APR_STATUS_IS_ENOTDIR().

apr_stat of course is just a thing wrapper around lstat() or stat().  In your
case based on the error message it's returning 5 which according to
/usr/include/sys/errno.h is EIO.  And of course Subversion is saying there's an
"Input/output error" consistent with the error code it received.

Unfortunately the documentation for this is hardly clear (see man auto_master
under Executable Map).  It says that you should exit with a non zero exit code
and no output if there is an error.  Their example even shows it exiting with
`exit 1` when the Open Directory query returned no results.

Based on some simple experimentation I added the following to my
/etc/auto_master file:
/nxx/etc/auto.nxx

Added a /etc/auto.nxx file containing
[[[
#!/bin/sh

exit 1
]]]

Made /etc/auto.nxx executable and ran `automount -vc` to activate it.

Then I ran this:
$ ls -l /nxx/x
ls: /nxx/x: Input/output error

Changing the exit code to 0 in /etc/auto.nxx I then repeated the ls command and
got:
$ ls -l /nxx/x
ls: /nxx/x: No such file or directory

So it seems to me that unless the commands to query LDAP fail that your script
should exit with zero exit code and no output to indicate there is no such
mount point.

So like I said before it seems to me that this is a bug in your /etc/auto.spi


Changing 'exit 1' to 'exit 0' and having the script send nothing to 
stdout gets it to work.


Thanks for taking the time to track this down.

Blair



Re: svn: E000005: Can't check path '/net/.svn': Input/output error

2013-11-06 Thread Ben Reser
On 11/6/13 6:21 PM, Blair Zajac wrote:
> I'm wondering if its a regression with older versions of Subversion as it 
> walks
> up the tree to find a .svn directory.

Well the error is coming from io_check_path() in subversion/libsvn_subr/io.c.
Specifically we run apr_stat() on the path and are expecting a valid status or
something that is true when passed to APR_STATUS_IS_ENOENT() or
SVN__APR_STATUS_IS_ENOTDIR().

apr_stat of course is just a thing wrapper around lstat() or stat().  In your
case based on the error message it's returning 5 which according to
/usr/include/sys/errno.h is EIO.  And of course Subversion is saying there's an
"Input/output error" consistent with the error code it received.

Unfortunately the documentation for this is hardly clear (see man auto_master
under Executable Map).  It says that you should exit with a non zero exit code
and no output if there is an error.  Their example even shows it exiting with
`exit 1` when the Open Directory query returned no results.

Based on some simple experimentation I added the following to my
/etc/auto_master file:
/nxx/etc/auto.nxx

Added a /etc/auto.nxx file containing
[[[
#!/bin/sh

exit 1
]]]

Made /etc/auto.nxx executable and ran `automount -vc` to activate it.

Then I ran this:
$ ls -l /nxx/x
ls: /nxx/x: Input/output error

Changing the exit code to 0 in /etc/auto.nxx I then repeated the ls command and
got:
$ ls -l /nxx/x
ls: /nxx/x: No such file or directory

So it seems to me that unless the commands to query LDAP fail that your script
should exit with zero exit code and no output to indicate there is no such
mount point.

So like I said before it seems to me that this is a bug in your /etc/auto.spi


Re: svn: E000005: Can't check path '/net/.svn': Input/output error

2013-11-06 Thread Blair Zajac

On 11/06/2013 05:54 PM, Ben Reser wrote:

On 11/6/13 5:15 PM, Blair Zajac wrote:

Using a MacPorts build of svn 1.8.4 on a 10.7.5 MacBook Air:

$ uname -a
Darwin foo.example.com 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48
PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 i386 MacBookAir4,2 Darwin
$ cd /net/yum/blair
$ mkdir tmp
$ svn checkout -N http://svn.apache.org/repos/asf/subversion/trunk
svn: E05: Can't check path '/net/.svn': Input/output error


This looks related to NFS, as the MacBook Air will mount our NFS volumes:

$ cat /etc/auto_master
#
# Automounter master map
#
/net/etc/auto.spi
/hosts/etc/auto.net

/etc/auto.spi is a long shell script that does an LDAP lookup on the proper
server to mount and mount options to use.

It looks like /etc/auto.spi does an 'exit 1' when the LDAP lookup for '.svn'
fails.

$ /etc/auto.spi yum
-intr,soft,nodev,vers=3,tcp,bg\
 foobar:/foo/vol0/yum
$ echo $?
0

$ /etc/auto.spi .svn
$ echo $?
1

Any ideas on how to best resolve this?


I think you should talk to whoever wrote auto.spi.

For what it's worth I use working copies on NFS as well (also on a MacBook Air
with 10.7.5), however I mount them with the automatic NFS mounts feature of the
Disk Utility application.  I haven't had any issues doing this.


We have large numbers of different volumes with mount points coming and 
going and hundreds of MacBook Airs, so the LDAP approach lets us 
centralize this.



It's not clear if you think there is a Subversion specific issue here but I
don't see what it is if you do.


I'm wondering if its a regression with older versions of Subversion as 
it walks up the tree to find a .svn directory.


Blair



Re: svn: E000005: Can't check path '/net/.svn': Input/output error

2013-11-06 Thread Ben Reser
On 11/6/13 5:15 PM, Blair Zajac wrote:
> Using a MacPorts build of svn 1.8.4 on a 10.7.5 MacBook Air:
> 
> $ uname -a
> Darwin foo.example.com 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 
> 16:25:48
> PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 i386 MacBookAir4,2 Darwin
> $ cd /net/yum/blair
> $ mkdir tmp
> $ svn checkout -N http://svn.apache.org/repos/asf/subversion/trunk
> svn: E000005: Can't check path '/net/.svn': Input/output error
> 
> 
> This looks related to NFS, as the MacBook Air will mount our NFS volumes:
> 
> $ cat /etc/auto_master
> #
> # Automounter master map
> #
> /net/etc/auto.spi
> /hosts/etc/auto.net
> 
> /etc/auto.spi is a long shell script that does an LDAP lookup on the proper
> server to mount and mount options to use.
> 
> It looks like /etc/auto.spi does an 'exit 1' when the LDAP lookup for '.svn'
> fails.
> 
> $ /etc/auto.spi yum
> -intr,soft,nodev,vers=3,tcp,bg\
> foobar:/foo/vol0/yum
> $ echo $?
> 0
> 
> $ /etc/auto.spi .svn
> $ echo $?
> 1
> 
> Any ideas on how to best resolve this?

I think you should talk to whoever wrote auto.spi.

For what it's worth I use working copies on NFS as well (also on a MacBook Air
with 10.7.5), however I mount them with the automatic NFS mounts feature of the
Disk Utility application.  I haven't had any issues doing this.

It's not clear if you think there is a Subversion specific issue here but I
don't see what it is if you do.



svn: E000005: Can't check path '/net/.svn': Input/output error

2013-11-06 Thread Blair Zajac

Using a MacPorts build of svn 1.8.4 on a 10.7.5 MacBook Air:

$ uname -a
Darwin foo.example.com 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 
16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 i386 
MacBookAir4,2 Darwin

$ cd /net/yum/blair
$ mkdir tmp
$ svn checkout -N http://svn.apache.org/repos/asf/subversion/trunk
svn: E05: Can't check path '/net/.svn': Input/output error


This looks related to NFS, as the MacBook Air will mount our NFS volumes:

$ cat /etc/auto_master
#
# Automounter master map
#
/net/etc/auto.spi
/hosts  /etc/auto.net

/etc/auto.spi is a long shell script that does an LDAP lookup on the 
proper server to mount and mount options to use.


It looks like /etc/auto.spi does an 'exit 1' when the LDAP lookup for 
'.svn' fails.


$ /etc/auto.spi yum
-intr,soft,nodev,vers=3,tcp,bg\
foobar:/foo/vol0/yum
$ echo $?
0

$ /etc/auto.spi .svn
$ echo $?
1

Any ideas on how to best resolve this?

Blair