* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 1:48 ` Steinar H. Gunderson
@ 2005-02-15 2:04 ` Steinar H. Gunderson
2005-02-15 14:07 ` Steinar H. Gunderson
2005-02-15 13:46 ` Jeff Moyer
` (3 subsequent siblings)
4 siblings, 1 reply; 24+ messages in thread
From: Steinar H. Gunderson @ 2005-02-15 2:04 UTC (permalink / raw)
To: autofs
On Tue, Feb 15, 2005 at 02:48:57AM +0100, Steinar H. Gunderson wrote:
> Apart from that, looks like everything went in; I'm building a new version
> now and will upload after I get your feedback on the points above.
I just found another bug; on upgrades, autofs attempts to restart itself,
which invokes "debian stop"; this invokes something like
start-stop-daemon --stop --quiet --retry USR2/$DAEMON_EXIT_WAIT --pidfile $file --exec /usr/sbin/automount
The problem here is that the pid does not really run /usr/sbin/automount
anymore; or more correctly, /proc/<pid>/exe does not point to the current
/usr/sbin/automount, it points to the _old_ /usr/sbin/automount, and that
version was just removed as part of the upgrade. Thus, the stop fails, and the
entire upgrade fails.
Any good ideas? Stripping the --exec would be the easiest solution, but
perhaps also the ugliest...
/* Steinar */
--
Homepage: http://www.sesse.net/
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 2:04 ` Steinar H. Gunderson
@ 2005-02-15 14:07 ` Steinar H. Gunderson
2005-02-15 14:47 ` raven
0 siblings, 1 reply; 24+ messages in thread
From: Steinar H. Gunderson @ 2005-02-15 14:07 UTC (permalink / raw)
To: autofs
On Tue, Feb 15, 2005 at 03:04:14AM +0100, Steinar H. Gunderson wrote:
> Any good ideas? Stripping the --exec would be the easiest solution, but
> perhaps also the ugliest...
OK, I found the bug; autofs was not stopped on prerm (this was disabled to
"fix" another bug). I've reverted the changes and made some workarounds; they
are not relevant for autofs upstream, but will be part of the next Debian
package.
/* Steinar */
--
Homepage: http://www.sesse.net/
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 14:07 ` Steinar H. Gunderson
@ 2005-02-15 14:47 ` raven
2005-02-15 15:26 ` Steinar H. Gunderson
0 siblings, 1 reply; 24+ messages in thread
From: raven @ 2005-02-15 14:47 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
On Tue, 15 Feb 2005, Steinar H. Gunderson wrote:
> On Tue, Feb 15, 2005 at 03:04:14AM +0100, Steinar H. Gunderson wrote:
>> Any good ideas? Stripping the --exec would be the easiest solution, but
>> perhaps also the ugliest...
>
> OK, I found the bug; autofs was not stopped on prerm (this was disabled to
> "fix" another bug). I've reverted the changes and made some workarounds; they
> are not relevant for autofs upstream, but will be part of the next Debian
> package.
Except I'd like a patch for my Debian kit please.
Ian
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 1:48 ` Steinar H. Gunderson
2005-02-15 2:04 ` Steinar H. Gunderson
@ 2005-02-15 13:46 ` Jeff Moyer
2005-02-15 14:02 ` Steinar H. Gunderson
2005-02-15 14:33 ` Jeff Moyer
` (2 subsequent siblings)
4 siblings, 1 reply; 24+ messages in thread
From: Jeff Moyer @ 2005-02-15 13:46 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
==> Regarding Re: [autofs] [ANNOUNCE] autofs 4.1.4 beta2 release; "Steinar H. Gunderson" <sgunderson@bigfoot.com> adds:
sgunderson> On Mon, Feb 14, 2005 at 10:39:51PM +0800, raven@themaw.net
sgunderson> wrote:
>> Here is autofs 4.1.4 beta2.
sgunderson> Thanks! :-)
sgunderson> I've gone through all the Debian patches again, and this needs
sgunderson> looking into:
sgunderson> - 000_autofs_4.1.3_sock-leak-fix is missing.
Could you post this patch, please? I'm almost certain this fix is in the
tree.
Thanks!
-Jeff
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 13:46 ` Jeff Moyer
@ 2005-02-15 14:02 ` Steinar H. Gunderson
2005-02-15 14:28 ` Jeff Moyer
0 siblings, 1 reply; 24+ messages in thread
From: Steinar H. Gunderson @ 2005-02-15 14:02 UTC (permalink / raw)
To: autofs
On Tue, Feb 15, 2005 at 08:46:24AM -0500, Jeff Moyer wrote:
> Could you post this patch, please? I'm almost certain this fix is in the
> tree.
http://home.samfundet.no/~sesse/000_autofs_4.1.3_sock-leak-fix
/* Steinar */
--
Homepage: http://www.sesse.net/
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 14:02 ` Steinar H. Gunderson
@ 2005-02-15 14:28 ` Jeff Moyer
2005-02-15 14:48 ` raven
0 siblings, 1 reply; 24+ messages in thread
From: Jeff Moyer @ 2005-02-15 14:28 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
==> Regarding Re: [autofs] [ANNOUNCE] autofs 4.1.4 beta2 release; "Steinar H. Gunderson" <sgunderson@bigfoot.com> adds:
sgunderson> On Tue, Feb 15, 2005 at 08:46:24AM -0500, Jeff Moyer wrote:
>> Could you post this patch, please? I'm almost certain this fix is in the
>> tree.
sgunderson> http://home.samfundet.no/~sesse/000_autofs_4.1.3_sock-leak-fix
We solved this problem a different way. If we pass RPC_ANYSOCK to the
portmapper, it will use a reserved port by default for communications. To
keep it from doing that, we create the socket ourselves. We then do this:
clnt_control(client, CLSET_FD_CLOSE, NULL);
Which tells the rpc layer to close the socket for us when we destroy the
client. As such, there is no socket leak.
Thanks,
Jeff
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 14:28 ` Jeff Moyer
@ 2005-02-15 14:48 ` raven
0 siblings, 0 replies; 24+ messages in thread
From: raven @ 2005-02-15 14:48 UTC (permalink / raw)
To: Jeff Moyer; +Cc: autofs
On Tue, 15 Feb 2005, Jeff Moyer wrote:
> ==> Regarding Re: [autofs] [ANNOUNCE] autofs 4.1.4 beta2 release; "Steinar H. Gunderson" <sgunderson@bigfoot.com> adds:
>
> sgunderson> On Tue, Feb 15, 2005 at 08:46:24AM -0500, Jeff Moyer wrote:
>>> Could you post this patch, please? I'm almost certain this fix is in the
>>> tree.
>
> sgunderson> http://home.samfundet.no/~sesse/000_autofs_4.1.3_sock-leak-fix
>
> We solved this problem a different way. If we pass RPC_ANYSOCK to the
> portmapper, it will use a reserved port by default for communications. To
> keep it from doing that, we create the socket ourselves. We then do this:
>
> clnt_control(client, CLSET_FD_CLOSE, NULL);
>
> Which tells the rpc layer to close the socket for us when we destroy the
> client. As such, there is no socket leak.
Yep. The patch was a bit out of date.
Thanks Jeff.
Ian
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 1:48 ` Steinar H. Gunderson
2005-02-15 2:04 ` Steinar H. Gunderson
2005-02-15 13:46 ` Jeff Moyer
@ 2005-02-15 14:33 ` Jeff Moyer
2005-02-15 14:44 ` Jeff Moyer
2005-02-15 14:52 ` raven
2005-02-15 14:53 ` raven
4 siblings, 1 reply; 24+ messages in thread
From: Jeff Moyer @ 2005-02-15 14:33 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
==> Regarding Re: [autofs] [ANNOUNCE] autofs 4.1.4 beta2 release; "Steinar H. Gunderson" <sgunderson@bigfoot.com> adds:
sgunderson> On Mon, Feb 14, 2005 at 10:39:51PM +0800, raven@themaw.net
sgunderson> wrote:
>> Here is autofs 4.1.4 beta2.
sgunderson> Thanks! :-)
sgunderson> I've gone through all the Debian patches again, and this needs
sgunderson> looking into:
sgunderson> 035_program_mount_repeated_last_character_of_map_output is in
sgunderson> there, but there looks like there's an identical situation
sgunderson> further down. Could you investigate? (I'm not really sure if it
sgunderson> is an error or not, to be honest, I just want it checked. :-) )
Yes, looks like a problem to me. Thanks! Attached is a patch.
-Jeff
--- autofs-4.1.4_beta2/modules/lookup_program.c.program-map-stderr-extra-char 2005-02-15 09:30:46.672165592 -0500
+++ autofs-4.1.4_beta2/modules/lookup_program.c 2005-02-15 09:31:23.840515144 -0500
@@ -237,6 +237,7 @@ int lookup_mount(const char *root, const
if (read(epipefd[0], &ch, 1) < 1) {
FD_CLR(epipefd[0], &ourfds);
files_left--;
+ state = st_done;
} else if (ch == '\n') {
*errp = '\0';
if (errbuf[0])
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 14:33 ` Jeff Moyer
@ 2005-02-15 14:44 ` Jeff Moyer
2005-02-15 14:46 ` Steinar H. Gunderson
0 siblings, 1 reply; 24+ messages in thread
From: Jeff Moyer @ 2005-02-15 14:44 UTC (permalink / raw)
To: Steinar H. Gunderson, autofs
==> Regarding Re: [autofs] [ANNOUNCE] autofs 4.1.4 beta2 release; Jeff Moyer <jmoyer@redhat.com> adds:
==> Regarding Re: [autofs] [ANNOUNCE] autofs 4.1.4 beta2 release; "Steinar H. Gunderson" <sgunderson@bigfoot.com> adds:
sgunderson> On Mon, Feb 14, 2005 at 10:39:51PM +0800, raven@themaw.net
sgunderson> wrote:
>>> Here is autofs 4.1.4 beta2.
sgunderson> Thanks! :-)
sgunderson> I've gone through all the Debian patches again, and this needs
sgunderson> looking into:
sgunderson> 035_program_mount_repeated_last_character_of_map_output is in
sgunderson> there, but there looks like there's an identical situation
sgunderson> further down. Could you investigate? (I'm not really sure if it
sgunderson> is an error or not, to be honest, I just want it checked. :-) )
jmoyer> Yes, looks like a problem to me. Thanks! Attached is a patch.
Actually, I fired too quickly on this one. stderr is used for the error
reporting, so we shouldn't mark the state as done until we've read
everything from stdout.
-Jeff
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 1:48 ` Steinar H. Gunderson
` (2 preceding siblings ...)
2005-02-15 14:33 ` Jeff Moyer
@ 2005-02-15 14:52 ` raven
2005-02-15 14:53 ` raven
4 siblings, 0 replies; 24+ messages in thread
From: raven @ 2005-02-15 14:52 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
On Tue, 15 Feb 2005, Steinar H. Gunderson wrote:
> - 051_maps_without_trailing_newline.diff is not in, it seems; did you forget
> it or just find a cleaner way?
I think you'll find that this handles the issue (if I understand it
correctly).
Index: modules/lookup_file.c
===================================================================
RCS file: /home/cvs/root/autofs/modules/lookup_file.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- modules/lookup_file.c 26 Jan 2005 05:31:38 -0000 1.13
+++ modules/lookup_file.c 6 Feb 2005 10:05:55 -0000 1.14
@@ -1,4 +1,4 @@
-#ident "$Id: lookup_file.c,v 1.13 2005/01/26 05:31:38 raven Exp $"
+#ident "$Id: lookup_file.c,v 1.14 2005/02/06 10:05:55 raven Exp $"
/* ----------------------------------------------------------------------- *
*
* lookup_file.c - module for Linux automount to query a flat file map
@@ -202,6 +202,11 @@
} else if (mapent_len < MAPENT_MAX_LEN) {
mapent_len++;
*(p++) = ch;
+ nch = getc(f);
+ if (nch == EOF &&
+ (gotten == got_real || gotten == getting))
+ goto got_it;
+ ungetc(nch, f);
}
break;
}
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 1:48 ` Steinar H. Gunderson
` (3 preceding siblings ...)
2005-02-15 14:52 ` raven
@ 2005-02-15 14:53 ` raven
2005-02-15 15:04 ` raven
4 siblings, 1 reply; 24+ messages in thread
From: raven @ 2005-02-15 14:53 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
On Tue, 15 Feb 2005, Steinar H. Gunderson wrote:
> - The check for /proc/modules does not seem to have went in (see
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=292762).
I though I checks this?
Or have you changed the bug id?
Ian
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 14:53 ` raven
@ 2005-02-15 15:04 ` raven
2005-02-15 15:16 ` raven
2005-02-15 15:28 ` Steinar H. Gunderson
0 siblings, 2 replies; 24+ messages in thread
From: raven @ 2005-02-15 15:04 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
On Tue, 15 Feb 2005 raven@themaw.net wrote:
> On Tue, 15 Feb 2005, Steinar H. Gunderson wrote:
>
>> - The check for /proc/modules does not seem to have went in (see
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=292762).
>
> I though I checks this?
>
> Or have you changed the bug id?
I've read the bug report you refer to but if I'm to get it right you need
to provide a patch.
Ian
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 15:04 ` raven
@ 2005-02-15 15:16 ` raven
2005-02-15 15:31 ` Steinar H. Gunderson
2005-02-15 15:28 ` Steinar H. Gunderson
1 sibling, 1 reply; 24+ messages in thread
From: raven @ 2005-02-15 15:16 UTC (permalink / raw)
To: Steinar H. Gunderson; +Cc: autofs
On Tue, 15 Feb 2005 raven@themaw.net wrote:
> On Tue, 15 Feb 2005 raven@themaw.net wrote:
>
>> On Tue, 15 Feb 2005, Steinar H. Gunderson wrote:
>>
>>> - The check for /proc/modules does not seem to have went in (see
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=292762).
>>
>> I though I checks this?
>>
>> Or have you changed the bug id?
>
> I've read the bug report you refer to but if I'm to get it right you need to
> provide a patch.
Is this what you're seeking?
Index: samples/rc.autofs.in
===================================================================
RCS file: /home/cvs/root/autofs/samples/rc.autofs.in,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- samples/rc.autofs.in 10 Feb 2005 14:30:07 -0000 1.47
+++ samples/rc.autofs.in 15 Feb 2005 15:27:34 -0000 1.48
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# $Id: rc.autofs.in,v 1.47 2005/02/10 14:30:07 raven Exp $
+# $Id: rc.autofs.in,v 1.48 2005/02/15 15:27:34 raven Exp $
#
# rc file for automount using a Sun-style "master map".
# We first look for a local /etc/auto.master, then a YP
@@ -604,7 +604,7 @@
# autofs filesystem support not loaded
echo -n ' loading autofs4 kernel module,'
modprobe autofs4 || true
- elif lsmod | grep -q autofs[^4]; then
+ elif ([ -f /proc/modules ] && lsmod) | grep -q autofs[^4]; then
# wrong autofs filesystem module loaded
echo
echo "WARNING: autofs kernel module is loaded, autofs4 needed"
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [ANNOUNCE] autofs 4.1.4 beta2 release
2005-02-15 15:04 ` raven
2005-02-15 15:16 ` raven
@ 2005-02-15 15:28 ` Steinar H. Gunderson
1 sibling, 0 replies; 24+ messages in thread
From: Steinar H. Gunderson @ 2005-02-15 15:28 UTC (permalink / raw)
To: autofs
On Tue, Feb 15, 2005 at 11:04:59PM +0800, raven@themaw.net wrote:
>>> - The check for /proc/modules does not seem to have went in (see
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=292762).
>> I though I checks this?
>>
>> Or have you changed the bug id?
> I've read the bug report you refer to but if I'm to get it right you need
> to provide a patch.
http://home.samfundet.no/~sesse/052_292762_dont_lsmod_on_monolithic_kernels
-- as you can see, it checks that /proc/modules exists (which it only does on
kernels with module support) before calling lsmod. Of course, if /proc isn't
mounted, this breaks, but if /proc isn't mounted something is quite broken
anyhow...
/* Steinar */
--
Homepage: http://www.sesse.net/
^ permalink raw reply [flat|nested] 24+ messages in thread