Also fixed the following:
* name of lproc entry where lustre upcall can be seen in error message if upcall is failed.
* removed --master option which was supposed to work along with lmv and now it is obsoleted.
* clanups and fixes both in lconf and lmc
rc = USERMODEHELPER(argv[0], argv, envp);
if (rc < 0) {
CERROR("Error invoking recovery upcall %s %s %s %s %s: %d; "
rc = USERMODEHELPER(argv[0], argv, envp);
if (rc < 0) {
CERROR("Error invoking recovery upcall %s %s %s %s %s: %d; "
- "check /proc/sys/lustre/lustre_upcall\n",
+ "check /proc/sys/lustre/upcall\n",
argv[0], argv[1], argv[2], argv[3], argv[4],rc);
} else {
argv[0], argv[1], argv[2], argv[3], argv[4],rc);
} else {
${LMC} -m $config --add lmv --lmv lmv1 || exit 12
for num in `seq $MDSCOUNT`; do
${LMC} -m $config --add lmv --lmv lmv1 || exit 12
for num in `seq $MDSCOUNT`; do
MDSDEV=$TMP/mds${num}-`hostname`
${LMC} -m $config --format --add mds --node localhost --mds mds${num} \
MDSDEV=$TMP/mds${num}-`hostname`
${LMC} -m $config --format --add mds --node localhost --mds mds${num} \
- --lmv lmv1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE $mopt || exit 13
+ --lmv lmv1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE || exit 13
ONLY=${ONLY:-"$*"}
# bug number for skipped test: 2108
ONLY=${ONLY:-"$*"}
# bug number for skipped test: 2108
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"24j 48c 48d 58"}
+ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"24a 24b 24c 24d 24e 24f 24g 24h 24i 24j 24k 24l 24m 24n 58"}
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
case `uname -r` in
2.6.*) ALWAYS_EXCEPT="$ALWAYS_EXCEPT 54c 55" # bug 3117
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
case `uname -r` in
2.6.*) ALWAYS_EXCEPT="$ALWAYS_EXCEPT 54c 55" # bug 3117
self.active = 0
if self.active and config.group and config.group != mds.get_val('group'):
self.active = 0
self.active = 0
if self.active and config.group and config.group != mds.get_val('group'):
self.active = 0
self.inode_size = self.db.get_val_int('inodesize', 0)
if self.inode_size == 0:
self.inode_size = self.db.get_val_int('inodesize', 0)
if self.inode_size == 0:
lctl.newdev("cobd", self.name, self.uuid,
setup ="%s %s" %(self.real.name,
self.cache.name))
lctl.newdev("cobd", self.name, self.uuid,
setup ="%s %s" %(self.real.name,
self.cache.name))
def cleanup(self):
if is_prepared(self.name):
Module.cleanup(self)
self.real.cleanup()
self.cache.cleanup()
def cleanup(self):
if is_prepared(self.name):
Module.cleanup(self)
self.real.cleanup()
self.cache.cleanup()
def load_module(self):
self.real.load_module()
Module.load_module(self)
def load_module(self):
self.real.load_module()
Module.load_module(self)
def cleanup_module(self):
Module.cleanup_module(self)
self.real.cleanup_module()
def cleanup_module(self):
Module.cleanup_module(self)
self.real.cleanup_module()
elif db.get_class() == 'cobd':
self.osc = COBD(db, client_uuid, name, 'obd')
self.type = 'cobd'
elif db.get_class() == 'cobd':
self.osc = COBD(db, client_uuid, name, 'obd')
self.type = 'cobd'
+ else:
+ self.osc = OSC(db, client_uuid, name)
+ self.type = 'osc'
def get_uuid(self):
return self.osc.get_uuid()
def get_name(self):
def get_uuid(self):
return self.osc.get_uuid()
def get_name(self):
# virtual interface for MDC and LMV
class VMDC(Module):
# virtual interface for MDC and LMV
class VMDC(Module):
- def __init__(self, db, uuid, fs_name, name_override = None):
+ def __init__(self, db, client_uuid, name, name_override = None):
Module.__init__(self, 'VMDC', db)
if db.get_class() == 'lmv':
Module.__init__(self, 'VMDC', db)
if db.get_class() == 'lmv':
- self.mdc = LMV(db, uuid, fs_name)
+ self.mdc = LMV(db, client_uuid, name)
elif db.get_class() == 'cobd':
elif db.get_class() == 'cobd':
- self.mdc = COBD(db, uuid, fs_name, 'mds')
+ self.mdc = COBD(db, client_uuid, name, 'mds')
- self.mdc = MDC(db, uuid, fs_name)
+ self.mdc = MDC(db, client_uuid, name)
def get_uuid(self):
return self.mdc.uuid
def get_name(self):
def get_uuid(self):
return self.mdc.uuid
def get_name(self):
int(random.random() * 1048576))
return client_uuid[:36]
int(random.random() * 1048576))
return client_uuid[:36]
class Mountpoint(Module):
def __init__(self,db):
Module.__init__(self, 'MTPT', db)
class Mountpoint(Module):
def __init__(self,db):
Module.__init__(self, 'MTPT', db)
client_uuid = generate_client_uuid(self.name)
ost = self.db.lookup(self.obd_uuid)
client_uuid = generate_client_uuid(self.name)
ost = self.db.lookup(self.obd_uuid)
- self.vosc = VOSC(ost, client_uuid, self.name)
-
- self.mds = self.db.lookup(self.mds_uuid)
- if not self.mds:
+ if not ost:
+ panic("no ost: ", self.obd_uuid)
+
+ mds = self.db.lookup(self.mds_uuid)
+ if not mds:
panic("no mds: ", self.mds_uuid)
self.add_lustre_module('mdc', 'mdc')
self.add_lustre_module('lmv', 'lmv')
panic("no mds: ", self.mds_uuid)
self.add_lustre_module('mdc', 'mdc')
self.add_lustre_module('lmv', 'lmv')
- self.vmdc = VMDC(self.mds, client_uuid, self.name, self.mds_uuid)
- self.mdc = self.vmdc.mdc
self.add_lustre_module('llite', 'llite')
self.add_lustre_module('llite', 'llite')
+
+ self.vosc = VOSC(ost, client_uuid, self.name)
+ self.vmdc = VMDC(mds, client_uuid, self.name)
+
if self.mgmt_uuid:
self.mgmtcli = ManagementClient(db.lookup(self.mgmt_uuid),
client_uuid)
if self.mgmt_uuid:
self.mgmtcli = ManagementClient(db.lookup(self.mgmt_uuid),
client_uuid)
--journal_size size
--inode_size size
--lmv lmv_name
--journal_size size
--inode_size size
--lmv lmv_name
--mkfsoptions options
--mountfsoptions options
--mkfsoptions options
--mountfsoptions options
# lmv
('lmv', "Specify LMV name.", PARAM,""),
# lmv
('lmv', "Specify LMV name.", PARAM,""),
- ('master', "Specify master MDS in LMV"),
mds.appendChild(self.ref("active",mdd_uuid))
if group:
self.addElement(mds, "group", group)
mds.appendChild(self.ref("active",mdd_uuid))
if group:
self.addElement(mds, "group", group)
- if lmv:
- lmv.appendChild(self.ref("active", uuid))
return mds
def mdsdev(self, name, uuid, fstype, devname, format, node_uuid,
return mds
def mdsdev(self, name, uuid, fstype, devname, format, node_uuid,
def lov_add_obd(gen, lov, osc_uuid):
lov.appendChild(gen.ref("obd", osc_uuid))
def lov_add_obd(gen, lov, osc_uuid):
lov.appendChild(gen.ref("obd", osc_uuid))
+def lmv_add_obd(gen, lmv, mdc_uuid):
+ lmv.appendChild(gen.ref("mds", mdc_uuid))
+
def ref_exists(profile, uuid):
elist = profile.childNodes
for e in elist:
def ref_exists(profile, uuid):
elist = profile.childNodes
for e in elist:
if lmv_name:
lmv = findByName(lustre, lmv_name, "lmv")
if not lmv:
if lmv_name:
lmv = findByName(lustre, lmv_name, "lmv")
if not lmv:
- error('add_mds:', '"'+lmv_name+'"', "lmv element not found.")
+ error('add_mds:', '"' + lmv_name + '"', "lmv element not found.")
lmv_uuid = name2uuid(lustre, lmv_name, fatal=0)
mds_uuid = name2uuid(lustre, mds_name, 'mds', fatal=0)
if not mds_uuid:
mds_uuid = new_uuid(mds_name)
lmv_uuid = name2uuid(lustre, lmv_name, fatal=0)
mds_uuid = name2uuid(lustre, mds_name, 'mds', fatal=0)
if not mds_uuid:
mds_uuid = new_uuid(mds_name)
- if not lmv_name:
- mds = gen.mds(mds_name, mds_uuid, mdd_uuid, options.group)
- else:
- mds = gen.mds(mds_name, mds_uuid, mdd_uuid, options.group, lmv)
+ mds = gen.mds(mds_name, mds_uuid, mdd_uuid, options.group)
+ if lmv_name:
+ lmv_add_obd(gen, lmv, mds_uuid)
else:
mds = lookup(lustre, mds_uuid)
else:
mds = lookup(lustre, mds_uuid)
if options.failover:
mds.setAttribute('failover', "1")
if options.failover:
mds.setAttribute('failover', "1")
error("NODE: ", node_name, "not found")
if lmv_name:
error("NODE: ", node_name, "not found")
if lmv_name:
- lmv.appendChild(gen.ref("mds", mds_uuid))
mds.appendChild(gen.ref("lmv", lmv_uuid))
mds.appendChild(gen.ref("lmv", lmv_uuid))
- if options.master:
- mds.setAttribute('master', "1")
mdd = gen.mdsdev(mdd_name, mdd_uuid, fstype, devname,
get_format_flag(options), node_uuid, mds_uuid,
mdd = gen.mdsdev(mdd_name, mdd_uuid, fstype, devname,
get_format_flag(options), node_uuid, mds_uuid,