Skip to content
Snippets Groups Projects
Commit 5b66e3d6 authored by Alexey Lyashkov's avatar Alexey Lyashkov
Browse files

revert land fix from bug 12609, due group_upcall complete disabled in HEAD.

parent 66986b64
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,6 @@ int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd, ...@@ -52,7 +52,6 @@ int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd,
#define PARAM_FAILNODE "failover.node=" /* llog generation */ #define PARAM_FAILNODE "failover.node=" /* llog generation */
#define PARAM_FAILMODE "failover.mode=" /* llog generation */ #define PARAM_FAILMODE "failover.mode=" /* llog generation */
#define PARAM_ACTIVE "active=" /* 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) */ /* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */
#define PARAM_OST "ost." #define PARAM_OST "ost."
......
...@@ -48,8 +48,6 @@ MOUNTOPT="" ...@@ -48,8 +48,6 @@ MOUNTOPT=""
MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES" MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
[ "x$STRIPES_PER_OBJ" != "x" ] && [ "x$STRIPES_PER_OBJ" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ" 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" MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
MKFSOPT="" MKFSOPT=""
......
...@@ -53,8 +53,6 @@ MOUNTOPT="" ...@@ -53,8 +53,6 @@ MOUNTOPT=""
MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES" MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
[ "x$STRIPES_PER_OBJ" != "x" ] && [ "x$STRIPES_PER_OBJ" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ" 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" MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
MKFSOPT="" MKFSOPT=""
......
...@@ -47,8 +47,6 @@ MOUNTOPT="" ...@@ -47,8 +47,6 @@ MOUNTOPT=""
MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES" MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
[ "x$STRIPES_PER_OBJ" != "x" ] && [ "x$STRIPES_PER_OBJ" != "x" ] &&
MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ" 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" MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
MKFSOPT="" MKFSOPT=""
......
...@@ -143,8 +143,6 @@ MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT))} ...@@ -143,8 +143,6 @@ MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT))}
[ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo [ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo
rm -rf $DIR/[Rdfs][1-9]* 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 build_test_filter
if [ "${ONLY}" = "MOUNT" ] ; then if [ "${ONLY}" = "MOUNT" ] ; then
...@@ -2905,7 +2903,7 @@ test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly ...@@ -2905,7 +2903,7 @@ test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly
touch $DIR/f72 touch $DIR/f72
chmod 777 $DIR/f72 chmod 777 $DIR/f72
chmod ug+s $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 # See if we are still setuid/sgid
test -u $DIR/f72 -o -g $DIR/f72 && error "S/gid is not dropped on write" test -u $DIR/f72 -o -g $DIR/f72 && error "S/gid is not dropped on write"
# Now test that MDS is updated too # Now test that MDS is updated too
......
...@@ -948,42 +948,14 @@ static inline void badopt(const char *opt, char *type) ...@@ -948,42 +948,14 @@ static inline void badopt(const char *opt, char *type)
usage(stderr); 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) static int add_param(char *buf, char *key, char *val)
{ {
int end = sizeof(((struct lustre_disk_data *)0)->ldd_params); int end = sizeof(((struct lustre_disk_data *)0)->ldd_params);
int start; int start = strlen(buf);
int keylen = 0; int keylen = 0;
char *ptr;
if (key) { if (key)
keylen = strlen(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) { if (start + 1 + keylen + strlen(val) >= end) {
fprintf(stderr, "%s: params are too long-\n%s %s%s\n", fprintf(stderr, "%s: params are too long-\n%s %s%s\n",
progname, buf, key ? key : "", val); progname, buf, key ? key : "", val);
...@@ -1074,8 +1046,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop, ...@@ -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"; char *optstring = "b:c:C:d:ef:Ghi:k:L:m:MnNo:Op:Pqru:vw";
int opt; int opt;
int rc, longidx; 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)) != while ((opt = getopt_long(argc, argv, optstring, long_opt, &longidx)) !=
EOF) { EOF) {
...@@ -1214,18 +1184,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop, ...@@ -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; mop->mo_ldd.ldd_flags |= LDD_F_SV_TYPE_OST;
break; break;
case 'p': 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); rc = add_param(mop->mo_ldd.ldd_params, NULL, optarg);
if (rc) if (rc)
return rc; return rc;
...@@ -1264,22 +1222,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop, ...@@ -1264,22 +1222,6 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
return EINVAL; 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; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment