Discussion:
cvs not checkout in pwd, but some other strange place.
Troels Kofoed Jacobsen
2009-04-29 07:02:24 UTC
Permalink
Hi all

I have a problem. My /home and some other folders are automounted nfs
shares via autofs. When I try to checkout form any cvs repository in my
homefolder ($HOME/tmp) cvs will randomly tell me smomething like:
cvs [checkout aborted]: could not chdir to /auto/data/myuser/tmp: No
such file or directory
note here that /auto/data is also an automounted nfs share.
My /home is actually also mounted to /auto/home and then symlinked to
/home...
The strange thing is that this happens rather randomly. It will pick a
seemingly random share mounted in /auto, think my user homefolder is
under that and try to checkout to that dir. Sometimes it tries
/auto/home and the checkout succeeds. If i create it says it is missing
(e.g. /auto/data/myuser/tmp) it will checkout into that -- even though
I'm in /home/myuser/tmp when writing the command.

Note: if i try from a dir in the root file system (e.g. /tmp) it will
always succeed)

Can anyone tell me what's going on? Why do cvs even try to change dir
before pulling the data?


Best regards
Troels Kofoed Jacobsen
Arthur Barrett
2009-04-29 19:55:40 UTC
Permalink
Troels Kofoed Jacobsen,

Version of CVS? eg: 1.11.1p1

CVSROOT? eg: :pserver:localhost:/repo

Regards,


Arthur Barrett
Larry Jones
2009-04-29 20:49:58 UTC
Permalink
Post by Troels Kofoed Jacobsen
I have a problem. My /home and some other folders are automounted nfs
shares via autofs. When I try to checkout form any cvs repository in my
cvs [checkout aborted]: could not chdir to /auto/data/myuser/tmp: No
such file or directory
note here that /auto/data is also an automounted nfs share.
My /home is actually also mounted to /auto/home and then symlinked to
/home...
The strange thing is that this happens rather randomly. It will pick a
seemingly random share mounted in /auto, think my user homefolder is
under that and try to checkout to that dir. Sometimes it tries
/auto/home and the checkout succeeds. If i create it says it is missing
(e.g. /auto/data/myuser/tmp) it will checkout into that -- even though
I'm in /home/myuser/tmp when writing the command.
There's something wrong in your OS -- either the automounter or the NFS
filesystem code. It's not a CVS problem. (This is why we recommend
against having working directories on NFS-mounted filesystems.)
--
Larry Jones

In short, open revolt and exile is the only hope for change? -- Calvin
Todd Denniston
2009-04-30 20:55:15 UTC
Permalink
Post by Troels Kofoed Jacobsen
Hi all
I have a problem. My /home and some other folders are automounted nfs
shares via autofs. When I try to checkout form any cvs repository in my
cvs [checkout aborted]: could not chdir to /auto/data/myuser/tmp: No
such file or directory
note here that /auto/data is also an automounted nfs share.
My /home is actually also mounted to /auto/home and then symlinked to
/home...
The strange thing is that this happens rather randomly. It will pick a
seemingly random share mounted in /auto, think my user homefolder is
under that and try to checkout to that dir. Sometimes it tries
/auto/home and the checkout succeeds. If i create it says it is missing
(e.g. /auto/data/myuser/tmp) it will checkout into that -- even though
I'm in /home/myuser/tmp when writing the command.
Note: if i try from a dir in the root file system (e.g. /tmp) it will
always succeed)
Can anyone tell me what's going on?
I agree with Arthur, please provide
Version of CVS?
CVSROOT?
what is the actual message, or be very careful when 'sanitizing' it.

I believe you are using an autofs, which mounts NFS file systems only when
they are needed, if the needed file system is already mounted it works ok, if
not it does not.
to me it looks like the very first access CVS does to the directory causes it
to be mounted, but not before CVS gives up on it, which I have seen with many
other products.
Post by Troels Kofoed Jacobsen
Why do cvs even try to change dir
before pulling the data?
we need more information first.
Version of CVS?
CVSROOT?
is the directory where you are telling it to put your checkout a soft link or
contain one?
cd into the directory where you are doing the checkout and execute:
df -h . |awk '{print $6}'
is the second line returned the place that CVS is indicating does not exist?
[the first line should say Mounted]

cd into the directory where you are telling CVS to _put_ (cvs checkout -d ???)
the checkout and execute:
df -h . |awk '{print $6}'
is the second line returned the place that CVS is indicating does not exist?


workaround: always cd into the directory where you want to do the checkout,
which will cause autofs to have it mounted before you do the checkout.
Post by Troels Kofoed Jacobsen
Best regards
Troels Kofoed Jacobsen
--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
Troels Kofoed Jacobsen
2009-05-04 11:14:06 UTC
Permalink
Post by Todd Denniston
Post by Troels Kofoed Jacobsen
Hi all
I have a problem. My /home and some other folders are automounted nfs
shares via autofs. When I try to checkout form any cvs repository in
cvs [checkout aborted]: could not chdir to /auto/data/myuser/tmp: No
such file or directory
note here that /auto/data is also an automounted nfs share.
My /home is actually also mounted to /auto/home and then symlinked to
/home...
The strange thing is that this happens rather randomly. It will pick
a seemingly random share mounted in /auto, think my user homefolder
is under that and try to checkout to that dir. Sometimes it tries
/auto/home and the checkout succeeds. If i create it says it is
missing (e.g. /auto/data/myuser/tmp) it will checkout into that --
even though I'm in /home/myuser/tmp when writing the command.
Note: if i try from a dir in the root file system (e.g. /tmp) it will
always succeed)
Can anyone tell me what's going on?
I agree with Arthur, please provide
Version of CVS?
CVSROOT?
what is the actual message, or be very careful when 'sanitizing' it.
Note in the following I have only changed path names, host names, domain
names and IP addresses.

