All of lore.kernel.org
 help / color / mirror / Atom feed
* Please help
@ 2004-05-02 14:13 raven
  2004-05-03 13:21 ` Jeff Moyer
  2004-05-04 14:44 ` Please help - cleanup raven
  0 siblings, 2 replies; 17+ messages in thread
From: raven @ 2004-05-02 14:13 UTC (permalink / raw)
  To: autofs mailing list


Hi all,

The recent post regarding replicated server mounts has caused me a bit of 
work.

Basically, I broke the functionality a bit when I merged the patch I 
received from Michael Blandford.

I believe the included patch fixes this.

Additionally, while fixing it I stumbled on the "BUG: dir already mounted" 
message that has been annoying us for so long.

I think I've fixed that as well. It's only about my third attempt at it 
so I'm not expecting it's final. Maybe third time lucky.

Anyway, since the change is a bit more than straight forward I'd like 
as many people as can to test it out before I commit and release it in 
4.1.3. I've probably broken something else.

The patch:

diff -Nur autofs-4.1.3.orig/modules/mount_bind.c autofs-4.1.3/modules/mount_bind.c
--- autofs-4.1.3.orig/modules/mount_bind.c	2004-01-30 00:01:22.000000000 +0800
+++ autofs-4.1.3/modules/mount_bind.c	2004-05-02 20:47:53.000000000 +0800
@@ -125,8 +125,8 @@
 		unlink(AUTOFS_LOCK);
 
 		if (err) {
-			if (!ap.ghost || (ap.ghost && !status))
-				rmdir_path(fullpath);
+			if (!ap.ghost && !(*name == '/' && strlen(name)))
+				rmdir_path(name);
 			return 1;
 		} else {
 			debug(MODPREFIX "mounted %s type %s on %s",
diff -Nur autofs-4.1.3.orig/modules/mount_changer.c autofs-4.1.3/modules/mount_changer.c
--- autofs-4.1.3.orig/modules/mount_changer.c	2004-03-07 20:17:54.000000000 +0800
+++ autofs-4.1.3/modules/mount_changer.c	2004-05-02 20:50:53.000000000 +0800
@@ -106,8 +106,8 @@
 	}
 	unlink(AUTOFS_LOCK);
 	if (err) {
-		if (!ap.ghost || (ap.ghost && !status))
-			rmdir_path(fullpath);
+		if (!ap.ghost && !(*name == '/' && strlen(name) == 1))
+			rmdir_path(name);
 
 		error(MODPREFIX "failed to mount %s (type %s) on %s",
 		      what, fstype, fullpath);
diff -Nur autofs-4.1.3.orig/modules/mount_ext2.c autofs-4.1.3/modules/mount_ext2.c
--- autofs-4.1.3.orig/modules/mount_ext2.c	2004-04-22 22:39:08.000000000 +0800
+++ autofs-4.1.3/modules/mount_ext2.c	2004-05-02 20:53:00.000000000 +0800
@@ -116,8 +116,8 @@
 	unlink(AUTOFS_LOCK);
 
 	if (err) {
-		if (!ap.ghost || (ap.ghost && !status))
-			rmdir_path(fullpath);
+		if (!ap.ghost && !(*name == '/' && strlen(name) == 1))
+			rmdir_path(name);
 		error(MODPREFIX "failed to mount %s (type %s) on %s",
 		      what, fstype, fullpath);
 		return 1;
diff -Nur autofs-4.1.3.orig/modules/mount_generic.c autofs-4.1.3/modules/mount_generic.c
--- autofs-4.1.3.orig/modules/mount_generic.c	2004-01-30 00:01:22.000000000 +0800
+++ autofs-4.1.3/modules/mount_generic.c	2004-05-02 20:54:10.000000000 +0800
@@ -85,8 +85,8 @@
 	unlink(AUTOFS_LOCK);
 
 	if (err) {
-		if (!ap.ghost || (ap.ghost && !status))
-			rmdir_path(fullpath);
+		if (!ap.ghost && !(*name == '/' && strlen(name) == 1))
+			rmdir_path(name);
 
 		error(MODPREFIX "failed to mount %s (type %s) on %s",
 		      what, fstype, fullpath);
diff -Nur autofs-4.1.3.orig/modules/mount_nfs.c autofs-4.1.3/modules/mount_nfs.c
--- autofs-4.1.3.orig/modules/mount_nfs.c	2004-04-03 15:14:33.000000000 +0800
+++ autofs-4.1.3/modules/mount_nfs.c	2004-05-02 21:11:53.000000000 +0800
@@ -131,7 +131,6 @@
 
 	while (p && *p) {
 		char *next;
-		int alive = -1;
 
 		p += strspn(p, " \t,");
 		delim = strpbrk(p, "(, \t:");
@@ -187,29 +186,32 @@
 			for (haddr = he->h_addr_list; *haddr; haddr++) {
 				local = is_local_addr(p, *haddr, he->h_length);
 
-				if (local < 0) {
-					local = 0;
-					p = next;
-				}
+				if (local < 0)
+					continue;
 
 				if (local) {
-					alive = rpc_ping(p, sec, micros);
-					if (alive) {
-						winner = p;
-						break;
-					}
-					local = 0;
+					winner = p;
+					break;
 				}
 			}
+			
+			if (local < 0) {
+				local = 0;
+				p = next;
+				continue;
+			}
+
+			if (local)
+				break;
 		}
 
-		/* Are we actually alive */
-		if (!alive || (alive < 0 && !rpc_ping(p, sec, micros))) {
+		/* If it's not local is it alive */
+		if (!local && !rpc_ping(p, sec, micros)) {
 			p = next;
 			continue;
 		}
 
-		/* Not local, see if we have a previous 'winner' */
+		/* see if we have a previous 'winner' */
 		if (!winner) {
 			winner = p;
 		}
@@ -434,8 +436,8 @@
 		unlink(AUTOFS_LOCK);
 
 		if (err) {
-			if (!ap.ghost || (ap.ghost && !status))
-				rmdir_path(fullpath);
+			if (!ap.ghost && !(*name == '/' && strlen(name) == 1))
+				rmdir_path(name);
 			error(MODPREFIX "nfs: mount failure %s on %s",
 			      whatstr, fullpath);
 			return 1;
diff -Nur autofs-4.1.3.orig/modules/parse_sun.c autofs-4.1.3/modules/parse_sun.c
--- autofs-4.1.3.orig/modules/parse_sun.c	2004-02-03 23:23:21.000000000 +0800
+++ autofs-4.1.3/modules/parse_sun.c	2004-05-02 20:31:32.000000000 +0800
@@ -615,15 +615,15 @@
 
 /*
  * syntax is:
- *	[-options] location
- *	[-options] [mountpoint [-options] location]...
+ *	[-options] location [location] ...
+ *	[-options] [mountpoint [-options] location [location] ... ]...
  */
 int parse_mount(const char *root, const char *name,
 		int name_len, const char *mapent, void *context)
 {
 	struct parse_context *ctxt = (struct parse_context *) context;
 	char *pmapent, *options;
-	const char *p;
+	const char *p, *q;
 	int mapent_len, rv;
 	int optlen;
 
@@ -667,6 +667,18 @@
 
 	if (*p == '/') {
 		int l;
+		char *multi_root;
+
+		multi_root = alloca(strlen(root) + name_len + 2);
+		if (!multi_root) {
+			error(MODPREFIX "alloca: %m");
+			free(options);
+			return 1;
+		}
+
+		strcpy(multi_root, root);
+		strcat(multi_root, "/");
+		strcat(multi_root, name);
 
 		/* It's a multi-mount; deal with it */
 		do {
@@ -705,7 +717,15 @@
 				} while (*p == '-');
 			}
 
-			loc = dequote(p, l = chunklen(p, 1));
+			q = p;
+			while (*q && *q != '/') {
+				l = chunklen(q, 1);
+				q += l;
+				q = skipspace(q);
+			}
+			l = q - p;
+
+			loc = dequote(p, l);
 			loclen = strlen(loc);
 
 			if (loc == NULL || path == NULL) {
@@ -723,7 +743,7 @@
 			      "multimount: %.*s on %.*s with options %s",
 			      loclen, loc, pathlen, path, myoptions);
 
-			rv = sun_mount(root, name, name_len, path, pathlen, loc, loclen,
+			rv = sun_mount(multi_root, path, pathlen, "/", 1, loc, loclen,
 				       myoptions);
 			free(path);
 			free(loc);
@@ -739,12 +759,20 @@
 	} else {
 		/* Normal (non-multi) entries */
 		char *loc;
-		int loclen;
+		int loclen, l;
 
 		if (*p == ':')
 			p++;	/* Sun escape for entries starting with / */
 
-		loc = dequote(p, chunklen(p, 1));
+		q = p;
+		while (*q) {
+			l = chunklen(q, 1);
+			q += l;
+			q = skipspace(q);
+		}
+		l = q - p;
+
+		loc = dequote(p, l);
 		loclen = strlen(loc);
 
 		if (loc == NULL) {

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help
  2004-05-02 14:13 Please help raven
@ 2004-05-03 13:21 ` Jeff Moyer
  2004-05-04 14:44 ` Please help - cleanup raven
  1 sibling, 0 replies; 17+ messages in thread
From: Jeff Moyer @ 2004-05-03 13:21 UTC (permalink / raw)
  To: raven; +Cc: autofs mailing list

==> Regarding [autofs] Please help; raven@themaw.net adds:

raven> Hi all,

raven> The recent post regarding replicated server mounts has caused me a
raven> bit of work.

raven> Basically, I broke the functionality a bit when I merged the patch I
raven> received from Michael Blandford.

raven> I believe the included patch fixes this.

raven> Additionally, while fixing it I stumbled on the "BUG: dir already
raven> mounted" message that has been annoying us for so long.

raven> I think I've fixed that as well. It's only about my third attempt at
raven> it so I'm not expecting it's final. Maybe third time lucky.

raven> Anyway, since the change is a bit more than straight forward I'd
raven> like as many people as can to test it out before I commit and
raven> release it in 4.1.3. I've probably broken something else.

I've posted RPMS with this patch applied on my people page:
     http://people.redhat.com/~jmoyer/

Version 4.1.2-4 is what you want.  I'll make the page a bit more
user-friendly when I get some free time.  Packages for RHEL 3, Fedora Core
1, and Fedora core 2 are available.  I also have the source rpms posted.

Happy testing,

Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-02 14:13 Please help raven
  2004-05-03 13:21 ` Jeff Moyer
@ 2004-05-04 14:44 ` raven
  2004-05-04 14:59   ` Jeff Moyer
  1 sibling, 1 reply; 17+ messages in thread
From: raven @ 2004-05-04 14:44 UTC (permalink / raw)
  To: autofs mailing list


Hi all again,

Further to yesterdays replicated server patch I have done some cleanup to 
it.

This patch replaces the previous patch so you will need to back out the 
previous one before applying this one.

I have:

- corrected some inconsistent messages.
- cleaned up paths (there were some double slashes,
  function was OK though)

One problem remains and seems not to be easily fixed. For multi mount 
maps dead mount point directories (from failed mounts) are left. This is 
not simple to fix without breaking other functionality. I believe it is 
better than those "BUG" messages though. So we`ll have to live with it for 
now.

If anyone is able to test this also that would be great.

Thanks
Ian

diff -Bu autofs-4.1.3/modules/mount_bind.c autofs-4.1.3.replicated_server_cleanup/modules/mount_bind.c
--- autofs-4.1.3/modules/mount_bind.c	2004-05-02 20:47:53.000000000 +0800
+++ autofs-4.1.3.replicated_server_cleanup/modules/mount_bind.c	2004-05-04 19:35:49.000000000 +0800
@@ -96,7 +96,12 @@
 		error(MODPREFIX "alloca: %m");
 		return 1;
 	}
-	sprintf(fullpath, "%s/%s", root, name);
+
+	if (name_len)
+		sprintf(fullpath, "%s/%s", root, name);
+	else
+		sprintf(fullpath, "%s", root);
+
 	i = strlen(fullpath);
 	while (--i > 0 && fullpath[i] == '/')
 		fullpath[i] = '\0';
@@ -125,8 +130,8 @@
 		unlink(AUTOFS_LOCK);
 
 		if (err) {
-			if (!ap.ghost || (ap.ghost && !status))
-				rmdir_path(fullpath);
+			if (!ap.ghost && name_len)
+				rmdir_path(name);
 			return 1;
 		} else {
 			debug(MODPREFIX "mounted %s type %s on %s",
diff -Bu autofs-4.1.3/modules/mount_changer.c autofs-4.1.3.replicated_server_cleanup/modules/mount_changer.c
--- autofs-4.1.3/modules/mount_changer.c	2004-05-02 20:50:53.000000000 +0800
+++ autofs-4.1.3.replicated_server_cleanup/modules/mount_changer.c	2004-05-04 19:35:49.000000000 +0800
@@ -61,7 +61,11 @@
 		error(MODPREFIX "alloca: %m");
 		return 1;
 	}
-	sprintf(fullpath, "%s/%s", root, name);
+
+	if (name_len)
+		sprintf(fullpath, "%s/%s", root, name);
+	else
+		sprintf(fullpath, "%s", root);
 
 	debug(MODPREFIX "calling umount %s", what);
 
@@ -77,7 +81,7 @@
 	debug(MODPREFIX "calling mkdir_path %s", fullpath);
 
 	if ((status = mkdir_path(fullpath, 0555)) && errno != EEXIST) {
-		error(MODPREFIX "mkdir_path %s failed: %m", name);
+		error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
 		return 1;
 	}
 
@@ -105,9 +109,10 @@
 			     "-t", fstype, what, fullpath, NULL);
 	}
 	unlink(AUTOFS_LOCK);
+
 	if (err) {
-		if (!ap.ghost || (ap.ghost && !status))
-			rmdir_path(fullpath);
+		if (!ap.ghost && name_len)
+			rmdir_path(name);
 
 		error(MODPREFIX "failed to mount %s (type %s) on %s",
 		      what, fstype, fullpath);
diff -Bu autofs-4.1.3/modules/mount_ext2.c autofs-4.1.3.replicated_server_cleanup/modules/mount_ext2.c
--- autofs-4.1.3/modules/mount_ext2.c	2004-05-02 20:53:00.000000000 +0800
+++ autofs-4.1.3.replicated_server_cleanup/modules/mount_ext2.c	2004-05-04 19:35:49.000000000 +0800
@@ -55,12 +55,16 @@
 		error(MODPREFIX "alloca: %m");
 		return 1;
 	}
-	sprintf(fullpath, "%s/%s", root, name);
+
+	if (name_len)
+		sprintf(fullpath, "%s/%s", root, name);
+	else
+		sprintf(fullpath, "%s", root);
 
 	debug(MODPREFIX "calling mkdir_path %s", fullpath);
 
 	if ((status = mkdir_path(fullpath, 0555)) && errno != EEXIST) {
-		error(MODPREFIX "mkdir_path %s failed: %m", name);
+		error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
 		return 1;
 	}
 
@@ -116,8 +120,8 @@
 	unlink(AUTOFS_LOCK);
 
 	if (err) {
-		if (!ap.ghost || (ap.ghost && !status))
-			rmdir_path(fullpath);
+		if (!ap.ghost && name_len)
+			rmdir_path(name);
 		error(MODPREFIX "failed to mount %s (type %s) on %s",
 		      what, fstype, fullpath);
 		return 1;
diff -Bu autofs-4.1.3/modules/mount_generic.c autofs-4.1.3.replicated_server_cleanup/modules/mount_generic.c
--- autofs-4.1.3/modules/mount_generic.c	2004-05-02 20:54:10.000000000 +0800
+++ autofs-4.1.3.replicated_server_cleanup/modules/mount_generic.c	2004-05-04 19:35:49.000000000 +0800
@@ -53,12 +53,16 @@
 		error(MODPREFIX "alloca: %m");
 		return 1;
 	}
-	sprintf(fullpath, "%s/%s", root, name);
+
+	if (name_len)
+		sprintf(fullpath, "%s/%s", root, name);
+	else
+		sprintf(fullpath, "%s", root);
 
 	debug(MODPREFIX "calling mkdir_path %s", fullpath);
 
 	if ((status = mkdir_path(fullpath, 0555)) && errno != EEXIST) {
-		error(MODPREFIX "mkdir_path %s failed: %m", name);
+		error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
 		return 1;
 	}
 
@@ -85,8 +89,8 @@
 	unlink(AUTOFS_LOCK);
 
 	if (err) {
-		if (!ap.ghost || (ap.ghost && !status))
-			rmdir_path(fullpath);
+		if (!ap.ghost && name_len)
+			rmdir_path(name);
 
 		error(MODPREFIX "failed to mount %s (type %s) on %s",
 		      what, fstype, fullpath);
diff -Bu autofs-4.1.3/modules/mount_nfs.c autofs-4.1.3.replicated_server_cleanup/modules/mount_nfs.c
--- autofs-4.1.3/modules/mount_nfs.c	2004-05-02 21:11:53.000000000 +0800
+++ autofs-4.1.3.replicated_server_cleanup/modules/mount_nfs.c	2004-05-04 19:35:49.000000000 +0800
@@ -131,7 +131,6 @@
 
 	while (p && *p) {
 		char *next;
-		int alive = -1;
 
 		p += strspn(p, " \t,");
 		delim = strpbrk(p, "(, \t:");
@@ -187,29 +186,32 @@
 			for (haddr = he->h_addr_list; *haddr; haddr++) {
 				local = is_local_addr(p, *haddr, he->h_length);
 
-				if (local < 0) {
-					local = 0;
-					p = next;
-				}
+				if (local < 0)
+					continue;
 
 				if (local) {
-					alive = rpc_ping(p, sec, micros);
-					if (alive) {
-						winner = p;
-						break;
-					}
-					local = 0;
+					winner = p;
+					break;
 				}
 			}
+			
+			if (local < 0) {
+				local = 0;
+				p = next;
+				continue;
+			}
+
+			if (local)
+				break;
 		}
 
-		/* Are we actually alive */
-		if (!alive || (alive < 0 && !rpc_ping(p, sec, micros))) {
+		/* If it's not local is it alive */
+		if (!local && !rpc_ping(p, sec, micros)) {
 			p = next;
 			continue;
 		}
 
-		/* Not local, see if we have a previous 'winner' */
+		/* see if we have a previous 'winner' */
 		if (!winner) {
 			winner = p;
 		}
@@ -391,7 +393,11 @@
 		error(MODPREFIX "alloca: %m");
 		return 1;
 	}
-	sprintf(fullpath, "%s/%s", root, name);
+
+	if (name_len)
+		sprintf(fullpath, "%s/%s", root, name);
+	else
+		sprintf(fullpath, "%s", root);
 
 	if (local) {
 		/* Local host -- do a "bind" */
@@ -406,7 +412,7 @@
 
 		debug(MODPREFIX "calling mkdir_path %s", fullpath);
 		if ((status = mkdir_path(fullpath, 0555)) && errno != EEXIST) {
-			error(MODPREFIX "mkdir_path %s failed: %m", name);
+			error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
 			return 1;
 		}
 
@@ -434,8 +440,8 @@
 		unlink(AUTOFS_LOCK);
 
 		if (err) {
-			if (!ap.ghost || (ap.ghost && !status))
-				rmdir_path(fullpath);
+			if (!ap.ghost && name_len)
+				rmdir_path(name);
 			error(MODPREFIX "nfs: mount failure %s on %s",
 			      whatstr, fullpath);
 			return 1;
diff -Bu autofs-4.1.3/modules/parse_sun.c autofs-4.1.3.replicated_server_cleanup/modules/parse_sun.c
--- autofs-4.1.3/modules/parse_sun.c	2004-05-02 20:31:32.000000000 +0800
+++ autofs-4.1.3.replicated_server_cleanup/modules/parse_sun.c	2004-05-04 19:35:49.000000000 +0800
@@ -514,7 +514,6 @@
 }
 
 static int sun_mount(const char *root, const char *name, int namelen,
-		     const char *path, int pathlen,
 		     const char *loc, int loclen, const char *options)
 {
 	char *fstype = "nfs";	/* Default filesystem type */
@@ -565,17 +564,13 @@
 		options = noptions;
 	}
 
-	while (*path == '/') {
-		path++;
-		pathlen--;
+	while (*name == '/') {
+		name++;
+		namelen--;
 	}
 
-	mountpoint = alloca(namelen + pathlen + 2);
-
-	if (pathlen)
-		sprintf(mountpoint, "%.*s/%.*s", namelen, name, pathlen, path);
-	else
-		sprintf(mountpoint, "%.*s", namelen, name);
+	mountpoint = alloca(namelen + 1);
+	sprintf(mountpoint, "%.*s", namelen, name);
 
 	what = alloca(loclen + 1);
 	memcpy(what, loc, loclen);
@@ -615,15 +610,15 @@
 
 /*
  * syntax is:
- *	[-options] location
- *	[-options] [mountpoint [-options] location]...
+ *	[-options] location [location] ...
+ *	[-options] [mountpoint [-options] location [location] ... ]...
  */
 int parse_mount(const char *root, const char *name,
 		int name_len, const char *mapent, void *context)
 {
 	struct parse_context *ctxt = (struct parse_context *) context;
 	char *pmapent, *options;
-	const char *p;
+	const char *p, *q;
 	int mapent_len, rv;
 	int optlen;
 
@@ -667,6 +662,18 @@
 
 	if (*p == '/') {
 		int l;
+		char *multi_root;
+
+		multi_root = alloca(strlen(root) + name_len + 2);
+		if (!multi_root) {
+			error(MODPREFIX "alloca: %m");
+			free(options);
+			return 1;
+		}
+
+		strcpy(multi_root, root);
+		strcat(multi_root, "/");
+		strcat(multi_root, name);
 
 		/* It's a multi-mount; deal with it */
 		do {
@@ -705,7 +712,15 @@
 				} while (*p == '-');
 			}
 
-			loc = dequote(p, l = chunklen(p, 1));
+			q = p;
+			while (*q && *q != '/') {
+				l = chunklen(q, 1);
+				q += l;
+				q = skipspace(q);
+			}
+			l = q - p;
+
+			loc = dequote(p, l);
 			loclen = strlen(loc);
 
 			if (loc == NULL || path == NULL) {
@@ -723,7 +738,7 @@
 			      "multimount: %.*s on %.*s with options %s",
 			      loclen, loc, pathlen, path, myoptions);
 
-			rv = sun_mount(root, name, name_len, path, pathlen, loc, loclen,
+			rv = sun_mount(multi_root, path, pathlen, loc, loclen,
 				       myoptions);
 			free(path);
 			free(loc);
@@ -739,12 +754,20 @@
 	} else {
 		/* Normal (non-multi) entries */
 		char *loc;
-		int loclen;
+		int loclen, l;
 
 		if (*p == ':')
 			p++;	/* Sun escape for entries starting with / */
 
-		loc = dequote(p, chunklen(p, 1));
+		q = p;
+		while (*q) {
+			l = chunklen(q, 1);
+			q += l;
+			q = skipspace(q);
+		}
+		l = q - p;
+
+		loc = dequote(p, l);
 		loclen = strlen(loc);
 
 		if (loc == NULL) {
@@ -763,7 +786,7 @@
 		debug(MODPREFIX "core of entry: options=%s, loc=%.*s",
 		      options, loclen, loc);
 
-		rv = sun_mount(root, name, name_len, "/", 1, loc, loclen, options);
+		rv = sun_mount(root, name, name_len, loc, loclen, options);
 		free(loc);
 		free(options);
 	}

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-04 14:44 ` Please help - cleanup raven
@ 2004-05-04 14:59   ` Jeff Moyer
  2004-05-04 15:16     ` raven
  0 siblings, 1 reply; 17+ messages in thread
From: Jeff Moyer @ 2004-05-04 14:59 UTC (permalink / raw)
  To: raven; +Cc: autofs mailing list

==> Regarding Re: [autofs] Please help - cleanup; raven@themaw.net adds:

raven> Hi all again,

raven> Further to yesterdays replicated server patch I have done some
raven> cleanup to it.

raven> This patch replaces the previous patch so you will need to back out
raven> the previous one before applying this one.

raven> I have:

raven> - corrected some inconsistent messages.  - cleaned up paths (there
raven> were some double slashes, function was OK though)

raven> One problem remains and seems not to be easily fixed. For multi
raven> mount maps dead mount point directories (from failed mounts) are
raven> left. This is not simple to fix without breaking other
raven> functionality. I believe it is better than those "BUG" messages
raven> though. So we`ll have to live with it for now.

Hmm... along the same lines, I just configured ghosting for a map which
uses wildcards (which I'm guessing is not supported, right?). If you cd
to a directory, any directory, it will create that directory and leave it
around, even though there is no such mount.  This sounds like something
that should be fixed up.

raven> If anyone is able to test this also that would be great.

I will roll another test rpm with this patch and post to my people page.

-Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-04 14:59   ` Jeff Moyer
@ 2004-05-04 15:16     ` raven
  2004-05-05 22:16       ` Jeff Moyer
  0 siblings, 1 reply; 17+ messages in thread
From: raven @ 2004-05-04 15:16 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: autofs mailing list

On Tue, 4 May 2004, Jeff Moyer wrote:

> ==> Regarding Re: [autofs] Please help - cleanup; raven@themaw.net adds:
> 
> raven> Hi all again,
> 
> raven> Further to yesterdays replicated server patch I have done some
> raven> cleanup to it.
> 
> raven> This patch replaces the previous patch so you will need to back out
> raven> the previous one before applying this one.
> 
> raven> I have:
> 
> raven> - corrected some inconsistent messages.  - cleaned up paths (there
> raven> were some double slashes, function was OK though)
> 
> raven> One problem remains and seems not to be easily fixed. For multi
> raven> mount maps dead mount point directories (from failed mounts) are
> raven> left. This is not simple to fix without breaking other
> raven> functionality. I believe it is better than those "BUG" messages
> raven> though. So we`ll have to live with it for now.
> 
> Hmm... along the same lines, I just configured ghosting for a map which
> uses wildcards (which I'm guessing is not supported, right?). If you cd
> to a directory, any directory, it will create that directory and leave it
> around, even though there is no such mount.  This sounds like something
> that should be fixed up.

That problem is a little different to the one sited above.

If there is a map that contains some entries and a wildcard map at the end 
I can't tell if the directory should be removed or not. So either we keep 
that behaviour or we disable ghosting altogether when a wildcard map 
entry is seen.

In the past I considered that if ghosting was requested in this case I 
would leave the entries and allow autofs to "learn" about the mounts as 
it went.

So what do people think we should do here?

> 
> raven> If anyone is able to test this also that would be great.
> 
> I will roll another test rpm with this patch and post to my people page.

Thanks Jeff.

Ian

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-04 15:16     ` raven
@ 2004-05-05 22:16       ` Jeff Moyer
  2004-05-05 23:45         ` Michael Blandford
  2004-05-06 14:30         ` Tom Georgoulias
  0 siblings, 2 replies; 17+ messages in thread
From: Jeff Moyer @ 2004-05-05 22:16 UTC (permalink / raw)
  To: autofs mailing list

==> Regarding Re: [autofs] Please help - cleanup; raven@themaw.net adds:

[snip]
raven> If anyone is able to test this also that would be great.
>> I will roll another test rpm with this patch and post to my people page.

Has anyone had the chance to test this?  autofs-4.1.2-5 from my people
page, or the patch Ian sent to the list?  I'd like to hear feedback, either
positive or negative as I have to push a package into FC2 before the
freeze on Friday.

Thanks!

Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-05 22:16       ` Jeff Moyer
@ 2004-05-05 23:45         ` Michael Blandford
  2004-05-06  1:38           ` Ian Kent
  2004-05-06 12:40           ` Jeff Moyer
  2004-05-06 14:30         ` Tom Georgoulias
  1 sibling, 2 replies; 17+ messages in thread
From: Michael Blandford @ 2004-05-05 23:45 UTC (permalink / raw)
  To: jmoyer; +Cc: autofs mailing list

Jeff Moyer wrote:

>==> Regarding Re: [autofs] Please help - cleanup; raven@themaw.net adds:
>
>[snip]
>raven> If anyone is able to test this also that would be great.
>  
>
>>>I will roll another test rpm with this patch and post to my people page.
>>>      
>>>
>
>Has anyone had the chance to test this?  autofs-4.1.2-5 from my people
>page, or the patch Ian sent to the list?  I'd like to hear feedback, either
>positive or negative as I have to push a package into FC2 before the
>freeze on Friday.
>
>  
>

I have not had a chance to play with it extensively.  I will dedicate 
time to it tomorrow.

Just a couple of questions

1) What about the get-best-mount.patch?  My impression was it wasn't 
needed with the new replicated server patch. 

2) What kernel modules are you going to add to the kernel?  Is it the 
20040417 ( for 2.6 ) or are you going to wait for the newest ones from Ian?

3) Are you going to add your yp patch to your rpm?

Michael


Disclaimer: The content of this message is my personal opinion only and 
although I am an employee of Intel, the statements I make here in no way 
represent Intel's position on the issue, nor am I authorized to speak on 
behalf of Intel on this matter.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-05 23:45         ` Michael Blandford
@ 2004-05-06  1:38           ` Ian Kent
  2004-05-06 12:40           ` Jeff Moyer
  1 sibling, 0 replies; 17+ messages in thread
From: Ian Kent @ 2004-05-06  1:38 UTC (permalink / raw)
  To: Michael Blandford; +Cc: autofs mailing list

On Wed, 5 May 2004, Michael Blandford wrote:

> 
> 2) What kernel modules are you going to add to the kernel?  Is it the 
> 20040417 ( for 2.6 ) or are you going to wait for the newest ones from Ian?

I've cut patches last night that sync up 2.4 with 2.6.

If I'm not sure about the current fix status I'll forward the relavent 
stuff to Jeff and Axel otherwise I'll put together a release. Looks like 
there are a few too many recent changes to autofs to rush into a release.

Ian

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-05 23:45         ` Michael Blandford
  2004-05-06  1:38           ` Ian Kent
@ 2004-05-06 12:40           ` Jeff Moyer
  2004-05-06 14:44             ` raven
  1 sibling, 1 reply; 17+ messages in thread
From: Jeff Moyer @ 2004-05-06 12:40 UTC (permalink / raw)
  To: Michael Blandford; +Cc: autofs mailing list

==> Regarding Re: [autofs] Please help - cleanup; Michael Blandford <mlblandf@sedona.ch.intel.com> adds:

mlblandf> Jeff Moyer wrote:
>> ==> Regarding Re: [autofs] Please help - cleanup; raven@themaw.net adds:
>> 
>> [snip]
raven> If anyone is able to test this also that would be great.
>>
>>>> I will roll another test rpm with this patch and post to my people
>>>> page.
>>>> 
>>>> 
>> Has anyone had the chance to test this?  autofs-4.1.2-5 from my people
>> page, or the patch Ian sent to the list?  I'd like to hear feedback,
>> either positive or negative as I have to push a package into FC2 before
>> the freeze on Friday.
>> 
>> 
>> 

mlblandf> I have not had a chance to play with it extensively.  I will
mlblandf> dedicate time to it tomorrow.

mlblandf> Just a couple of questions

mlblandf> 1) What about the get-best-mount.patch?  My impression was it
mlblandf> wasn't needed with the new replicated server patch.

I'm not certain of this, as I haven't had a chance to test w/o it.  As I
mentioned before, I ran across a problem with clients that got their maps
from LDAP.  They would timeout given the low timeout value passed to
rpc_ping.  If we just tell it to use a long timeout value, this seems to
work.  As I mentioned, this is a band-aid, and I haven't debugged the real
problem.  I'm hoping Ian's patches fix it.

mlblandf> 2) What kernel modules are you going to add to the kernel?  Is it
mlblandf> the 20040417 ( for 2.6 ) or are you going to wait for the newest
mlblandf> ones from Ian?

Unfortunately, the kernel is frozen.  I will have to wait until the pool
opens up again before I can get any changes in.  In general, we don't take
patches that aren't upstream, so it's important that the changes make it
into the Linus tree.

mlblandf> 3) Are you going to add your yp patch to your rpm?

That will be present in the version I build into FC2.  It is not present in
4.1.2-5.

-Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-05 22:16       ` Jeff Moyer
  2004-05-05 23:45         ` Michael Blandford
@ 2004-05-06 14:30         ` Tom Georgoulias
  2004-05-06 15:55           ` Chris Croswhite
  1 sibling, 1 reply; 17+ messages in thread
From: Tom Georgoulias @ 2004-05-06 14:30 UTC (permalink / raw)
  To: autofs mailing list

Jeff Moyer wrote:

> Has anyone had the chance to test this?  autofs-4.1.2-5 from my people
> page, or the patch Ian sent to the list?  I'd like to hear feedback, either
> positive or negative as I have to push a package into FC2 before the
> freeze on Friday.

I have a system running it right now and it's behaving as expected, but 
I haven't done any in depth testing of it because of other priorities. 
What would be nice is to have a suite of smoke tests that I could run 
through.  Sometimes I don't see problems with new patches until much 
later, after I thought I had wrung it out pretty well.  ;)

The bigger problem I'm facing right now is mounts dropping and not 
remounting until a HUP signal is sent to the daemon.  I've hacked around 
this by setting up a cron job to send the HUP on an hourly basis, but 
this is far from an elegant solution.

Tom
-- 
Tom Georgoulias
POPI Classification
[x] General Business Information
[] Freescale Semiconductor Internal Use
[] Freescale Semiconductor Confidential Proprietary

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-06 12:40           ` Jeff Moyer
@ 2004-05-06 14:44             ` raven
  0 siblings, 0 replies; 17+ messages in thread
From: raven @ 2004-05-06 14:44 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: autofs mailing list

On Thu, 6 May 2004, Jeff Moyer wrote:

> I'm not certain of this, as I haven't had a chance to test w/o it.  As I
> mentioned before, I ran across a problem with clients that got their maps
> from LDAP.  They would timeout given the low timeout value passed to
> rpc_ping.  If we just tell it to use a long timeout value, this seems to
> work.  As I mentioned, this is a band-aid, and I haven't debugged the real
> problem.  I'm hoping Ian's patches fix it.

The replicated server patch continues to be difficult. I'm still working 
on it. I'll post another replacement with an explanation tonight. 
Hopefully I've got the last of the problems with it.

And it looked so inocent it couldn't cause side effects!

> 
> mlblandf> 2) What kernel modules are you going to add to the kernel?  Is it
> mlblandf> the 20040417 ( for 2.6 ) or are you going to wait for the newest
> mlblandf> ones from Ian?
> 
> Unfortunately, the kernel is frozen.  I will have to wait until the pool
> opens up again before I can get any changes in.  In general, we don't take
> patches that aren't upstream, so it's important that the changes make it
> into the Linus tree.

For 2.6 it looks like it is very soon. Andrew was ready to pass it on 
except I got the last minute jitters after your thought provoking mail 
about the differences between 2.4 and 2.6.

Ian

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-06 14:30         ` Tom Georgoulias
@ 2004-05-06 15:55           ` Chris Croswhite
  2004-05-06 16:04             ` Tom Georgoulias
  0 siblings, 1 reply; 17+ messages in thread
From: Chris Croswhite @ 2004-05-06 15:55 UTC (permalink / raw)
  To: Tom Georgoulias; +Cc: autofs mailing list

I ran this on 40 clients last evening through our normal regression runs
(9 hours, 1.5T of data, 127 mount points) and found that it behaved as
expected.

I also think that it would be nice to have some form of
regressions/tests to help validate.


On Thu, 2004-05-06 at 07:30, Tom Georgoulias wrote:
> Jeff Moyer wrote:
> 
> > Has anyone had the chance to test this?  autofs-4.1.2-5 from my people
> > page, or the patch Ian sent to the list?  I'd like to hear feedback, either
> > positive or negative as I have to push a package into FC2 before the
> > freeze on Friday.
> 
> I have a system running it right now and it's behaving as expected, but 
> I haven't done any in depth testing of it because of other priorities. 
> What would be nice is to have a suite of smoke tests that I could run 
> through.  Sometimes I don't see problems with new patches until much 
> later, after I thought I had wrung it out pretty well.  ;)
> 
> The bigger problem I'm facing right now is mounts dropping and not 
> remounting until a HUP signal is sent to the daemon.  I've hacked around 
> this by setting up a cron job to send the HUP on an hourly basis, but 
> this is far from an elegant solution.
> 
> Tom

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-06 15:55           ` Chris Croswhite
@ 2004-05-06 16:04             ` Tom Georgoulias
  2004-05-06 19:10               ` Jeff Moyer
  2004-05-07  1:50               ` Ian Kent
  0 siblings, 2 replies; 17+ messages in thread
From: Tom Georgoulias @ 2004-05-06 16:04 UTC (permalink / raw)
  To: autofs mailing list

Chris Croswhite wrote:
> I ran this on 40 clients last evening through our normal regression runs
> (9 hours, 1.5T of data, 127 mount points) and found that it behaved as
> expected.

I should clarify, the mount dropping problem I mentioned in my last 
message is not specifically related to testing autofs-4.1.2-5 (or any 
4.1.2, I think).  I've got 4.1.1 rolled out and those systems are the 
ones dropping mounts, at least at this point in time.  My intention is 
to find a autofs release or set of patches that fixes this behavior 
sooner rather than later as it is causing problems for my users.

Just for my sanity, can anyone help me confirm the following "facts" 
about earlier behavior of the autofs-4.1.0pre10 release:

1.  NIS maps were not cached by the automounter daemon
2.  changes made to the maps and pushed out went into effect 
immediately, regardless of whether or not the changes were new key/mount 
entries to an existing map or just changes to existing key/mount pairs 
withing an existing map.

> I also think that it would be nice to have some form of
> regressions/tests to help validate.

I think it's time to start developing some.  Since Red Hat tests their 
software before they ship it, maybe they have a suite already in place 
that they could share? ;)

Tom
-- 
Tom Georgoulias
POPI Classification
[x] General Business Information
[] Freescale Semiconductor Internal Use
[] Freescale Semiconductor Confidential Proprietary

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-06 16:04             ` Tom Georgoulias
@ 2004-05-06 19:10               ` Jeff Moyer
  2004-05-06 19:34                 ` Peter C. Norton
  2004-05-07 15:13                 ` Mike Waychison
  2004-05-07  1:50               ` Ian Kent
  1 sibling, 2 replies; 17+ messages in thread
From: Jeff Moyer @ 2004-05-06 19:10 UTC (permalink / raw)
  To: Tom Georgoulias; +Cc: autofs mailing list

==> Regarding Re: [autofs] Please help - cleanup; Tom Georgoulias <tom.georgoulias@freescale.com> adds:

[snip]
>> I also think that it would be nice to have some form of
>> regressions/tests to help validate.

tom.georgoulias> I think it's time to start developing some.  Since Red Hat
tom.georgoulias> tests their software before they ship it, maybe they have
tom.georgoulias> a suite already in place that they could share? ;)

Heh.  Wishful thinking.  Part of the reason I started pushing out test rpms
was to get more testing in environments I couldn't possibly reproduce.
That's not to say autofs doesn't get tested in-house.  I certainly do as
much testing as possible before pushing packges into a release.

I would also like to see an autofs stress test and regression test.  I
think it would help immensely.  However, setting aside time to do the work
is always the issue.

-Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-06 19:10               ` Jeff Moyer
@ 2004-05-06 19:34                 ` Peter C. Norton
  2004-05-07 15:13                 ` Mike Waychison
  1 sibling, 0 replies; 17+ messages in thread
From: Peter C. Norton @ 2004-05-06 19:34 UTC (permalink / raw)
  To: autofs mailing list

I thought that in the past someone from sun had piped up saying that
sun was trying to fix up autofs.  I'd imagine that they've got
something they can test with.

-Peter

On Thu, May 06, 2004 at 03:10:36PM -0400, Jeff Moyer wrote:
> ==> Regarding Re: [autofs] Please help - cleanup; Tom Georgoulias <tom.georgoulias@freescale.com> adds:
> 
> [snip]
> >> I also think that it would be nice to have some form of
> >> regressions/tests to help validate.
> 
> tom.georgoulias> I think it's time to start developing some.  Since Red Hat
> tom.georgoulias> tests their software before they ship it, maybe they have
> tom.georgoulias> a suite already in place that they could share? ;)
> 
> Heh.  Wishful thinking.  Part of the reason I started pushing out test rpms
> was to get more testing in environments I couldn't possibly reproduce.
> That's not to say autofs doesn't get tested in-house.  I certainly do as
> much testing as possible before pushing packges into a release.
> 
> I would also like to see an autofs stress test and regression test.  I
> think it would help immensely.  However, setting aside time to do the work
> is always the issue.
> 
> -Jeff
> 
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs

-- 
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-06 16:04             ` Tom Georgoulias
  2004-05-06 19:10               ` Jeff Moyer
@ 2004-05-07  1:50               ` Ian Kent
  1 sibling, 0 replies; 17+ messages in thread
From: Ian Kent @ 2004-05-07  1:50 UTC (permalink / raw)
  To: Tom Georgoulias; +Cc: autofs mailing list

On Thu, 6 May 2004, Tom Georgoulias wrote:

> Chris Croswhite wrote:
> > I ran this on 40 clients last evening through our normal regression runs
> > (9 hours, 1.5T of data, 127 mount points) and found that it behaved as
> > expected.
> 
> I should clarify, the mount dropping problem I mentioned in my last 
> message is not specifically related to testing autofs-4.1.2-5 (or any 
> 4.1.2, I think).  I've got 4.1.1 rolled out and those systems are the 
> ones dropping mounts, at least at this point in time.  My intention is 
> to find a autofs release or set of patches that fixes this behavior 
> sooner rather than later as it is causing problems for my users.
> 
> Just for my sanity, can anyone help me confirm the following "facts" 
> about earlier behavior of the autofs-4.1.0pre10 release:
> 
> 1.  NIS maps were not cached by the automounter daemon
> 2.  changes made to the maps and pushed out went into effect 
> immediately, regardless of whether or not the changes were new key/mount 
> entries to an existing map or just changes to existing key/mount pairs 
> withing an existing map.

So your machines are not droping mounts. They just don't know about them, 
right.

Ian

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Please help - cleanup
  2004-05-06 19:10               ` Jeff Moyer
  2004-05-06 19:34                 ` Peter C. Norton
@ 2004-05-07 15:13                 ` Mike Waychison
  1 sibling, 0 replies; 17+ messages in thread
From: Mike Waychison @ 2004-05-07 15:13 UTC (permalink / raw)
  To: jmoyer; +Cc: autofs mailing list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff Moyer wrote:
> ==> Regarding Re: [autofs] Please help - cleanup; Tom Georgoulias
<tom.georgoulias@freescale.com> adds:
>
> [snip]
>
>>>I also think that it would be nice to have some form of
>>>regressions/tests to help validate.
>
>
> tom.georgoulias> I think it's time to start developing some.  Since
Red Hat
> tom.georgoulias> tests their software before they ship it, maybe they have
> tom.georgoulias> a suite already in place that they could share? ;)
>
> Heh.  Wishful thinking.  Part of the reason I started pushing out test
rpms
> was to get more testing in environments I couldn't possibly reproduce.
> That's not to say autofs doesn't get tested in-house.  I certainly do as
> much testing as possible before pushing packges into a release.
>
> I would also like to see an autofs stress test and regression test.  I
> think it would help immensely.  However, setting aside time to do the work
> is always the issue.
>

I'll see if I can make something available.  Cross your fingers though :)

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice
mailto: Michael.Waychison@Sun.COM
http://www.sun.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE:  The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAm6eedQs4kOxk3/MRAmigAJ9CJLnHv20/XYF7Jnig7RuiUybXQwCffG9j
dv9n9/X/vmVlnwoec/geOJw=
=xVs2
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2004-05-07 15:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-02 14:13 Please help raven
2004-05-03 13:21 ` Jeff Moyer
2004-05-04 14:44 ` Please help - cleanup raven
2004-05-04 14:59   ` Jeff Moyer
2004-05-04 15:16     ` raven
2004-05-05 22:16       ` Jeff Moyer
2004-05-05 23:45         ` Michael Blandford
2004-05-06  1:38           ` Ian Kent
2004-05-06 12:40           ` Jeff Moyer
2004-05-06 14:44             ` raven
2004-05-06 14:30         ` Tom Georgoulias
2004-05-06 15:55           ` Chris Croswhite
2004-05-06 16:04             ` Tom Georgoulias
2004-05-06 19:10               ` Jeff Moyer
2004-05-06 19:34                 ` Peter C. Norton
2004-05-07 15:13                 ` Mike Waychison
2004-05-07  1:50               ` Ian Kent

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.