Commit 00e9031c authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Changed some default hardcoded values in the code to match the usages and castor.conf

parent 1fc9d80d
......@@ -134,7 +134,7 @@ namespace tapebridge {
* The value of this parameter defines the mode of flush behaviour used when
* writing data to tape.
*/
const uint32_t TAPEBRIDGE_TAPEFLUSHMODE = TAPEBRIDGE_N_FLUSHES_PER_FILE;
const uint32_t TAPEBRIDGE_TAPEFLUSHMODE = TAPEBRIDGE_ONE_FLUSH_PER_N_FILES;
/**
* The compile-time default value of the tapebridged configuration parameter
......@@ -149,7 +149,7 @@ namespace tapebridge {
* used over multiple files as defined by the parameter named
* TAPEBRIDGE/USEBUFFEREDTAPEMARKSOVERMULTIPLEFILES.
*/
const uint64_t TAPEBRIDGE_MAXBYTESBEFOREFLUSH = 8589934592ULL; // 8 GiB
const uint64_t TAPEBRIDGE_MAXBYTESBEFOREFLUSH = 32000000000ULL; // 32 GB
/**
* The compile-time default value of the tapebridged configuration parameter
......@@ -162,7 +162,7 @@ namespace tapebridge {
* used over multiple files as defined by the parameter named
* TAPEBRIDGE/USEBUFFEREDTAPEMARKSOVERMULTIPLEFILES.
*/
const uint64_t TAPEBRIDGE_MAXFILESBEFOREFLUSH = 1;
const uint64_t TAPEBRIDGE_MAXFILESBEFOREFLUSH = 200;
/**
* When the tapegatewayd daemon is asked for a set of files to migrate to
......
......@@ -392,8 +392,8 @@ DiskManager migrWeight 10
# RFIO/RFIOD
#
RFIO CONNTIMEOUT 10 # Timeout on the connect() system call
RFIO CONRETRY 10 # Number of connection retry
RFIO CONRETRYINT 1 # Number of second between every retry
RFIO CONRETRY 3 # Number of connection retry
RFIO CONRETRYINT 10 # Number of second between every retry
RFIO DAEMONV3_RDSIZE 2097152 # Daemon buffer size for read
RFIO DAEMONV3_WRSIZE 2097152 # Daemon buffer size for write
RFIO DAEMONV3_RDMT_BUFSIZE 2097152 # Daemon buffer size for read in multithreaded mode
......@@ -469,8 +469,8 @@ RFIOD LOGFILE /var/log/castor/rfiod.log
## Tape ########################################################################
ACCT RTCOPY YES # Rtcopy accounting
ACCT TAPE YES # Tape accounting
#ACCT RTCOPY NO # Rtcopy accounting
#ACCT TAPE NO # Tape accounting
#RMC PORT 5014 # TCP port for RMC daemon and client
# to work with (5014 is the default)
......@@ -516,9 +516,9 @@ ACCT TAPE YES # Tape accounting
#ADMIN HOSTS host1 host2 ...
# Config the drive down in case of a tape alert (YES/NO). If the option is omitted,
# the default value (YES) will be used.
# the default value (NO) will be used.
#
TAPE DOWN_ON_TPALERT YES
#TAPE DOWN_ON_TPALERT NO
# Config the drive down in case of an unload failure (YES/NO). If the option is
# omitted, the default value (YES) will be used.
......@@ -532,7 +532,7 @@ TAPE DOWN_ON_TPALERT YES
#
# If the option is omitted, the default value (CANCEL) will be used.
#
TAPE BADMIR_HANDLING REPAIR
#TAPE BADMIR_HANDLING CANCEL
# Let tape daemon confirm its idle state to VDQM at certain intervals (this is to
# cleanup inconsistencies where VDQM sees a drive busy, while tape daemon reports the
......@@ -587,9 +587,9 @@ TAPE BADMIR_HANDLING REPAIR
# them can be specified (default values: 3 attempts, at a 60 seconds interval).
# After that the drive is put down.
#
TAPE CRASHED_RLS_HANDLING RETRY
#TAPE CRASHED_RLS_HANDLING RETRY
#TAPE CRASHED_RLS_HANDLING_RETRIES 3
#TAPE CRASHED_RLS_HANDLING_RETRY_DELAY 60
#TAPE CRASHED_RLS_HANDLING_RETRY_DELAY 300
# Define the tape logging facility (relevant for tape daemon and rtcpd)
#
......@@ -615,8 +615,8 @@ TAPE CRASHED_RLS_HANDLING RETRY
#
# <delay> is the delay between retry attempts in seconds
#
TAPE ACS_MOUNT_LIBRARY_FAILURE_HANDLING retry 1 300
TAPE ACS_UNMOUNT_LIBRARY_FAILURE_HANDLING retry 1 300
#TAPE ACS_MOUNT_LIBRARY_FAILURE_HANDLING retry 3 300
#TAPE ACS_UNMOUNT_LIBRARY_FAILURE_HANDLING retry 3 300
# Relax the blank tape checking (YES/NO).
#
......
......@@ -223,7 +223,7 @@
#endif /* NB_RTCP_BUFS */
#if !defined(RTCP_BUFS)
#define RTCP_BUFSZ (4 * 1024 * 1024)
#define RTCP_BUFSZ (5 * 1024 * 1024)
#endif /* RTCP_BUFSZ */
#if !defined(RTCPC_PING_INTERVAL)
......
......@@ -168,7 +168,7 @@ typedef struct processing_status {
((__p = getconfent(#X,#Y,0)) != NULL) ) Z = atoi(__p); \
else Z = X##_##Y;}
#define RTCOPYD_MOUNT_TIME 60*60
#define RTCOPYD_MOUNT_TIME 15*60
#define RTCOPYD_POSITION_TIME 60*60
#define RTCOPYD_OPEN_TIME 5*60
#define RTCOPYD_READ_TIME 5*60
......
......@@ -42,7 +42,7 @@ int rtcp_wacct(int subtype,
char *getconfent();
char *p;
if ((p = getconfent("ACCT", "RTCOPY", 0)) == NULL ||
if ((p = getconfent("ACCT", "RTCOPY", 0)) != NULL &&
(strcmp (p, "YES") != 0 && strcmp (p, "yes")) != 0) return(0);
memset ((char *) &acctrtcp, 0, sizeof(struct acctrtcp));
acctrtcp.subtype = subtype;
......
......@@ -329,9 +329,10 @@ int rtcpd_StartMonitor(int pool_size) {
static int _pool_size;
char *p;
if ( ((p = getenv("RTCOPYD_SELF_MONITOR")) == NULL) &&
((p = getconfent("RTCOPYD","SELF_MONITOR",0)) == NULL) ) return(0);
if ( strcmp(p,"NO") == 0 ) return(0);
if ( ((p = getenv("RTCOPYD_SELF_MONITOR")) != NULL) ||
((p = getconfent("RTCOPYD","SELF_MONITOR",0)) == NULL) ) {
if ( strcmp(p,"NO") == 0 ) return(0);
}
if ( pool_size > 0 ) _pool_size = pool_size;
return(Cthread_create_detached(rtcpd_MonitorThread,(void *)&_pool_size));
}
......
......@@ -289,6 +289,11 @@ static int actionChanged(int cc, int rt, short *act, int *slp, int *rtr) {
if (*slp<60) {*slp = 60;}
changed = 1;
}
} else {
*act = RBT_FAST_RETRY;
*rtr = 3;
*slp = 300;
changed = 1;
}
return changed;
}
......
......@@ -121,9 +121,9 @@ int main(int argc,
"TPVID" , TL_MSG_PARAM_TPVID, vid );
if (rlsflags & TPRLS_DELAY) {
int slp = 60;
int slp = 300;
if ((p = getconfent ("TAPE", "CRASHED_RLS_HANDLING_RETRY_DELAY", 0))) {
slp = atoi(p)>0?atoi(p):60;
slp = atoi(p)>0?atoi(p):300;
}
tplogit (func, "release delayed for %d seconds\n", slp);
tl_tpdaemon.tl_log( &tl_tpdaemon, 111, 5,
......@@ -189,14 +189,13 @@ int main(int argc,
}
} else {
/* default: configure the drive down */
tplogit( func, "Configure the drive down (default)\n" );
tplogit( func, "Leave the drive up (default)\n" );
tl_tpdaemon.tl_log( &tl_tpdaemon, 103, 5,
"func" , TL_MSG_PARAM_STR , func,
"Message", TL_MSG_PARAM_STR , "Configure the drive down (default)",
"Message", TL_MSG_PARAM_STR , "Leave the drive up (default)",
"JobID" , TL_MSG_PARAM_INT, jid,
"vid" , TL_MSG_PARAM_STR , vid,
"TPVID" , TL_MSG_PARAM_TPVID, vid );
configdown (drive);
}
}
......@@ -286,7 +285,7 @@ unload_loop:
if (unldtape (tapefd, dvn) < 0) {
char *p = NULL;
p = getconfent( "TAPE", "DOWN_ON_UNLOAD_FAILURE", 0 );
if ((NULL != p) && (0 == strcasecmp(p, "NO"))) {
if ((NULL == p) || (0 == strcasecmp(p, "NO"))) {
char msg[] = "Leave drive up after unload failure";
tplogit(func, "%s\n", msg);
tl_tpdaemon.tl_log(&tl_tpdaemon, 104, 2,
......
......@@ -24,7 +24,7 @@ int tapeacct(int subtype,
char *getconfent();
char *p;
if ((p = getconfent("ACCT", "TAPE", 0)) == NULL ||
if ((p = getconfent("ACCT", "TAPE", 0)) != NULL &&
(strcmp (p, "YES") && strcmp (p, "yes"))) return (0);
memset ((char *) &accttape, 0, sizeof(struct accttape));
accttape.subtype = subtype;
......
......@@ -375,7 +375,7 @@ int tpd_main() {
can take as long as (old) vdqmchkintvl seconds.
*/
p = getconfent( "TAPE", "CONFIRM_DRIVE_FREE", 0 );
if ((NULL != p) && (0 == strcasecmp( p, "YES" ))) {
if ((NULL == p) || (0 == strcasecmp( p, "YES" ))) {
p = getconfent( "TAPE", "CONFIRM_DRIVE_FREE_INTVL", 0 );
if (NULL != p) {
......@@ -2770,9 +2770,8 @@ void check_child_exit()
"vid" , TL_MSG_PARAM_STR , tunp->vid,
"TPVID" , TL_MSG_PARAM_TPVID, tunp->vid );
p = getconfent( "TAPE", "CRASHED_RLS_HANDLING", 0 );
if (NULL != p) {
if (0 == strcasecmp( p, "RETRY" )) {
if (NULL == p || 0 == strcasecmp( p, "RETRY" )) {
/*
** retry the release or ...
......@@ -2897,17 +2896,6 @@ void check_child_exit()
"TPVID" , TL_MSG_PARAM_TPVID, tunp->vid );
}
} else {
tplogit (func, "rlstape crashed, CRASHED_RLS_HANDLING not defined\n");
tl_tpdaemon.tl_log( &tl_tpdaemon, 103, 5,
"func" , TL_MSG_PARAM_STR , func,
"Message", TL_MSG_PARAM_STR , "rlstape crashed, CRASHED_RLS_HANDLING not defined",
"JobID" , TL_MSG_PARAM_INT , tunp->jid,
"vid" , TL_MSG_PARAM_STR , tunp->vid,
"TPVID" , TL_MSG_PARAM_TPVID, tunp->vid );
}
} else {
tplogit (func, "rlstape process %d exited normally (jid %d)\n", pid, tunp->jid);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment