Bug 462078

Summary: su - fails the first time when home directory is mounted with autofs
Product: Red Hat Enterprise Linux 5 Reporter: Rafael Garabato <rafael.f.garabato>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: 5.1CC: ikent, rafael.f.garabato
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-15 18:09:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rafael Garabato 2008-09-12 13:44:12 UTC
Description of problem:

There seams to be a delay when changing to a user whose /home/ directory is mounted with autofs. As a consecuence, the first time I log in with "su - user" the systems says it couldn't cd to the /home/user directory. When I try again the cd succeeds. See actual results.
I don't know if it has anything to do but I disabled selinux, the firewall and iptables. The problem persisted after this.

Version-Release number of selected component (if applicable):
autofs-5.0.1-0.rc2.55

How reproducible:
I am using Rocks+ which is a cluster provisioning system to configure Red Hat.
Every time I install with Rocks+ it  fails, however I think that the problem is in autofs or su commands

Steps to Reproduce:
See actual results. After the first try the /home/* directory will be mounted. To reproduce again, restart the system; or wait to the /home/user directory to be unmounted automatically by autofs. Manually unmounting the folder does not reproduce the issue.



  
Actual results:
[root@rocksrhml ~]# su - icr
su: warning: cannot change directory to /home/icr: No such file or directory
[icr@rocksrhml root]$ exit
logout
[root@rocksrhml ~]# su - icr
[icr@rocksrhml ~]$ exit
logout
[root@rocksrhml ~]# cat /etc/auto.
auto.home    auto.master  auto.misc    auto.net     auto.share   auto.smb
[root@rocksrhml ~]# cat /etc/auto.
auto.home    auto.master  auto.misc    auto.net     auto.share   auto.smb
[root@rocksrhml ~]# cat /etc/auto.master
/share /etc/auto.share --timeout=1200
/home  /etc/auto.home  --timeout=1200

[root@rocksrhml ~]# cat /etc/auto.home
install         rocksrhml.local:/export/home/&
icr     rocksrhml.local:/export/home/icr

[root@rocksrhml ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
[root@rocksrhml ~]# mount
/dev/sda3 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda6 on /state/partition1 type ext3 (rw)
/dev/sda2 on /var type ext3 (rw)
/dev/sda1 on /boot type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /var/lib/ganglia/rrds type tmpfs (rw,size=1012335000,gid=99,uid=99)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/state/partition1/home/icr on /home/icr type none (rw,bind)
[root@rocksrhml ~]# cat /etc/fstab
LABEL=/1                /                       ext3    defaults        1 1
LABEL=/state/partitio1  /state/partition1       ext3    defaults        1 2
LABEL=/var1             /var                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext2    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda5         swap                    swap    defaults        0 0

# The ram-backed filesystem for ganglia RRD graph databases.
tmpfs /var/lib/ganglia/rrds tmpfs size=1012335000,gid=nobody,uid=nobody,defaults 1 0


Expected results:


Additional info:

Comment 1 Jeff Moyer 2008-09-12 14:12:35 UTC
What kernel version?  This was fixed in the 5.1 z-stream and in 5.2.

Cheers,

Jeff

Comment 2 Rafael Garabato 2008-09-12 14:20:00 UTC
[root@rocksrhml ~]# cat /proc/version
Linux version 2.6.18-53.el5 (brewbuilder.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Oct 10 16:34:19 EDT 2007

Comment 3 Rafael Garabato 2008-09-12 14:36:25 UTC
[root@rocksrhml ~]# cat /proc/version
Linux version 2.6.18-53.el5 (brewbuilder.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Oct 10 16:34:19 EDT 2007

Comment 4 Jeff Moyer 2008-09-12 14:46:20 UTC
Right, you need to upgrade your kernel.  The latest z-stream kernel for RHEL 5.1 is:

kernel-2.6.18-53.1.21.el5

Pleast update to this kenrel and report back.  This is most likely a duplicate of bug 371341.

Comment 5 Rafael Garabato 2008-09-12 15:10:27 UTC
Thank you for your help. Great support.

Comment 6 Jeff Moyer 2008-09-15 16:47:00 UTC
(In reply to comment #5)
> Thank you for your help. Great support.

Did you manage to test the new kernel?  Can we close this as a duplicate of bug 371341?

Thanks!

Comment 7 Rafael Garabato 2008-09-15 18:01:03 UTC
You can close it. I didn't test the new kernel as I have a kernel version constraint. However, I found a workaround in the duplicate bug.

Comment 8 Jeff Moyer 2008-09-15 18:09:17 UTC
(In reply to comment #7)
> You can close it. I didn't test the new kernel as I have a kernel version
> constraint. However, I found a workaround in the duplicate bug.

OK, thanks for the update.

Cheers.

*** This bug has been marked as a duplicate of bug 371341 ***