Whamcloud - gitweb
Mostly fixes related to using failover MDSs along lmv. This is also related to active...
authoryury <yury>
Thu, 10 Jun 2004 15:10:57 +0000 (15:10 +0000)
committeryury <yury>
Thu, 10 Jun 2004 15:10:57 +0000 (15:10 +0000)
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

lustre/ptlrpc/recover.c
lustre/tests/lmv.sh
lustre/tests/sanity.sh
lustre/utils/lconf
lustre/utils/lmc

index 14c9d60..a719b43 100644 (file)
@@ -105,7 +105,7 @@ void ptlrpc_run_failed_import_upcall(struct obd_import* imp)
         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 {
index d82d08a..53983f8 100755 (executable)
@@ -39,10 +39,9 @@ ${LMC} -m $config --add net --node localhost --nid localhost --nettype tcp || ex
 ${LMC} -m $config --add lmv --lmv lmv1 || exit 12
 
 for num in `seq $MDSCOUNT`; do
-    mopt="--master"
     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
 done
 
 # configure ost
index 073b1e5..f380b63 100644 (file)
@@ -8,7 +8,7 @@ set -e
 
 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
index 455ab96..787321f 100755 (executable)
@@ -1511,7 +1511,6 @@ class MDSDEV(Module):
             self.active = 0
         if self.active and config.group and config.group != mds.get_val('group'):
             self.active = 0
-        self.active = 1
 
         self.inode_size = self.db.get_val_int('inodesize', 0)
         if self.inode_size == 0:
@@ -2165,14 +2164,17 @@ class COBD(Module):
         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 load_module(self):
         self.real.load_module()
         Module.load_module(self)
+
     def cleanup_module(self):
         Module.cleanup_module(self)
         self.real.cleanup_module()
@@ -2187,6 +2189,9 @@ class VOSC(Module):
         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):
@@ -2204,14 +2209,14 @@ class VOSC(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':
-            self.mdc = LMV(db, uuid, fs_name)
+            self.mdc = LMV(db, client_uuid, name)
         elif db.get_class() == 'cobd':
-            self.mdc = COBD(db, uuid, fs_name, 'mds')
+            self.mdc = COBD(db, client_uuid, name, 'mds')
         else:
-            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):
@@ -2269,7 +2274,6 @@ def generate_client_uuid(name):
                                                int(random.random() * 1048576))
         return client_uuid[:36]
 
-
 class Mountpoint(Module):
     def __init__(self,db):
         Module.__init__(self, 'MTPT', db)
@@ -2284,17 +2288,20 @@ class Mountpoint(Module):
         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')
-       self.vmdc = VMDC(self.mds, client_uuid, self.name, self.mds_uuid)
-       self.mdc = self.vmdc.mdc
         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)
index 9878980..6d63f19 100755 (executable)
@@ -94,7 +94,6 @@ Object creation command summary:
   --journal_size size
   --inode_size size
   --lmv lmv_name
-  --master
   --mkfsoptions options
   --mountfsoptions options
 
@@ -236,7 +235,6 @@ lmc_options = [
 
     # lmv
     ('lmv', "Specify LMV name.", PARAM,""),
-    ('master', "Specify master MDS in LMV"),
     ]
 
 def error(*args):
@@ -469,8 +467,6 @@ class GenConfig:
         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,
@@ -599,6 +595,9 @@ def get_net_uuid(lustre, node_name):
 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:
@@ -759,19 +758,19 @@ def add_mds(gen, lustre, options):
     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)
-       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)
         lustre.appendChild(mds)
+        if lmv_name:
+            lmv_add_obd(gen, lmv, mds_uuid)
     else:
         mds = lookup(lustre, mds_uuid)
+
     if options.failover:
         mds.setAttribute('failover', "1")
 
@@ -795,10 +794,7 @@ def add_mds(gen, lustre, options):
         error("NODE: ", node_name, "not found")
 
     if lmv_name:
-        lmv.appendChild(gen.ref("mds", mds_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,