[Ocfs2-test-devel] [PATCH 1/1] ocfs2-test: making all multiple runners be aware of newly added interface argument.
Sunil Mushran
sunil.mushran at oracle.com
Fri May 13 10:12:37 PDT 2011
Can it handle the case in which eth0 is unused. We have some
machine with flaky onboard cards which get assigned eth0 but
are not used.
On 05/13/2011 12:21 AM, Tristan Ye wrote:
> as ommon func 'openmpi_run()' is supporting a new agrument of interface used for
> MPI messaging, corresponding modification efforts have to be made to teach all
> multiple_nodes runners become aware of this new change, also multiple_run.sh caller
> needs to be more sophisticated to recognize new interface;-)
>
> Signed-off-by: Tristan Ye<tristan.ye at oracle.com>
> ---
> programs/cross_delete/cross_delete.py | 2 +-
> programs/flock_tests/run_flock_unit_test.py | 12 ++++++++++++
> programs/multi_node_mmap/run_multi_mmap.py | 12 ++++++++++++
> programs/open_delete/open_delete.py | 11 +++++++++++
> programs/python_common/multiple_run.sh | 14 +++++++-------
> .../run_write_append_truncate.py | 12 ++++++++++++
> 6 files changed, 55 insertions(+), 8 deletions(-)
>
> diff --git a/programs/cross_delete/cross_delete.py b/programs/cross_delete/cross_delete.py
> index 1ce00cf..9582c67 100755
> --- a/programs/cross_delete/cross_delete.py
> +++ b/programs/cross_delete/cross_delete.py
> @@ -327,8 +327,8 @@ for y in range(count):
> (cmdline, stagedir, options.logfile) ),
> ','.join(nodelist),
> 'ssh',
> - logfile,
> options.interface,
> + logfile,
> 'WAIT')
> if not ret:
> o2tf.printlog(
> diff --git a/programs/flock_tests/run_flock_unit_test.py b/programs/flock_tests/run_flock_unit_test.py
> index ca576ba..5f13255 100644
> --- a/programs/flock_tests/run_flock_unit_test.py
> +++ b/programs/flock_tests/run_flock_unit_test.py
> @@ -37,12 +37,14 @@ DEBUGON = os.getenv('DEBUG',0)
> uname = os.uname()
> lhostname = str(socket.gethostname())
> logfile = config.LOGFILE
> +interface = 'eth0'
> procs = 1
> cmd = config.BINDIR+'/flock_unit_test'
> #
> Usage = """
> %prog
> [-l | --logfile<logfile>]
> +[-i | --interface<interface>]
> [-n | --nodelist<nodelist>]
> [-t | --type] lock type:should be flock or fcntl.
> [-e | --file1<filename1>]
> @@ -67,6 +69,12 @@ if __name__=='__main__':
> type='string',
> help='Logfile used by the process.')
> #
> + parser.add_option('-i',
> + '--interface',
> + dest='interface',
> + type='string',
> + help='NIC used for MPI messaging.')
> +#
> parser.add_option('-n',
> '--nodelist',
> dest='nodelist',
> @@ -129,6 +137,9 @@ if __name__=='__main__':
> if not options.cleanup:
> parser.error('Invalid node list.')
>
> + if options.interface:
> + interface = options.interface
> +
> if DEBUGON:
> o2tf.printlog('flock_unit_test: main - current directory %s' %
> os.getcwd(), logfile, 0, '')
> @@ -145,6 +156,7 @@ ret = o2tf.openmpi_run(DEBUGON, procs,
> logfile)),
> options.nodelist,
> 'ssh',
> + interface,
> logfile,
> 'WAIT')
> #
> diff --git a/programs/multi_node_mmap/run_multi_mmap.py b/programs/multi_node_mmap/run_multi_mmap.py
> index bd6f769..23aac13 100644
> --- a/programs/multi_node_mmap/run_multi_mmap.py
> +++ b/programs/multi_node_mmap/run_multi_mmap.py
> @@ -36,6 +36,7 @@ DEBUGON = os.getenv('DEBUG',0)
> uname = os.uname()
> lhostname = str(socket.gethostname())
> logfile = config.LOGFILE
> +interface = 'eth0'
> procs = 1
> cmd = config.BINDIR+'/multi_mmap'
> #
> @@ -44,6 +45,7 @@ Usage = """
> [-i | --iterations<iterations>]
> [-C | --cleanup]
> [-l | --logfile<logfile>]
> +[-I | --interface<interface>]
> [-n | --nodelist<nodelist>]
> [-t | --truncate] Don\'t create or trunc the file - will fail if it doesn\'t exist.
> [-c | --cache] Populate the local cache by reading the full file first.
> @@ -138,6 +140,12 @@ if __name__=='__main__':
> type='string',
> help='Logfile used by the process.')
> #
> + parser.add_option('-I',
> + '--interface',
> + dest='interface',
> + type='string',
> + help='NIC used by MPI messaging.')
> +#
> parser.add_option('-n',
> '--nodelist',
> dest='nodelist',
> @@ -221,6 +229,9 @@ if __name__=='__main__':
> if options.logfile:
> logfile = options.logfile
>
> + if options.interface:
> + interface = options.interface
> +
> if options.nodelist:
> nodelist = options.nodelist.split(',')
> nodelen = len(nodelist)
> @@ -257,6 +268,7 @@ ret = o2tf.openmpi_run(DEBUGON, procs,
> logfile)),
> options.nodelist,
> 'ssh',
> + interface,
> logfile,
> 'WAIT')
> #
> diff --git a/programs/open_delete/open_delete.py b/programs/open_delete/open_delete.py
> index 5772643..d9f12dc 100755
> --- a/programs/open_delete/open_delete.py
> +++ b/programs/open_delete/open_delete.py
> @@ -42,10 +42,12 @@ uname = os.uname()
> lhostname = str(socket.gethostname())
> numnodes = 0
> logfile = config.LOGFILE
> +interface = 'eth0'
> #
> Usage = '\n %prog [-l|-logfile logfilename] \
> [-f | --file filename] \
> [-i | --interactions count] \
> +[-I | --interface] \
> [-n | --nodes nodelist] \
> [-h|--help]'
> #
> @@ -77,6 +79,12 @@ if __name__=='__main__':
> type='string',
> help='Logfile used by the process.')
> #
> + parser.add_option('-I',
> + '--interface',
> + dest='interface',
> + type='string',
> + help='Nic used by MPI messaging.')
> +#
> parser.add_option('-n',
> '--nodes',
> dest='nodelist',
> @@ -89,6 +97,8 @@ if __name__=='__main__':
> parser.error('incorrect number of arguments')
> if options.logfile:
> logfile = options.logfile
> + if options.interface:
> + interface = options.interface
> count = options.count
> filename = options.filename
> if options.nodelist:
> @@ -115,6 +125,7 @@ ret = o2tf.openmpi_run(DEBUGON,
> filename) ),
> options.nodelist,
> 'ssh',
> + interface,
> options.logfile,
> 'WAIT')
> if not ret:
> diff --git a/programs/python_common/multiple_run.sh b/programs/python_common/multiple_run.sh
> index a6912a8..26b66c2 100755
> --- a/programs/python_common/multiple_run.sh
> +++ b/programs/python_common/multiple_run.sh
> @@ -289,7 +289,7 @@ run_open_delete_test()
> local logfile=${logdir}/open_delete_${DATE}.log
>
> run_common_testcase "open_delete" "sparse,unwritten,inline-data" \
> -"${BINDIR}/open_delete.py -f ${testfile} -i 10000 -l ${logfile} -n ${NODE_LIST}"
> +"${BINDIR}/open_delete.py -f ${testfile} -i 10000 -I ${INTERFACE} -l ${logfile} -n ${NODE_LIST}"
>
> }
>
> @@ -300,7 +300,7 @@ run_cross_delete_test()
> local workplace=${MOUNT_POINT}/cross_delete_test
>
> run_common_testcase "cross_delete" "sparse,unwritten,inline-data" \
> -"${BINDIR}/cross_delete.py -c 1 -d ${workplace} -n ${NODE_LIST} -t ${KERNELSRC}"
> +"${BINDIR}/cross_delete.py -c 1 -i ${INTERFACE} -d ${workplace} -n ${NODE_LIST} -t ${KERNELSRC}"
> }
>
> run_write_append_truncate_test()
> @@ -311,7 +311,7 @@ run_write_append_truncate_test()
> local testfile=${workplace}/write_append_truncate_test_file
>
> run_common_testcase "write_append_truncate" "sparse,unwritten,inline-data" \
> -"${BINDIR}/run_write_append_truncate.py -i 20000 -l ${logfile} -n ${NODE_LIST} -f ${testfile}"
> +"${BINDIR}/run_write_append_truncate.py -i 20000 -I ${INTERFACE} -l ${logfile} -n ${NODE_LIST} -f ${testfile}"
> }
>
> run_multi_mmap_test()
> @@ -322,7 +322,7 @@ run_multi_mmap_test()
> local testfile=${workplace}/multi_mmap_test_file
>
> run_common_testcase "multi_mmap" "sparse,unwritten,inline-data" \
> -"${BINDIR}/run_multi_mmap.py -i 20000 -n ${NODE_LIST} -c -b 6000 --hole -f ${testfile}"
> +"${BINDIR}/run_multi_mmap.py -i 20000 -I ${INTERFACE} -n ${NODE_LIST} -c -b 6000 --hole -f ${testfile}"
> }
>
> run_create_racer_test()
> @@ -332,7 +332,7 @@ run_create_racer_test()
> local workplace=${MOUNT_POINT}/create_racer_test
>
> run_common_testcase "create_racer" "sparse,unwritten,inline-data" \
> -"${BINDIR}/run_create_racer.py -i 40000 -l ${logfile} -n ${NODE_LIST} -p ${workplace}"
> +"${BINDIR}/run_create_racer.py -c 40000 -i ${INTERFACE} -l ${logfile} -n ${NODE_LIST} -p ${workplace}"
> }
>
> run_xattr_test()
> @@ -412,7 +412,7 @@ ${DEVICE} ${FEATURES} ${JOURNALSIZE} ${BLOCKS}
>
> LogMsg "Run lvb_torture, CMD: ${BINDIR}/run_lvb_torture.py -d /dlm/ -i 60000 \
> -H ${DEVICE} -l ${logfile} -n ${NODE_LIST} "${UUID}" "${LOCK}""
> - ${BINDIR}/run_lvb_torture.py -d /dlm/ -i 60000 -H ${DEVICE} -l \
> + ${BINDIR}/run_lvb_torture.py -d /dlm/ -c 60000 -i ${INTERFACE} -H ${DEVICE} -l \
> ${logfile} -n ${NODE_LIST} "${UUID}" "${LOCK}">> ${LOGFILE} 2>&1
> LogRC $?
>
> @@ -437,7 +437,7 @@ run_flock_unit_test()
> run_common_testcase "flock_unit" "sparse,unwritten,inline-data" \
> "${TOUCH_BIN} ${testfile1}&& ${TOUCH_BIN} ${testfile2}&& ${BINDIR}/run_flock_unit_test.py \
> -l ${fcntl_logfile} -n ${NODE_LIST} -t fcntl -e ${testfile1} -f ${testfile2} \
> -&& ${BINDIR}/run_flock_unit_test.py -l ${flock_logfile} -n ${NODE_LIST} -t \
> +&& ${BINDIR}/run_flock_unit_test.py -l ${flock_logfile} -i ${INTERFACE} -n ${NODE_LIST} -t \
> flock -e ${testfile1} -f ${testfile2}"
> }
>
> diff --git a/programs/write_append_truncate/run_write_append_truncate.py b/programs/write_append_truncate/run_write_append_truncate.py
> index 981a42a..60f3739 100644
> --- a/programs/write_append_truncate/run_write_append_truncate.py
> +++ b/programs/write_append_truncate/run_write_append_truncate.py
> @@ -35,12 +35,14 @@ DEBUGON = os.getenv('DEBUG',0)
> uname = os.uname()
> lhostname = str(socket.gethostname())
> logfile = config.LOGFILE
> +interface = 'eth0'
> procs = 1
> cmd = config.BINDIR+'/write_append_truncate'
> #
> Usage = """
> %prog
> [-i | --iterations<iterations>]
> +[-I | --interface<interface>]
> [-C | --cleanup]
> [-l | --logfile<logfile>]
> [-n | --nodelist<nodelist>]
> @@ -84,6 +86,12 @@ if __name__=='__main__':
> type='string',
> help='Logfile used by the process.')
> #
> + parser.add_option('-I',
> + '--interface',
> + dest='interface',
> + type='string',
> + help='NIC used by MPI messaging.')
> +#
> parser.add_option('-n',
> '--nodelist',
> dest='nodelist',
> @@ -119,6 +127,9 @@ if __name__=='__main__':
> if options.logfile:
> logfile = options.logfile
>
> + if options.interface:
> + interface = options.interface
> +
> if options.nodelist:
> nodelist = options.nodelist.split(',')
> nodelen = len(nodelist)
> @@ -148,6 +159,7 @@ ret = o2tf.openmpi_run(DEBUGON, procs,
> logfile)),
> options.nodelist,
> 'ssh',
> + interface,
> logfile,
> 'WAIT')
> #
More information about the Ocfs2-test-devel
mailing list