* Some reload problems.
@ 2008-05-05 14:13 Stef Bon
2008-05-05 14:29 ` Stef Bon
2008-05-05 15:06 ` Ian Kent
0 siblings, 2 replies; 6+ messages in thread
From: Stef Bon @ 2008-05-05 14:13 UTC (permalink / raw)
To: autofs
Hello,
I'm working on a construction which makes it able for ordinary users to
browse (and mount) the network over
different services like SSH and SMB.
It creates a networkmap in the homedirectory:
/home/sbon/Global Network
for example.
Now this contruction creates and uses a temporarly master map in
/var/run/autofs:
/var/run/autofs.master
which in my single user case looks like:
/home/sbon/Global\ Network /etc/autofs/session/auto.network.sbon -browse
The map is in /var/run, because it only contains runtime data.
The line is added by a script run by KDM, when my session starts.
(and removed by another script run by KDM, when a sessions ends)
Now I'v added this "networkrelated/usersession auto.master" to the
"main" auto.master:
#
# other mountpoints and maps here....
#
+/var/run/autofs/auto.master
Now, there is an (I think reasonable) assumption:
- when the automount daemon is not started at boottime, the creation of
the networkfolders should not be done
(this construction does not start it, it should already be running)
- the daemon will start and continu running with an empty master map
- a reload hasn't much consequences for existing trees.
But what is necessary, is that after any change in the
/var/run/autofs/auto.master file, the daemon should get a reload.
Now my experience is that the first issue is ok. There is even a patch
for it. (I'm using version 5.0.3)
The daemon starts, even with an empty auto.master file (and an empty
/var/run/autofs/auto.master).
It's also ok when a line is added. But there are some problems when
stopping.
When stopping a session (by logging out), the line in
/var/run/autofs/auto.master is removed and the
daemon gets a reload. Now, when there are no other lines here, and there
also no other mountpoints in the main mastermap, the daemon stops.
To avoid this problem, I've added valid mountpoint to the main
mastermap, and this problem did not occur anymore.
But, what remained is that the top level directory of a unused
"browseable network tree" was removed after a reload. I have to avtivate
it again.
Let me explain: my construction supports two services at this moment:
SSH and SMB.
When I login, both are activated by a litlle script which does:
ls -A "/home/sbon/Global Network/Windows Network" and
ls -A "/home/sbon/Global Network/SSH hosts"
Now I can browse the network. (I've discussed this earlier..)
The /var/run/autofs/auto.master file has two lines, one for me and one
for root.
There are smb shares for me (sbon) mounted, so there are active mounts.
No ssh host is mounted
for sbon.
When root is logging out, the line with for root is removed, and the
daemon gets a reload.
The result is that the Windows Network does still exist in
"/home/sbon/Global Network", but "SSH hosts" not
anymore, which should not be the case.
I hope you're able to understand the situation.
Stef Bon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Some reload problems.
2008-05-05 14:13 Some reload problems Stef Bon
@ 2008-05-05 14:29 ` Stef Bon
2008-05-05 15:06 ` Ian Kent
1 sibling, 0 replies; 6+ messages in thread
From: Stef Bon @ 2008-05-05 14:29 UTC (permalink / raw)
To: autofs
Stef Bon wrote:
>
> Now, there is an (I think reasonable) assumption:
> - when the automount daemon is not started at boottime, the creation of
> the networkfolders should not be done
> (this construction does not start it, it should already be running)
> - the daemon will start and continu running with an empty master map
> - a reload hasn't much consequences for existing trees.
>
> But what is necessary, is that after any change in the
> /var/run/autofs/auto.master file, the daemon should get a reload.
>
> Now my experience is that the first issue is ok. There is even a patch
> for it. (I'm using version 5.0.3)
>
Sorry, I meant the second issue. The first is an assumption.
SB
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Some reload problems.
2008-05-05 14:13 Some reload problems Stef Bon
2008-05-05 14:29 ` Stef Bon
@ 2008-05-05 15:06 ` Ian Kent
2008-05-06 9:49 ` Stef Bon
1 sibling, 1 reply; 6+ messages in thread
From: Ian Kent @ 2008-05-05 15:06 UTC (permalink / raw)
To: Stef Bon; +Cc: autofs
On Mon, 2008-05-05 at 16:13 +0200, Stef Bon wrote:
> Hello,
>
> I'm working on a construction which makes it able for ordinary users to
> browse (and mount) the network over
> different services like SSH and SMB.
>
> It creates a networkmap in the homedirectory:
>
> /home/sbon/Global Network
>
> for example.
>
> Now this contruction creates and uses a temporarly master map in
> /var/run/autofs:
>
> /var/run/autofs.master
>
> which in my single user case looks like:
>
> /home/sbon/Global\ Network /etc/autofs/session/auto.network.sbon -browse
>
> The map is in /var/run, because it only contains runtime data.
> The line is added by a script run by KDM, when my session starts.
> (and removed by another script run by KDM, when a sessions ends)
>
> Now I'v added this "networkrelated/usersession auto.master" to the
> "main" auto.master:
>
> #
> # other mountpoints and maps here....
> #
> +/var/run/autofs/auto.master
>
>
> Now, there is an (I think reasonable) assumption:
> - when the automount daemon is not started at boottime, the creation of
> the networkfolders should not be done
> (this construction does not start it, it should already be running)
> - the daemon will start and continu running with an empty master map
> - a reload hasn't much consequences for existing trees.
>
> But what is necessary, is that after any change in the
> /var/run/autofs/auto.master file, the daemon should get a reload.
>
> Now my experience is that the first issue is ok. There is even a patch
> for it. (I'm using version 5.0.3)
> The daemon starts, even with an empty auto.master file (and an empty
> /var/run/autofs/auto.master).
>
> It's also ok when a line is added. But there are some problems when
> stopping.
> When stopping a session (by logging out), the line in
> /var/run/autofs/auto.master is removed and the
> daemon gets a reload. Now, when there are no other lines here, and there
> also no other mountpoints in the main mastermap, the daemon stops.
You'll need to provide a debug log as well as the explanation, ensure
you are capturing all the output to syslog.
>
> To avoid this problem, I've added valid mountpoint to the main
> mastermap, and this problem did not occur anymore.
> But, what remained is that the top level directory of a unused
> "browseable network tree" was removed after a reload. I have to avtivate
> it again.
>
> Let me explain: my construction supports two services at this moment:
> SSH and SMB.
> When I login, both are activated by a litlle script which does:
>
> ls -A "/home/sbon/Global Network/Windows Network" and
> ls -A "/home/sbon/Global Network/SSH hosts"
>
> Now I can browse the network. (I've discussed this earlier..)
>
> The /var/run/autofs/auto.master file has two lines, one for me and one
> for root.
> There are smb shares for me (sbon) mounted, so there are active mounts.
> No ssh host is mounted
> for sbon.
> When root is logging out, the line with for root is removed, and the
> daemon gets a reload.
> The result is that the Windows Network does still exist in
> "/home/sbon/Global Network", but "SSH hosts" not
> anymore, which should not be the case.
>
> I hope you're able to understand the situation.
>
> Stef Bon
>
>
>
>
>
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Some reload problems.
2008-05-05 15:06 ` Ian Kent
@ 2008-05-06 9:49 ` Stef Bon
2008-05-07 13:11 ` Ian Kent
0 siblings, 1 reply; 6+ messages in thread
From: Stef Bon @ 2008-05-06 9:49 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
Ian Kent wrote:
> On Mon, 2008-05-05 at 16:13 +0200, Stef Bon wrote:
>
>>
>> It's also ok when a line is added. But there are some problems when
>> stopping.
>> When stopping a session (by logging out), the line in
>> /var/run/autofs/auto.master is removed and the
>> daemon gets a reload. Now, when there are no other lines here, and there
>> also no other mountpoints in the main mastermap, the daemon stops.
>>
>
> You'll need to provide a debug log as well as the explanation, ensure
> you are capturing all the output to syslog.
>
>
OK, I've added the debug option. Now I show you what happens.
First at boottime the automount daemon is started, with an empty masterfile:
May 6 10:54:46 localhost automount[5773]: Starting automounter version
5.0.3, master map /etc/autofs/auto.master
May 6 10:54:46 localhost automount[5773]: using kernel protocol version
5.00
May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master:
reading master file /etc/autofs/auto.master
May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init
gathered global options: (null)
May 6 10:54:46 localhost automount[5773]: lookup_read_master:
lookup(file): read entry +/var/run/autofs/auto.master
May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master:
reading master file /var/run/autofs/auto.master
May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init
gathered global options: (null)
May 6 10:54:46 localhost automount[5773]: no mounts in table
May 6 10:54:46 localhost bootlog: Starting automount... [ OK ]
Ok it detects the master file is empty, but it keeps on running.
I can test it with:
[root ~]# /etc/rc.d/init.d/autofs status
automount is running with pid 5773 and map /etc/autofs/auto.master
Then, when a session starts, an entry is added to the
/var/run/autofs/auto.master file:
KDM runs a script after login of sbon:
/etc/session.d/scripts/start/add_network_mountpoint.sh sbon
This command adds a line to the /var/run/autofs/auto.master file and
gives the running daemon a reload signal:
[root ~]# cat /var/run/autofs/auto.master
/home/sbon/Global\ Network /etc/autofs/session/auto.network.sbon -browse
And the logfile gives:
May 6 11:02:40 localhost bootlog: Reloading automount with map
/etc/autofs/auto.master.[ OK ]
May 6 11:02:40 localhost automount[5773]: re-reading master map
/etc/autofs/auto.master
May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master:
reading master file /etc/autofs/auto.master
May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init
gathered global options: (null)
May 6 11:02:40 localhost automount[5773]: lookup_read_master:
lookup(file): read entry +/var/run/autofs/auto.master
May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master:
reading master file /var/run/autofs/auto.master
May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init
gathered global options: (null)
May 6 11:02:40 localhost automount[5773]: lookup_read_master:
lookup(file): read entry /home/sbon/Global\ Network
May 6 11:02:40 localhost automount[5773]: master_do_mount: mounting
/home/sbon/Global Network
May 6 11:02:40 localhost automount[5773]: automount_path_to_fifo: fifo
name /var/run/autofs.fifo-home-sbon-Global Network
May 6 11:02:40 localhost automount[5773]: lookup_nss_read_map: reading
map file /etc/autofs/session/auto.network.sbon
May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init
gathered global options: (null)
May 6 11:02:40 localhost automount[5773]: mounted indirect mount on
/home/sbon/Global Network with timeout 300, freq 75 seconds
May 6 11:02:40 localhost automount[5773]: ghosting enabled
Now checking the contents of /proc/mounts:
[root ~]# cat /proc/mounts
..
..
..
/etc/autofs/session/auto.network.sbon /home/sbon/Global\040Network
autofs rw,fd=5,pgrp=5773,timeout=300,minproto=5,maxproto=5,indirect 0 0
This is the only autofs related line here.
The networkservices are not yet visible to sbon:
[root ~]# ls -A /home/sbon/Global\ Network
(no output here)
so there is another script which activates the networks (it needs to be
run with permissions of the user logging in:
[sbon ~]$ /opt/kde-4.0/env/50activate_networks.sh
: Activating network Windows Network
: Activating network SSH hosts
Now the log file:
May 6 11:13:42 localhost automount[5773]: expire_cleanup: got thid
3083566000 path /home/sbon/Global Network stat 0
May 6 11:13:42 localhost automount[5773]: expire_cleanup: sigchld: exp
3083566000 finished, switching from 2 to 1
May 6 11:13:42 localhost automount[5773]: st_ready: st_ready(): state =
2 path /home/sbon/Global Network
May 6 11:14:46 localhost : Activating network Windows Network.
May 6 11:14:46 localhost automount[5773]: handle_packet: type = 3
May 6 11:14:46 localhost automount[5773]:
handle_packet_missing_indirect: token 16, name Windows Network, request
pid 6924
May 6 11:14:46 localhost automount[5773]: attempting to mount entry
/home/sbon/Global Network/Windows Network
May 6 11:14:46 localhost automount[5773]: lookup_mount:
lookup(program): looking up Windows Network
May 6 11:14:47 localhost automount[5773]: lookup_mount:
lookup(program): Windows Network ->
-fstype=cifs,credentials=/home/sbon/.autofssession/smb/mount.cred
/BONONLINE/LFS20060812/bononline -rw,ip=192.168.0.2
://LFS20060812/bononline /BONONLINE/LFS20060812/ftp -rw,ip=192.168.0.2
://LFS20060812/ftp /BONONLINE/LFS20060812/sbon -rw,ip=192.168.0.2
://LFS20060812/sbon /BONONLINE/LFS20060812/video
-rw,ip=192.168.0.2://LFS20060812/video
/CWWERKGROEP/ROUTER/cwdocumenten -rw,ip=192.168.0.1
://ROUTER/cwdocumenten /CWWERKGROEP/ROUTER/public -rw,ip=192.168.0.1
://ROUTER/public /CWWERKGROEP/ROUTER/sbon -rw,ip=192.168.0.1 ://ROUTER/sbon
A lot more messages about parse_mapent: gathered options,
mount_multi-triggers.
Futher in the log file:
May 6 11:14:47 localhost : Activating network SSH hosts.
May 6 11:14:47 localhost automount[5773]: handle_packet: type = 3
May 6 11:14:47 localhost automount[5773]:
handle_packet_missing_indirect: token 17, name SSH hosts, request pid 7052
May 6 11:14:47 localhost automount[5773]: attempting to mount entry
/home/sbon/Global Network/SSH hosts
May 6 11:14:47 localhost automount[5773]: lookup_mount:
lookup(program): looking up SSH hosts
May 6 11:14:47 localhost automount[5773]: lookup_mount:
lookup(program): SSH hosts -> -fstype=sshfs /151.1.143.116
-rw,nodev,nonempty,noatime ://sbon@151.1.143.116:/ /192.168.0.3
-rw,nodev,nonempty,noatime ://sbon@192.168.0.3:/ /192.168.0.1
-rw,nodev,nonempty,noatime ://sbon@192.168.0.1:/ /192.168.0.15
-rw,nodev,nonempty,noatime ://sbon@192.168.0.15:/ /195.243.111.226
-rw,nodev,nonempty,noatime ://sbon@195.243.111.226:/ /192.168.0.10
-rw,nodev,nonempty,noatime ://sbon@192.168.0.10:/ /192.168.0.2
-rw,nodev,nonempty,noatime ://sbon@192.168.0.2:/
/87.212.7.82-rw,nodev,nonempty,noatime ://sbon@87.212.7.82:/
Also here a lot of messages like mount_autofs_offset,
mount_multi_triggers, but that's normal I guess.
The networks are now visible:
[sbon ~]$ ls -A ~/Global\ Network
SSH hosts Windows Network
and I can browse it. When I do not do that, I get messages like:
May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list:
deleting offset key /home/sbon/Global Network/Windows
Network/CWWERKGROEP/ROUTER/public
May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list:
deleting offset key /home/sbon/Global Network/Windows
Network/CWWERKGROEP/ROUTER/sbon
May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
directory /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER
May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
directory /home/sbon/Global Network/Windows Network/CWWERKGROEP
May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
directory /home/sbon/Global Network/Windows Network/BONONLINE/LFS20060812
May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
directory /home/sbon/Global Network/Windows Network/BONONLINE
May 6 11:19:47 localhost automount[5773]: expired /home/sbon/Global
Network/Windows Network
So far so good, this is to be expected, the timeout (5 min) has expired.
But the toplevel directories still exists:
[sbon ~]$ ls -A ~/Global\ Network
SSH hosts Windows Network
But when I (sbon) logout, another script is run by KDM. It removes the
line from the /var/run/autofs/auto.master file and gives the running
daemon a reload signal (HUP):
[root ~]# /etc/session.d/scripts/stop/stop_automount_session.sh sbon
:Reloading the automount daemon.
Reloading automount with map /etc/autofs/auto.master
[root ~]# ps aux | grep automount
root 8186 0.0 0.0 3764 604 pts/1 S+ 11:32 0:00 grep
automount
The /var/run/autofs/auto.master file is indeed empty:
root ~]# ls -al /var/run/autofs/auto.master
-rw-r--r-- 1 root root 0 2008-05-06 11:32 auto.master
The logfile:
May 6 11:32:15 localhost : Reloading the automount daemon.
May 6 11:32:15 localhost bootlog: Reloading automount with map
/etc/autofs/auto.master.[ OK ]
May 6 11:32:15 localhost automount[5773]: re-reading master map
/etc/autofs/auto.master
May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master:
reading master file /etc/autofs/auto.master
May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init
gathered global options: (null)
May 6 11:32:15 localhost automount[5773]: lookup_read_master:
lookup(file): read entry +/var/run/autofs/auto.master
May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master:
reading master file /var/run/autofs/auto.master
May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init
gathered global options: (null)
May 6 11:32:15 localhost automount[5773]: shutdown_entry:
/home/sbon/Global Network
May 6 11:32:15 localhost automount[5773]: st_prepare_shutdown: state 1
path /home/sbon/Global Network
May 6 11:32:15 localhost automount[5773]: expire_proc: exp_proc =
3080784816 path /home/sbon/Global Network
May 6 11:32:15 localhost automount[5773]: expire_cleanup: got thid
3080784816 path /home/sbon/Global Network stat 0
May 6 11:32:15 localhost automount[5773]: expire_cleanup: sigchld: exp
3080784816 finished, switching from 5 to 7
May 6 11:32:15 localhost automount[5773]: umount_multi: path
/home/sbon/Global Network incl 0
May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing
directory /home/sbon/Global Network/Windows Network
May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing
directory /home/sbon/Global Network/SSH hosts
May 6 11:32:15 localhost automount[5773]: umounted indirect mount
/home/sbon/Global Network
May 6 11:32:15 localhost automount[5773]: automount_path_to_fifo: fifo
name /var/run/autofs.fifo-home-sbon-Global Network
May 6 11:32:15 localhost automount[5773]: shut down path
/home/sbon/Global Network
May 6 11:32:15 localhost automount[5773]: autofs stopped
So this is what happens.
The messages the init script gives are maybe not very familiar. I've
written this script myself. But it's sure
it gives the right signal.
Futher I've compiled autofs with the following options:
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
--without-sasl --without-hesiod --enable-force-shutdown
I hope this helps.
Cheers,
Stef Bon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Some reload problems.
2008-05-06 9:49 ` Stef Bon
@ 2008-05-07 13:11 ` Ian Kent
2008-05-07 16:01 ` Stef Bon
0 siblings, 1 reply; 6+ messages in thread
From: Ian Kent @ 2008-05-07 13:11 UTC (permalink / raw)
To: Stef Bon; +Cc: autofs
On Tue, 2008-05-06 at 11:49 +0200, Stef Bon wrote:
> Ian Kent wrote:
> > On Mon, 2008-05-05 at 16:13 +0200, Stef Bon wrote:
> >
> >>
> >> It's also ok when a line is added. But there are some problems when
> >> stopping.
> >> When stopping a session (by logging out), the line in
> >> /var/run/autofs/auto.master is removed and the
> >> daemon gets a reload. Now, when there are no other lines here, and there
> >> also no other mountpoints in the main mastermap, the daemon stops.
> >>
> >
> > You'll need to provide a debug log as well as the explanation, ensure
> > you are capturing all the output to syslog.
> >
> >
> OK, I've added the debug option. Now I show you what happens.
>
> First at boottime the automount daemon is started, with an empty masterfile:
>
> May 6 10:54:46 localhost automount[5773]: Starting automounter version
> 5.0.3, master map /etc/autofs/auto.master
> May 6 10:54:46 localhost automount[5773]: using kernel protocol version
> 5.00
> May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master:
> reading master file /etc/autofs/auto.master
> May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init
> gathered global options: (null)
> May 6 10:54:46 localhost automount[5773]: lookup_read_master:
> lookup(file): read entry +/var/run/autofs/auto.master
> May 6 10:54:46 localhost automount[5773]: lookup_nss_read_master:
> reading master file /var/run/autofs/auto.master
> May 6 10:54:46 localhost automount[5773]: parse_init: parse(sun): init
> gathered global options: (null)
> May 6 10:54:46 localhost automount[5773]: no mounts in table
> May 6 10:54:46 localhost bootlog: Starting automount... [ OK ]
>
> Ok it detects the master file is empty, but it keeps on running.
> I can test it with:
> [root ~]# /etc/rc.d/init.d/autofs status
> automount is running with pid 5773 and map /etc/autofs/auto.master
>
> Then, when a session starts, an entry is added to the
> /var/run/autofs/auto.master file:
> KDM runs a script after login of sbon:
>
> /etc/session.d/scripts/start/add_network_mountpoint.sh sbon
>
> This command adds a line to the /var/run/autofs/auto.master file and
> gives the running daemon a reload signal:
> [root ~]# cat /var/run/autofs/auto.master
> /home/sbon/Global\ Network /etc/autofs/session/auto.network.sbon -browse
>
> And the logfile gives:
>
>
> May 6 11:02:40 localhost bootlog: Reloading automount with map
> /etc/autofs/auto.master.[ OK ]
> May 6 11:02:40 localhost automount[5773]: re-reading master map
> /etc/autofs/auto.master
> May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master:
> reading master file /etc/autofs/auto.master
> May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init
> gathered global options: (null)
> May 6 11:02:40 localhost automount[5773]: lookup_read_master:
> lookup(file): read entry +/var/run/autofs/auto.master
> May 6 11:02:40 localhost automount[5773]: lookup_nss_read_master:
> reading master file /var/run/autofs/auto.master
> May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init
> gathered global options: (null)
> May 6 11:02:40 localhost automount[5773]: lookup_read_master:
> lookup(file): read entry /home/sbon/Global\ Network
> May 6 11:02:40 localhost automount[5773]: master_do_mount: mounting
> /home/sbon/Global Network
> May 6 11:02:40 localhost automount[5773]: automount_path_to_fifo: fifo
> name /var/run/autofs.fifo-home-sbon-Global Network
> May 6 11:02:40 localhost automount[5773]: lookup_nss_read_map: reading
> map file /etc/autofs/session/auto.network.sbon
> May 6 11:02:40 localhost automount[5773]: parse_init: parse(sun): init
> gathered global options: (null)
> May 6 11:02:40 localhost automount[5773]: mounted indirect mount on
> /home/sbon/Global Network with timeout 300, freq 75 seconds
> May 6 11:02:40 localhost automount[5773]: ghosting enabled
>
> Now checking the contents of /proc/mounts:
> [root ~]# cat /proc/mounts
> ..
> ..
> ..
> /etc/autofs/session/auto.network.sbon /home/sbon/Global\040Network
> autofs rw,fd=5,pgrp=5773,timeout=300,minproto=5,maxproto=5,indirect 0 0
>
> This is the only autofs related line here.
>
> The networkservices are not yet visible to sbon:
>
> [root ~]# ls -A /home/sbon/Global\ Network
>
> (no output here)
> so there is another script which activates the networks (it needs to be
> run with permissions of the user logging in:
>
> [sbon ~]$ /opt/kde-4.0/env/50activate_networks.sh
> : Activating network Windows Network
> : Activating network SSH hosts
>
> Now the log file:
>
> May 6 11:13:42 localhost automount[5773]: expire_cleanup: got thid
> 3083566000 path /home/sbon/Global Network stat 0
> May 6 11:13:42 localhost automount[5773]: expire_cleanup: sigchld: exp
> 3083566000 finished, switching from 2 to 1
> May 6 11:13:42 localhost automount[5773]: st_ready: st_ready(): state =
> 2 path /home/sbon/Global Network
> May 6 11:14:46 localhost : Activating network Windows Network.
> May 6 11:14:46 localhost automount[5773]: handle_packet: type = 3
> May 6 11:14:46 localhost automount[5773]:
> handle_packet_missing_indirect: token 16, name Windows Network, request
> pid 6924
> May 6 11:14:46 localhost automount[5773]: attempting to mount entry
> /home/sbon/Global Network/Windows Network
> May 6 11:14:46 localhost automount[5773]: lookup_mount:
> lookup(program): looking up Windows Network
> May 6 11:14:47 localhost automount[5773]: lookup_mount:
> lookup(program): Windows Network ->
> -fstype=cifs,credentials=/home/sbon/.autofssession/smb/mount.cred
> /BONONLINE/LFS20060812/bononline -rw,ip=192.168.0.2
> ://LFS20060812/bononline /BONONLINE/LFS20060812/ftp -rw,ip=192.168.0.2
> ://LFS20060812/ftp /BONONLINE/LFS20060812/sbon -rw,ip=192.168.0.2
> ://LFS20060812/sbon /BONONLINE/LFS20060812/video
> -rw,ip=192.168.0.2://LFS20060812/video
> /CWWERKGROEP/ROUTER/cwdocumenten -rw,ip=192.168.0.1
> ://ROUTER/cwdocumenten /CWWERKGROEP/ROUTER/public -rw,ip=192.168.0.1
> ://ROUTER/public /CWWERKGROEP/ROUTER/sbon -rw,ip=192.168.0.1 ://ROUTER/sbon
>
>
> A lot more messages about parse_mapent: gathered options,
> mount_multi-triggers.
> Futher in the log file:
>
> May 6 11:14:47 localhost : Activating network SSH hosts.
> May 6 11:14:47 localhost automount[5773]: handle_packet: type = 3
> May 6 11:14:47 localhost automount[5773]:
> handle_packet_missing_indirect: token 17, name SSH hosts, request pid 7052
> May 6 11:14:47 localhost automount[5773]: attempting to mount entry
> /home/sbon/Global Network/SSH hosts
> May 6 11:14:47 localhost automount[5773]: lookup_mount:
> lookup(program): looking up SSH hosts
> May 6 11:14:47 localhost automount[5773]: lookup_mount:
> lookup(program): SSH hosts -> -fstype=sshfs /151.1.143.116
> -rw,nodev,nonempty,noatime ://sbon@151.1.143.116:/ /192.168.0.3
> -rw,nodev,nonempty,noatime ://sbon@192.168.0.3:/ /192.168.0.1
> -rw,nodev,nonempty,noatime ://sbon@192.168.0.1:/ /192.168.0.15
> -rw,nodev,nonempty,noatime ://sbon@192.168.0.15:/ /195.243.111.226
> -rw,nodev,nonempty,noatime ://sbon@195.243.111.226:/ /192.168.0.10
> -rw,nodev,nonempty,noatime ://sbon@192.168.0.10:/ /192.168.0.2
> -rw,nodev,nonempty,noatime ://sbon@192.168.0.2:/
> /87.212.7.82-rw,nodev,nonempty,noatime ://sbon@87.212.7.82:/
>
> Also here a lot of messages like mount_autofs_offset,
> mount_multi_triggers, but that's normal I guess.
>
> The networks are now visible:
>
> [sbon ~]$ ls -A ~/Global\ Network
> SSH hosts Windows Network
>
> and I can browse it. When I do not do that, I get messages like:
>
> May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list:
> deleting offset key /home/sbon/Global Network/Windows
> Network/CWWERKGROEP/ROUTER/public
> May 6 11:19:47 localhost automount[5773]: cache_delete_offset_list:
> deleting offset key /home/sbon/Global Network/Windows
> Network/CWWERKGROEP/ROUTER/sbon
> May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
> directory /home/sbon/Global Network/Windows Network/CWWERKGROEP/ROUTER
> May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
> directory /home/sbon/Global Network/Windows Network/CWWERKGROEP
> May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
> directory /home/sbon/Global Network/Windows Network/BONONLINE/LFS20060812
> May 6 11:19:47 localhost automount[5773]: rm_unwanted_fn: removing
> directory /home/sbon/Global Network/Windows Network/BONONLINE
> May 6 11:19:47 localhost automount[5773]: expired /home/sbon/Global
> Network/Windows Network
>
> So far so good, this is to be expected, the timeout (5 min) has expired.
> But the toplevel directories still exists:
>
> [sbon ~]$ ls -A ~/Global\ Network
> SSH hosts Windows Network
>
> But when I (sbon) logout, another script is run by KDM. It removes the
> line from the /var/run/autofs/auto.master file and gives the running
> daemon a reload signal (HUP):
>
> [root ~]# /etc/session.d/scripts/stop/stop_automount_session.sh sbon
> :Reloading the automount daemon.
> Reloading automount with map /etc/autofs/auto.master
> [root ~]# ps aux | grep automount
> root 8186 0.0 0.0 3764 604 pts/1 S+ 11:32 0:00 grep
> automount
>
> The /var/run/autofs/auto.master file is indeed empty:
>
> root ~]# ls -al /var/run/autofs/auto.master
> -rw-r--r-- 1 root root 0 2008-05-06 11:32 auto.master
>
> The logfile:
> May 6 11:32:15 localhost : Reloading the automount daemon.
> May 6 11:32:15 localhost bootlog: Reloading automount with map
> /etc/autofs/auto.master.[ OK ]
> May 6 11:32:15 localhost automount[5773]: re-reading master map
> /etc/autofs/auto.master
> May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master:
> reading master file /etc/autofs/auto.master
> May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init
> gathered global options: (null)
> May 6 11:32:15 localhost automount[5773]: lookup_read_master:
> lookup(file): read entry +/var/run/autofs/auto.master
> May 6 11:32:15 localhost automount[5773]: lookup_nss_read_master:
> reading master file /var/run/autofs/auto.master
> May 6 11:32:15 localhost automount[5773]: parse_init: parse(sun): init
> gathered global options: (null)
> May 6 11:32:15 localhost automount[5773]: shutdown_entry:
> /home/sbon/Global Network
> May 6 11:32:15 localhost automount[5773]: st_prepare_shutdown: state 1
> path /home/sbon/Global Network
> May 6 11:32:15 localhost automount[5773]: expire_proc: exp_proc =
> 3080784816 path /home/sbon/Global Network
> May 6 11:32:15 localhost automount[5773]: expire_cleanup: got thid
> 3080784816 path /home/sbon/Global Network stat 0
> May 6 11:32:15 localhost automount[5773]: expire_cleanup: sigchld: exp
> 3080784816 finished, switching from 5 to 7
> May 6 11:32:15 localhost automount[5773]: umount_multi: path
> /home/sbon/Global Network incl 0
> May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing
> directory /home/sbon/Global Network/Windows Network
> May 6 11:32:15 localhost automount[5773]: rm_unwanted_fn: removing
> directory /home/sbon/Global Network/SSH hosts
> May 6 11:32:15 localhost automount[5773]: umounted indirect mount
> /home/sbon/Global Network
> May 6 11:32:15 localhost automount[5773]: automount_path_to_fifo: fifo
> name /var/run/autofs.fifo-home-sbon-Global Network
> May 6 11:32:15 localhost automount[5773]: shut down path
> /home/sbon/Global Network
> May 6 11:32:15 localhost automount[5773]: autofs stopped
>
> So this is what happens.
So, autofs just exits.
The problem is that autofs needs to know when to exit and that amounts
to checking if any active mounts are left. But that check breaks down
because we need to avoid it unless we've actually been asked to shutdown
and, at the moment, this isn't known to the function that does the
check. The condition is checked every time a mount point shuts down.
I think I can fix this fairly easily but, for it to be a simple fix, we
will need a patch I'm working on to be merged first.
So you're stuck, for a while anyway.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Some reload problems.
2008-05-07 13:11 ` Ian Kent
@ 2008-05-07 16:01 ` Stef Bon
0 siblings, 0 replies; 6+ messages in thread
From: Stef Bon @ 2008-05-07 16:01 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
Ian Kent wrote:
>> May 6 11:32:15 localhost automount[5773]: autofs stopped
>>
>> So this is what happens.
>>
>
> So, autofs just exits.
>
> The problem is that autofs needs to know when to exit and that amounts
> to checking if any active mounts are left. But that check breaks down
> because we need to avoid it unless we've actually been asked to shutdown
> and, at the moment, this isn't known to the function that does the
> check. The condition is checked every time a mount point shuts down.
>
> I think I can fix this fairly easily but, for it to be a simple fix, we
> will need a patch I'm working on to be merged first.
>
> So you're stuck, for a while anyway.
>
Well I'm not really stuck. The way I've solved it is to add another
mountpoint to /etc/autofs/auto.master
which remains there. Then there is no problem.
And I can wait.
Thank you for looking to this problem.
With all these steps I hope I can create a contruction which allows a
more powerfull access to network resources
than there exist today.
Stef Bon
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-07 16:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 14:13 Some reload problems Stef Bon
2008-05-05 14:29 ` Stef Bon
2008-05-05 15:06 ` Ian Kent
2008-05-06 9:49 ` Stef Bon
2008-05-07 13:11 ` Ian Kent
2008-05-07 16:01 ` Stef Bon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.