Whamcloud - gitweb
revert land fix from bug 12609, due group_upcall complete disabled in HEAD.
authorshadow <shadow>
Tue, 25 Sep 2007 14:26:16 +0000 (14:26 +0000)
committershadow <shadow>
Tue, 25 Sep 2007 14:26:16 +0000 (14:26 +0000)
lustre/include/lustre_param.h
lustre/tests/cfg/insanity-local.sh
lustre/tests/cfg/local.sh
lustre/tests/cfg/lov.sh
lustre/tests/sanity.sh
lustre/utils/mkfs_lustre.c

index 5dcd714..8acf23e 100644 (file)
@@ -52,7 +52,6 @@ int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd,
 #define PARAM_FAILNODE             "failover.node="    /* llog generation */
 #define PARAM_FAILMODE             "failover.mode="    /* llog generation */
 #define PARAM_ACTIVE               "active="           /* llog generation */
-#define PARAM_MDT_UPCALL           "mdt.group_upcall=" /* mds group upcall */
 
 /* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */
 #define PARAM_OST                  "ost."
index 53482d0..d31c089 100644 (file)
@@ -48,8 +48,6 @@ MOUNTOPT=""
     MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
 [ "x$STRIPES_PER_OBJ" != "x" ] &&
     MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
-[ "x$LUSTRE" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT"  --param mdt.group_upcall=$LUSTRE/utils/l_getgroups" 
 MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
 
 MKFSOPT=""
index 0ad36de..16c6c3b 100644 (file)
@@ -53,8 +53,6 @@ MOUNTOPT=""
     MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
 [ "x$STRIPES_PER_OBJ" != "x" ] &&
     MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
-[ "x$LUSTRE" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param mdt.group_upcall=$LUSTRE/utils/l_getgroups"
 MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
 
 MKFSOPT=""
index 7fd576f..520a7a9 100644 (file)
@@ -47,8 +47,6 @@ MOUNTOPT=""
     MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
 [ "x$STRIPES_PER_OBJ" != "x" ] &&
     MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
-[ "x$LUSTRE" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param mdt.group_upcall=$LUSTRE/utils/l_getgroups"
 MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
 
 MKFSOPT=""
index 950f320..fce524d 100644 (file)
@@ -143,8 +143,6 @@ MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT))}
 [ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo
 rm -rf $DIR/[Rdfs][1-9]*
 
-$RUNAS ls $DIR >/dev/null 2>&1 || { echo "Error: uid $RUNAS_ID doesn't exist on MDS!"; exit 1; }
-
 build_test_filter
 
 if [ "${ONLY}" = "MOUNT" ] ; then 
@@ -2905,7 +2903,7 @@ test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly
        touch $DIR/f72
        chmod 777 $DIR/f72
        chmod ug+s $DIR/f72
-       $RUNAS dd if=/dev/zero of=$DIR/f72 bs=512 count=1 || error
+       $RUNAS -u $(($RUNAS_ID + 1)) dd if=/dev/zero of=$DIR/f72 bs=512 count=1 || error
        # See if we are still setuid/sgid
        test -u $DIR/f72 -o -g $DIR/f72 && error "S/gid is not dropped on write"
        # Now test that MDS is updated too
index 8a36d21..130e840 100644 (file)
@@ -948,42 +948,14 @@ static inline void badopt(const char *opt, char *type)
         usage(stderr);
 }
 
-static int clean_param(char *buf, char *key)
-{
-        char *sub, *next;
-
-        if (!buf)
-                return 1;
-        if ((sub = strstr(buf, key)) != NULL) {
-                if ((next = strchr(sub, ' ')) != NULL) {
-                        next++;
-                        memmove(sub, next, strlen(next) + 1);
-                } else {
-                        *sub = '\0';
-                }
-        }
-        return 0;
-} 
-
 static int add_param(char *buf, char *key, char *val)
 {
         int end = sizeof(((struct lustre_disk_data *)0)->ldd_params);
-        int start;
+        int start = strlen(buf);
         int keylen = 0;
-        char *ptr;
 
-        if (key) {
+        if (key)
                 keylen = strlen(key);
-                clean_param(buf, key);
-        } else {
-                if((ptr = strchr(val, '=')) == NULL)
-                        return 1;
-                *ptr = '\0';
-                clean_param(buf, val);
-                *ptr = '=';
-        }
-                
-        start = strlen(buf);
         if (start + 1 + keylen + strlen(val) >= end) {
                 fprintf(stderr, "%s: params are too long-\n%s %s%s\n",
                         progname, buf, key ? key : "", val);
@@ -1074,8 +1046,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
         char *optstring = "b:c:C:d:ef:Ghi:k:L:m:MnNo:Op:Pqru:vw";
         int opt;
         int rc, longidx;
-        int upcall = 0;
-        const size_t prefix_len = sizeof(PARAM_MDT_UPCALL) - 1;
 
         while ((opt = getopt_long(argc, argv, optstring, long_opt, &longidx)) !=
                EOF) {
@@ -1214,18 +1184,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
                         mop->mo_ldd.ldd_flags |= LDD_F_SV_TYPE_OST;
                         break;
                 case 'p':
-                        /* Test if the param is valid for mdt.group_upcall */
-                        if (!strncmp(optarg, PARAM_MDT_UPCALL, prefix_len)) {
-                                upcall++;
-                                if(strcmp(optarg + prefix_len, "NONE") &&
-                                   access(optarg + prefix_len, R_OK | X_OK))
-                                        fprintf(stderr, "WARNING: group upcall "
-                                                "parameter not executable: %s\n"
-                                                "NOTE: you can change the path "
-                                                "to the group upcall through "
-                                                "tunefs.lustre(8)\n", optarg + 
-                                                prefix_len);
-                        }
                         rc = add_param(mop->mo_ldd.ldd_params, NULL, optarg);
                         if (rc)
                                 return rc;
@@ -1264,22 +1222,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
                 return EINVAL;
         }
         
-#ifndef TUNEFS
-        if (mop->mo_ldd.ldd_flags & LDD_F_SV_TYPE_MDT && 0 == upcall) {
-                if(access("/usr/sbin/l_getgroups", R_OK | X_OK))
-                        fprintf(stderr, "WARNING: MDS group upcall is not set, "
-                                "use 'NONE'\n");
-                else {
-                        rc = add_param(mop->mo_ldd.ldd_params, PARAM_MDT_UPCALL,
-                                       "/usr/sbin/l_getgroups");
-                        if (rc)
-                                return rc;
-                        /* Must update the mgs logs */
-                        mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
-                }
-        }
-#endif
         return 0;
 }