Skip to content
Snippets Groups Projects
Commit 0ad5cda4 authored by Steven Murray's avatar Steven Murray
Browse files

rmc_sendrep() now logs more about netwrite() errors

The following two log snippets show that after retrying a mount
several times and finally succeeding, there is still the error
"rmc_sendrep: RMC02 - send error : No such file or directory".
This commit adds more logs to try an determine what is happening.

tpsrv001
========

10/24 14:16:54  6638 dispatch: Dispatching request handler: req_type=4 req_type_str=RMC_MOUNT attemptNb=1 maxNbAttempts=3
10/24 14:16:54  6638 rmc_srv_mount: RMC92 - mount request by 14029,1474 from tpsrv001.cern.ch
10/24 14:16:54  6638 rmc_srv_mount: RMC98 - mount I07700/0 on drive 1
10/24 14:16:55  6638 lasterror: Function entered: asc=40 ascq=1 save_errno=5 rc=-4 sensekey=6 skvalid=1
10/24 14:16:55  6638 lasterror: Entry found in scsierr_acttbl: action_str=RBT_FAST_RETRY
10/24 14:16:55  6638 rmc_sendrep: smc_mount: SR017 - find_cartridge I07700 failed : Import or Export Element Accessed
10/24 14:16:55  6638 rmc_srv_mount: returns 2205
10/24 14:16:55  6638 dispatch: Sleeping before fast retry: delayInSec=1 req_type=4 req_type_str=RMC_MOUNT attemptNb=2 maxNbAttempts=3
10/24 14:16:56  6638 dispatch: Dispatching request handler: req_type=4 req_type_str=RMC_MOUNT attemptNb=2 maxNbAttempts=3
10/24 14:16:56  6638 rmc_srv_mount: RMC92 - mount request by 14029,1474 from tpsrv001.cern.ch
10/24 14:16:56  6638 rmc_srv_mount: RMC98 - mount I07700/0 on drive 1
10/24 14:16:56  6638 lasterror: Function entered: asc=40 ascq=0 save_errno=5 rc=-4 sensekey=6 skvalid=1
10/24 14:16:56  6638 lasterror: Entry found in scsierr_acttbl: action_str=RBT_FAST_RETRY
10/24 14:16:56  6638 rmc_sendrep: smc_mount: SR017 - find_cartridge I07700 failed : Not Ready to Ready Transition
10/24 14:16:56  6638 rmc_srv_mount: returns 2205
10/24 14:16:56  6638 dispatch: Sleeping before fast retry: delayInSec=1 req_type=4 req_type_str=RMC_MOUNT attemptNb=3 maxNbAttempts=3
10/24 14:16:57  6638 dispatch: Dispatching request handler: req_type=4 req_type_str=RMC_MOUNT attemptNb=3 maxNbAttempts=3
10/24 14:16:57  6638 rmc_srv_mount: RMC92 - mount request by 14029,1474 from tpsrv001.cern.ch
10/24 14:16:57  6638 rmc_srv_mount: RMC98 - mount I07700/0 on drive 1
10/24 14:17:09  6638 rmc_srv_mount: returns 0
10/24 14:17:09  6638 rmc_sendrep: RMC02 - send error : No such file or directory

tpsrv007
========

10/24 14:17:14  8152 dispatch: Dispatching request handler: req_type=4 req_type_str=RMC_MOUNT attemptNb=1 maxNbAttempts=3
10/24 14:17:14  8152 rmc_srv_mount: RMC92 - mount request by 14029,1474 from tpsrv007.cern.ch
10/24 14:17:14  8152 rmc_srv_mount: RMC98 - mount I20497/0 on drive 11
10/24 14:17:14  8152 lasterror: Function entered: asc=41 ascq=0 save_errno=5 rc=-4 sensekey=6 skvalid=1
10/24 14:17:14  8152 lasterror: Entry found in scsierr_acttbl: action_str=RBT_FAST_RETRY
10/24 14:17:14  8152 rmc_sendrep: smc_mount: SR017 - find_cartridge I20497 failed : Power On, Reset, or Bus Device Reset Occurred
10/24 14:17:14  8152 rmc_srv_mount: returns 2205
10/24 14:17:14  8152 dispatch: Sleeping before fast retry: delayInSec=1 req_type=4 req_type_str=RMC_MOUNT attemptNb=2 maxNbAttempts=3
10/24 14:17:15  8152 dispatch: Dispatching request handler: req_type=4 req_type_str=RMC_MOUNT attemptNb=2 maxNbAttempts=3
10/24 14:17:15  8152 rmc_srv_mount: RMC92 - mount request by 14029,1474 from tpsrv007.cern.ch
10/24 14:17:15  8152 rmc_srv_mount: RMC98 - mount I20497/0 on drive 11
10/24 14:17:15  8152 lasterror: Function entered: asc=40 ascq=0 save_errno=5 rc=-4 sensekey=6 skvalid=1
10/24 14:17:15  8152 lasterror: Entry found in scsierr_acttbl: action_str=RBT_FAST_RETRY
10/24 14:17:15  8152 rmc_sendrep: smc_mount: SR017 - find_cartridge I20497 failed : Not Ready to Ready Transition
10/24 14:17:15  8152 rmc_srv_mount: returns 2205
10/24 14:17:15  8152 dispatch: Sleeping before fast retry: delayInSec=1 req_type=4 req_type_str=RMC_MOUNT attemptNb=3 maxNbAttempts=3
10/24 14:17:16  8152 dispatch: Dispatching request handler: req_type=4 req_type_str=RMC_MOUNT attemptNb=3 maxNbAttempts=3
10/24 14:17:16  8152 rmc_srv_mount: RMC92 - mount request by 14029,1474 from tpsrv007.cern.ch
10/24 14:17:16  8152 rmc_srv_mount: RMC98 - mount I20497/0 on drive 11
10/24 14:17:25  8152 rmc_srv_mount: returns 0
10/24 14:17:25  8152 rmc_sendrep: RMC02 - send error : No such file or directory
parent b50b050e
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,15 @@
#include "h/rmc_sendrep.h"
#include <unistd.h>
static const char *rep_type_to_str(const int rep_type) {
switch(rep_type) {
case MSG_ERR : return "MSG_ERR";
case MSG_DATA: return "MSG_DATA";
case RMC_RC : return "RMC_RC";
default : return "UNKNOWN";
}
}
int rmc_sendrep(const int rpfd, const int rep_type, ...)
{
va_list args;
......@@ -57,7 +66,11 @@ int rmc_sendrep(const int rpfd, const int rep_type, ...)
va_end (args);
repsize = rbp - repbuf;
if (netwrite (rpfd, repbuf, repsize) != repsize) {
rmc_logit (func, RMC02, "send", neterror());
const char *const neterror_str = neterror();
rmc_logit (func, RMC02, "send", neterror_str);
rmc_logit (func, "Call to netwrite() failed"
": rep_type=%s neterror=%s\n",
rep_type_to_str(rep_type), neterror_str);
if (rep_type == RMC_RC)
close (rpfd);
return (-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment