Skip to content

Missing reportFlush after tape full or any other exception thrown within TapeWriteTask or TapeWriteSingleThread

Working on the Scheduler DB I noticed that despite all jobs get transferred to tape successfully, small fraction (0.05 percent of them - luckily not more, depends on the tapeFlush trigger parameters) did not get reported and stayed in the active queue of the PG DB. I suspect a missing reportFlush for a case when the tape is full. I tried to call tapeFlush, but by the time this has been called the tape has already been unmounted - example below. Will try with reportFlush.

{"epoch_time":1738710571.753680129,"local_time":"2025-02-05T00:09:31+0100","hostname":"cta-tpsrv01-0","program":"cta-taped","log_level":"INFO","pid":22669,"tid":22710,"message":"In TapeWriteTask::execute(): Requeued failed task.","drive_name":"VDSTK01","instance":"CI","sched_backend":"postgres","thread":"TapeWrite","tapeDrive":"VDSTK01","tapeVid":"V00155","mountId":"8","vo":"vo","tapePool":"ctasystest","requeuedTaskQueueJobs":3181}
{"epoch_time":1738710571.756102362,"local_time":"2025-02-05T00:09:31+0100","hostname":"cta-tpsrv01-0","program":"cta-taped","log_level":"INFO","pid":22669,"tid":22710,"message":"Tape thread complete for writing","drive_name":"VDSTK01","instance":"CI","sched_backend":"postgres","thread":"TapeWrite","tapeDrive":"VDSTK01","tapeVid":"V00155","mountId":"8","vo":"vo","tapePool":"ctasystest","tapeFlushErrorMessage":"Failed ST ioctl (MTWEOF) in DriveGeneric::flush Errno=123: No medium found","ErrorMessage":"End of migration due to tape full","type":"write","mountTime":0.032646,"positionTime":0.002483,"waitInstructionsTime":53.4128050000009,"checksumingTime":0.290689000000034,"readWriteTime":319.540419999998,"waitDataTime":3.77105099999878,"waitReportingTime":8.02927900000027,"flushTime":0.343839,"unloadTime":0.005996,"unmountTime":1.020282,"encryptionControlTime":0.004889,"transferTime":385.388082999998,"totalTime":386.679471,"dataVolume":1229104,"headerVolume":36873120,"files":76819,"payloadTransferSpeedMBps":0.00317861198273958,"driveTransferSpeedMBps":0.0985369714649268,"status":"error"}
Edited by Jaroslav Guenther