fi
-echo replication sanity: $LREPLICATE_TEST
[ "$LREPLICATE_TEST" != "no" ] && skip_remmds lreplicate-test && LREPLICATE_TEST=no && MSKIPPED=1
[ "$LREPLICATE_TEST" != "no" ] && skip_remost lreplicate-test && LREPLICATE_TEST=no && OSKIPPED=1
if [ "$LREPLICATE_TEST" != "no" ]; then
$KILL -SIGCONT $child_pid
sleep 60
- $KILL -SIGKILL $child_pid
+ $KILL -SIGKILL $(pgrep run_iozone.sh)
+ $KILL -SIGKILL $(pgrep iozone)
+
+ # After killing 'run_iozone.sh', process 'iozone' becomes the
+ # child of PID 1. Hence 'wait' does not wait for it. Killing
+ # iozone first, means more iozone processes are spawned off which
+ # is not desirable. So, after sending a sigkill, the test goes
+ # into a wait loop for iozone to cleanup and exit.
+ wait
+ while [ "$(pgrep "iozone")" != "" ];
+ do
+ ps -ef | grep iozone | grep -v grep
+ sleep 1;
+ done
$LREPLICATE -l $LREPL_LOG
check_diff $DIR/$tdir $TGT/$tdir
cd $ORIG_PWD
check_and_cleanup_lustre
echo '=========================== finished ==============================='
-[ -f "$REPLOG" ] && cat $REPLLOG && grep -q FAIL $REPLLOG && exit 1 || true
+[ -f "$REPLLOG" ] && cat $REPLLOG && grep -q FAIL $REPLLOG && exit 1 || true
echo "$0: completed"
printf("Using rsync: %s (%s)\n", rsync, rsync_ver);
}
+DECLARE_CHANGELOG_NAMES;
+
+void lr_print_failure(struct lr_info *info, int rc)
+{
+ fprintf(stderr, "Replication of operation failed(%d):"
+ " %lld %s (%d) %s %s %s\n", rc, info->recno,
+ changelog_str[info->type], info->type, info->tfid,
+ info->pfid, info->name);
+}
+
/* Replicate filesystem operations from src_path to target_path */
int lr_replicate()
{
break;
}
if (rc && rc != -ENOENT) {
- fprintf(stderr, "Replication of operation %d, "
- "index %lld failed: %d\n",
- info->type, info->recno, rc);
+ lr_print_failure(info, rc);
errors++;
if (abort_on_err)
break;