So I'm getting intermittent NFS mount failures with this start on:
start on (started portmap ON_BOOT=
or (mounting TYPE=nfs)
or local-filesystems and started portmap ON_BOOT=y)
statd always ends up started.. but the mounts don't work.
The reason is that local-filesystems and started portmap ON_BOOT=y may come around the same exact time as mounting TYPE=nfs. If they do, then the mounting event doesn't seem to block on statd's already begun startup, and the mount attempt fails because statd hasn't started yet.
A lame hacky way that I found worked was to add
/etc/init/statd-nomounts.conf
start on starting rc RUNLEVEL=[2345] and started portmap ON_BOOT=y and net-device-up IFACE!=lo
stop on started statd
task
script
# This is *LAME* we need to have a "wait for X to happen" command
sleep 5
exec start statd
end script
The event that is missing, that makes the 'sleep 5' necessary, is the one that mountall would need to emit when it is done processing the SIGUSR1 command sent by mountall-net.
One could also turn it around and have a statd-mounting.conf that fires on mounting TYPE=nfs and then waits for any existing instance of statd to finish starting. That may be more desirable.
Anyway, the above is not a solution, so I'll keep looking at it and hopefully have a solid solution in the next 24 hours.
So I'm getting intermittent NFS mount failures with this start on:
start on (started portmap ON_BOOT=
or (mounting TYPE=nfs)
or local-filesystems and started portmap ON_BOOT=y)
statd always ends up started.. but the mounts don't work.
The reason is that local-filesystems and started portmap ON_BOOT=y may come around the same exact time as mounting TYPE=nfs. If they do, then the mounting event doesn't seem to block on statd's already begun startup, and the mount attempt fails because statd hasn't started yet.
A lame hacky way that I found worked was to add
/etc/init/ statd-nomounts. conf
start on starting rc RUNLEVEL=[2345] and started portmap ON_BOOT=y and net-device-up IFACE!=lo
stop on started statd
task
script
# This is *LAME* we need to have a "wait for X to happen" command
sleep 5
exec start statd
end script
The event that is missing, that makes the 'sleep 5' necessary, is the one that mountall would need to emit when it is done processing the SIGUSR1 command sent by mountall-net.
One could also turn it around and have a statd-mounting.conf that fires on mounting TYPE=nfs and then waits for any existing instance of statd to finish starting. That may be more desirable.
Anyway, the above is not a solution, so I'll keep looking at it and hopefully have a solid solution in the next 24 hours.