Version: 1.12.12 installed via opensuse or compiled manually.
CVSROOT=:pserver:@myhost.mydomain.dk:/usr/local/cvs_repos
but this is reproducible with others.

# pwd
/users/myuser/tmp
# cvs checkout
cvs [checkout aborted]: could not chdir to /indirect/data/myuser/tmp: No
such file or directory
# mount
/dev/sda3 on / type ext3 (rw,acl,user_xattr)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda1 on /boot type ext3 (rw,acl,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/proc on /var/lib/ntp/proc type proc (ro)
knfs:/users on /indirect/users type nfs
(rw,soft,sloppy,addr=192.168.1.2,nfsvers=3,proto=tcp,mountproto=udp)
knfs:/mnt/local on /indirect/local type nfs
(rw,soft,sloppy,addr=192.168.1.2,nfsvers=3,proto=tcp,mountproto=udp)
knfs:/data on /indirect/data type nfs
(rw,soft,sloppy,addr=192.168.1.2,nfsvers=3,proto=tcp,mountproto=udp)
# ls -l /users
lrwxrwxrwx 1 root root 15 2007-03-26 18:11 /users -> /indirect/users
Post by Todd Denniston
I believe you are using an autofs, which mounts NFS file systems only
when they are needed, if the needed file system is already mounted it
works ok, if not it does not.
Not really. All needed filesystems are mounted!
Post by Todd Denniston
to me it looks like the very first access CVS does to the directory
causes it to be mounted, but not before CVS gives up on it, which I
have seen with many other products.
Post by Troels Kofoed Jacobsen
Why do cvs even try to change dir before pulling the data?
we need more information first.
Version of CVS?
CVSROOT?
is the directory where you are telling it to put your checkout a soft
link or contain one?
df -h . |awk '{print $6}'
# df -h . | awk '{print $6}'
Mounted
/indirect/users
Post by Todd Denniston
is the second line returned the place that CVS is indicating does not exist?
[the first line should say Mounted]
No.
Post by Todd Denniston
cd into the directory where you are telling CVS to _put_ (cvs checkout
df -h . |awk '{print $6}'
is the second line returned the place that CVS is indicating does not exist?
I do not use -d.
Post by Todd Denniston
workaround: always cd into the directory where you want to do the
checkout, which will cause autofs to have it mounted before you do the
checkout.
Must be something else.
Post by Todd Denniston
Post by Troels Kofoed Jacobsen
Best regards
Troels Kofoed Jacobsen
I really appreciate you guys spending time on this. I hope I'm not too
much trouble.

Best regards
Troels Kofoed Jacobsen
Todd Denniston
2009-05-04 20:53:23 UTC
Permalink
Post by Troels Kofoed Jacobsen
Post by Todd Denniston
Post by Troels Kofoed Jacobsen
Hi all
Can anyone tell me what's going on?
I agree with Arthur, please provide
Version of CVS?
CVSROOT?
what is the actual message, or be very careful when 'sanitizing' it.
Note in the following I have only changed path names, host names, domain
names and IP addresses.
Version: 1.12.12 installed via opensuse or compiled manually.
but this is reproducible with others.
# pwd
/users/myuser/tmp
# cvs checkout
cvs [checkout aborted]: could not chdir to /indirect/data/myuser/tmp: No
such file or directory
# mount
knfs:/users on /indirect/users type nfs
(rw,soft,sloppy,addr=192.168.1.2,nfsvers=3,proto=tcp,mountproto=udp)
knfs:/mnt/local on /indirect/local type nfs
(rw,soft,sloppy,addr=192.168.1.2,nfsvers=3,proto=tcp,mountproto=udp)
knfs:/data on /indirect/data type nfs
(rw,soft,sloppy,addr=192.168.1.2,nfsvers=3,proto=tcp,mountproto=udp)
OK, now I see enough to cause a problem, even if it is not causing _this_ problem.

[man nfs]
when you mount nfs with 'soft'
If an NFS file operation has a major timeout then report
an I/O error to the calling program. The default is to
continue retrying NFS file operations indefinitely.

when you mount nfs with 'hard'
If an NFS file operation has a major timeout then report
"server not responding" on the console and continue
retrying indefinitely. This is the default.


[man mount]
"Mount options for nfs ...
soft ... Usually it just causes
lots of trouble."


CVS (and most other programs) expects 'hard' handling.
The appropriate compromise is 'hard,intr'.

I have seen much data loss/corruption with soft. For something that is read
only, it might be OK, but not for something that is writable in a network with
more than ~2 physical computers.


The following conversation might be of some interest.
http://linux.kernel.org/pipermail/autofs/2004-April/001119.html
http://linux.kernel.org/pipermail/autofs/2004-April/001120.html
http://linux.kernel.org/pipermail/autofs/2004-April/001121.html
Post by Troels Kofoed Jacobsen
# ls -l /users
lrwxrwxrwx 1 root root 15 2007-03-26 18:11 /users -> /indirect/users
Post by Todd Denniston
I believe you are using an autofs, which mounts NFS file systems only
when they are needed, if the needed file system is already mounted it
works ok, if not it does not.
Not really. All needed filesystems are mounted!
--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
Loading...