Problem has been encountered causing sanity-hsm/test_402 errors
because copytool threads were found still alive after MDCs
deactivation. This appears to be due to no ct_setup() error
handling with continuing+unnecessary startup actions to occur.
Also, now that copytool will exit earlier, HSMTOOL_NOERROR variable
has been added to allow errors in copytool_setup().
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I108ea679faf2731f2a64fb08d2f8fba9db01c71f
Reviewed-on: http://review.whamcloud.com/9853
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
# archive is purged at copytool setup
HSM_ARCHIVE_PURGE=true
# archive is purged at copytool setup
HSM_ARCHIVE_PURGE=true
+
+ # Don't allow copytool error upon start/setup
+ HSMTOOL_NOERROR=false
}
# Get the backend root path for the given agent facet.
}
# Get the backend root path for the given agent facet.
[[ -z "$TESTNAME" ]] || prefix=$prefix.$TESTNAME
local copytool_log=$prefix.copytool${arc_id}_log.$agent.log
[[ -z "$TESTNAME" ]] || prefix=$prefix.$TESTNAME
local copytool_log=$prefix.copytool${arc_id}_log.$agent.log
- do_facet $facet "$cmd < /dev/null > $copytool_log 2>&1" ||
- error "start copytool $facet on $agent failed"
+ do_facet $facet "$cmd < /dev/null > $copytool_log 2>&1"
+ if [[ $? != 0 ]]; then
+ [[ $HSMTOOL_NOERROR == true ]] ||
+ error "start copytool $facet on $agent failed"
+ echo "start copytool $facet on $agent failed"
+ fi
+
# deactivate all mdc on agent1
mdc_change_state $SINGLEAGT "$FSNAME-MDT000." "deactivate"
# deactivate all mdc on agent1
mdc_change_state $SINGLEAGT "$FSNAME-MDT000." "deactivate"
- copytool_setup $SINGLEAGT
+ HSMTOOL_NOERROR=true copytool_setup $SINGLEAGT
check_agent_unregistered "uuid" # match any agent
check_agent_unregistered "uuid" # match any agent
if (rc < 0) {
CT_ERROR(rc, "cannot find a Lustre filesystem mounted at '%s'",
opt.o_mnt);
if (rc < 0) {
CT_ERROR(rc, "cannot find a Lustre filesystem mounted at '%s'",
opt.o_mnt);
+ rc = ct_setup();
+ if (rc < 0)
+ goto error_cleanup;
switch (opt.o_action) {
case CA_IMPORT:
switch (opt.o_action) {
case CA_IMPORT:
" rc=%d (%s)", err_major, err_minor, rc,
strerror(-rc));
" rc=%d (%s)", err_major, err_minor, rc,
strerror(-rc));
ct_cleanup();
return -rc;
ct_cleanup();
return -rc;