<!ATTLIST lustre version CDATA #REQUIRED>
<!ELEMENT node (network | routetbl | profile_ref | timeout |
- lustreUpcall | portalsUpcall)*>
+ lustreUpcall | portalsUpcall | ptldebug | subsystem)*>
<!ATTLIST node %object.attr;
router CDATA #IMPLIED>
<!-- basic elements -->
<!ELEMENT recoveryUpcall %object.content;>
<!ELEMENT timeout %object.content;>
+<!ELEMENT ptldebug %object.content;>
+<!ELEMENT subsystem %object.content;>
<!ELEMENT journalsize %object.content;>
<!ELEMENT fstype %object.content;>
<!ELEMENT nid %object.content;>
<if test="portalsUpcall">
portalsUpcall: <value-of select="portalsUpcall"/>
</if>
+<if test="ptldebug">
+ptldebug: <value-of select="ptldebug"/>
+</if>
+<if test="subsystem">
+subsystem: <value-of select="subsystem"/>
+</if>
<text>
</text>
<for-each select="network">
DIR=${DIR:-$MOUNT}
DIR2=${DIR2:-$MOUNT1}
PTLDEBUG=${PTLDEBUG:-0x3f0400}
+SUBSYSTEM=${SUBSYSTEM:-0}
PDSH=${PDSH:-no_dsh}
MDSDEV=${MDSDEV:-$ROOT/tmp/mds-`hostname`}
}
run_test 8 "double mount setup"
+test_9() {
+ # backup the old values of PTLDEBUG and SUBSYSTEM
+ OLDPTLDEBUG=$PTLDEBUG
+ OLDSUBSYSTEM=$SUBSYSTEM
+
+ # generate new configuration file with lmc --ptldebug and --subsystem
+ PTLDEBUG="trace"
+ SUBSYSTEM="mdc"
+ gen_config
+
+ # check the result of lmc --ptldebug/subsystem
+ start_ost
+ start_mds
+ mount_client $MOUNT
+ [ "`cat /proc/sys/portals/debug`" = "1" ] && \
+ echo "lmc --debug success" || return 1
+ [ "`cat /proc/sys/portals/subsystem_debug`" = "16777216" ] && \
+ echo "lmc --subsystem success" || return 1
+ check_mount || return 41
+ cleanup
+
+ # the new PTLDEBUG/SUBSYSTEM used for lconf --ptldebug/subsystem
+ PTLDEBUG="inode"
+ SUBSYSTEM="mds"
+
+ # check lconf --ptldebug/subsystem overriding lmc --ptldebug/subsystem
+ start_ost
+ start_mds
+ mount_client $MOUNT
+ [ "`cat /proc/sys/portals/debug`" = "2" ] && \
+ echo "lconf --debug overriding success" || return 1
+ [ "`cat /proc/sys/portals/subsystem_debug`" = "33554432" ] && \
+ echo "lconf --subsystem overriding success" || return 1
+ check_mount || return 41
+ cleanup
+
+ # resume the old configuration
+ PTLDEBUG=$OLDPTLDEBUG
+ SUBSYSTEM=$OLDSUBSYSTEM
+ gen_config
+}
+run_test 9 "test --ptldebug and --subsystem for lmc"
+
equals_msg "Done"
facet=$1
shift
active=`facet_active $facet`
- do_facet $facet $LCONF --select ${facet}_svc=${active}_facet --node ${active}_facet --ptldebug $PTLDEBUG $@ $XMLCONFIG
+ do_facet $facet $LCONF --select ${facet}_svc=${active}_facet \
+ --node ${active}_facet --ptldebug $PTLDEBUG --subsystem $SUBSYSTEM \
+ $@ $XMLCONFIG
}
stop() {
facet=$1
active=`facet_active $facet`
shift
- do_facet $facet $LCONF --select ${facet}_svc=${active}_facet --node ${active}_facet --ptldebug $PTLDEBUG $@ --cleanup $XMLCONFIG
+ do_facet $facet $LCONF --select ${facet}_svc=${active}_facet \
+ --node ${active}_facet --ptldebug $PTLDEBUG --subsystem $SUBSYSTEM \
+ $@ --cleanup $XMLCONFIG
}
zconf_mount() {
facet=$1
shift
rm -f ${facet}active
- add_facet $facet --lustre_upcall $UPCALL
+ add_facet $facet --lustre_upcall $UPCALL --ptldebug $PTLDEBUG \
+ --subsystem $SUBSYSTEM
do_lmc --add mds --node ${facet}_facet --mds ${facet}_svc $*
}
lustre_upcall = node_db.get_val('lustreUpcall', '')
portals_upcall = node_db.get_val('portalsUpcall', '')
timeout = node_db.get_val_int('timeout', 0)
+ ptldebug = node_db.get_val('ptldebug', '')
+ subsystem = node_db.get_val('subsystem', '')
find_local_clusters(node_db)
if not is_router:
return
sys_set_timeout(timeout)
- sys_set_ptldebug()
- sys_set_subsystem()
+ sys_set_ptldebug(ptldebug)
+ sys_set_subsystem(subsystem)
sys_set_lustre_upcall(lustre_upcall)
sys_set_portals_upcall(portals_upcall)
for_each_profile(node_db, prof_list, doModules)
sys_set_debug_path()
- sys_set_ptldebug()
- sys_set_subsystem()
+ sys_set_ptldebug(ptldebug)
+ sys_set_subsystem(subsystem)
script = config.gdb_script
run(lctl.lctl, ' modules >', script)
if config.gdb:
def sys_optimize_elan ():
run ("echo 0 > /proc/elan/config/eventint_punt_loops")
-def sys_set_ptldebug():
- if config.ptldebug != None:
+def sys_set_ptldebug(ptldebug):
+ if config.ptldebug:
+ ptldebug = config.ptldebug
+ if ptldebug:
try:
- val = eval(config.ptldebug, ptldebug_names)
- val = "0x%x" % (val,)
+ val = eval(ptldebug, ptldebug_names)
+ val = "0x%x" % (val)
sysctl('portals/debug', val)
except NameError, e:
panic(str(e))
-def sys_set_subsystem():
- if config.subsystem != None:
+def sys_set_subsystem(subsystem):
+ if config.subsystem:
+ subsystem = config.subsystem
+ if subsystem:
try:
- val = eval(config.subsystem, subsystem_names)
- val = "0x%x" % (val,)
+ val = eval(subsystem, subsystem_names)
+ val = "0x%x" % (val)
sysctl('portals/subsystem_debug', val)
except NameError, e:
panic(str(e))
--upcall path
--lustre_upcall path
--portals_upcall path
+ --ptldebug debug_level
+ --subsystem subsystem_name
--add net
--node node_name
('upcall', "Set both lustre and portals upcall scripts.", PARAM),
('lustre_upcall', "Set location of lustre upcall script.", PARAM),
('portals_upcall', "Set location of portals upcall script.", PARAM),
+ ('ptldebug', "Set the portals debug level", PARAM),
+ ('subsystem', "Specify which Lustre subsystems have debug output recorded in the log", PARAM),
# network
('nettype', "Specify the network type. This can be tcp/elan/gm/scimac.", PARAM),
gen.addElement(node, 'portalsUpcall', options.portals_upcall)
else:
gen.addElement(node, 'portalsUpcall', default_upcall)
+ if options.ptldebug:
+ gen.addElement(node, "ptldebug", get_option(options, 'ptldebug'))
+ if options.subsystem:
+ gen.addElement(node, "subsystem", get_option(options, 'subsystem'))
return node
def do_add_node(gen, lustre, options, node_name):