Skip to content

Problem with handling of the non-native formats by the CleanerSession

Summary

The cleaner session dose not support non-native label formats. In the castor::tape::tapeserver::daemon::CleanerSession::checkVolumeLabel only native CTA label format is check.

What is the current bug behaviour?

If the cta-taped demon returns an error while reading not-native tape:

Aug  8 15:11:36 tpm102 cta-taped: LVL="INFO" PID="37154" TID="38261" MSG="Successfully positioned for reading" thread="TapeRead" tapeDrive="2,3,4" tapeVid="L07626" mountId="1" vo="desy" mediaType="LTO9" tapePool="osm" logicalLibrary="ctaltolib" mountType="Retrieve" labelFormat="0x01" vendor="IBM" capacityInBytes="18000000000000" fileId="68002" BlockId="3" fSeq="1" dstURL="root://131.169.191.239:34211/00007FF20E6BF9394D0CB8B6822DF84FE7B5?oss.asize=2147483648" isRepack="0" isVerifyOnly="0"
Aug  8 15:11:36 tpm102 cta-taped: LVL="INFO" PID="37153" TID="37153" MSG="In DriveHandler::processEvent(): changing session state" tapeDrive="2,3,4" PreviousState="Mounting" PreviousType="Retrieve" NewState="Running" NewType="Retrieve"

Aug  8 15:11:36 tpm102 cta-taped: LVL="ERROR" PID="37154" TID="38261" MSG="Error reading a file in TapeReadFileTask" thread="TapeRead" tapeDrive="2,3,4" tapeVid="L07626" mountId="1" vo="desy" mediaType="LTO9" tapePool="osm" logicalLibrary="ctaltolib" mountType="Retrieve" labelFormat="0x01" vendor="IBM" capacityInBytes="18000000000000" fileId="68002" BlockId="3" fSeq="1" dstURL="root://131.169.191.239:34211/00007FF20E6BF9394D0CB8B6822DF84FE7B5?oss.asize=2147483648" isRepack="0" isVerifyOnly="0" fileBlock="1" ErrorMessage="Checksum value expected=0xa2e9cec2 actual=0x00000001"

Aug  8 15:11:36 tpm102 cta-taped: LVL="ERROR" PID="37154" TID="38262" MSG="Checksum value expected=0xa2e9cec2 actual=0x00000001" thread="DiskWrite" tapeDrive="2,3,4" tapeVid="L07626" mountId="1" threadCount="10" threadID="0" fileId="68002" dstURL="root://131.169.191.239:34211/00007FF20E6BF9394D0CB8B6822DF84FE7B5?oss.asize=2147483648" fSeq="1" received_archiveFileID="68002" expected_NSBLOCKId="0" received_NSBLOCKId="-1" failed_Status="1"

CleanerSession reports error due to invalid block size when validating tape label:

devdb14=# select state_reason from tape where vid = 'L07626';
                                                                                    state_reason

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--
 2022-08-08 15:12:14:Failed to check volume label: [CleanerSession::clean()] - Reading header VOL1: Failed ST read in DriveGeneric::readExactBlock Errno=12: Cannot allocate memory

What is the expected correct behaviour?

CleanerSession should accept non-native label formats

Edited by Jacek Maksymilian Chodak