diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 4ee096603e74f666f47da7fe5941788cd7a49160..48f646a27c7cbbe1550b542aacfc05286ddccc8d 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -4,6 +4,7 @@ - cta/CTA#646 - JSON logging with correct field types - cta/CTA#350 - Change fxid to fid in command tools - cta/CTA#641 - Archive workflow of Postgres Scheduler DB can write a file to tape +- cta/CTA#257 - Allow CTA CI runner to use MHVTL ULTRIUM config ### Bug Fixes - cta/CTA#485 - Check disk file metadata on delete requests diff --git a/continuousintegration/ci_runner/generate_librarydevice_PV.sh b/continuousintegration/ci_runner/generate_librarydevice_PV.sh index b8df86cf897f0ba8bc3b5606383b981604b5d368..098e7d93f820c6768f5cb94de2689edbf676315e 100755 --- a/continuousintegration/ci_runner/generate_librarydevice_PV.sh +++ b/continuousintegration/ci_runner/generate_librarydevice_PV.sh @@ -39,7 +39,7 @@ for device in $(grep mediumx ${tempdir}/lsscsi-g.dump | awk {'print $7'} | sed - scsi_host="$(echo $line | sed -e 's/^.//' | cut -d\: -f1)" scsi_channel="$(echo $line | cut -d\: -f2)" - drivenames=$(grep "^.${scsi_host}:${scsi_channel}:" ${tempdir}/lsscsi-g.dump | grep tape | sed -e 's/^.[0-9]\+:\([0-9]\+\):\([0-9]\+\):.*/VDSTK\1\2/' | xargs -itoto echo -n " toto") + drivenames=$(grep "^.${scsi_host}:${scsi_channel}:" ${tempdir}/lsscsi-g.dump | grep tape | sed -e 's/^.[0-9]\+:\([0-9]\+\):\([0-9]\+\):.*/ULT\1\2/' | xargs -itoto echo -n " toto") drivedevices=$(grep "^.${scsi_host}:${scsi_channel}:" ${tempdir}/lsscsi-g.dump | grep tape | awk '{print $6}' | sed -e 's%/dev/%n%' | xargs -itoto echo -n " toto") cat <<EOF > ${LIBRARY_DIR}/config/library-config-${device}.yaml diff --git a/continuousintegration/ci_runner/generate_mhvtl_config.sh b/continuousintegration/ci_runner/generate_mhvtl_config.sh index aeebe804a3b1d4522303d3c6b36e09a361fad255..e4ac150d9fd0e88ced7fcafc003f085bfdb194e5 100755 --- a/continuousintegration/ci_runner/generate_mhvtl_config.sh +++ b/continuousintegration/ci_runner/generate_mhvtl_config.sh @@ -30,8 +30,8 @@ for ((lib=1; lib<=${nlib}; lib++)); do libid="${lib}0" cat <<EOF >> /etc/mhvtl/device.conf Library: ${libid} CHANNEL: $(printf %.2d ${lib}) TARGET: 00 LUN: 00 - Vendor identification: STK - Product identification: VLSTK${libid} + Vendor identification: IBM + Product identification: 03584L32 Unit serial number: LIB${libid} NAA: 30:22:33:44:ab:$(printf %.2x ${lib}):00:00 Compression: factor 1 enabled 1 @@ -48,9 +48,9 @@ EOF cat <<EOF >> /etc/mhvtl/device.conf Drive: ${lib}${drive} CHANNEL: $(printf %.2d ${lib}) TARGET: $(printf %.2d ${drive}) LUN: 00 Library ID: ${libid} Slot: $(printf %.2d ${drive}) - Vendor identification: STK - Product identification: MHVTL - Unit serial number: VDSTK${lib}${drive} + Vendor identification: MHVTL + Product identification: ULTRIUM-TD8 + Unit serial number: ULT${lib}${drive} NAA: 30:22:33:44:ab:$(printf %.2x ${lib}):$(printf %.2x ${drive}):00 Compression: factor 1 enabled 1 Compression type: lzo @@ -58,7 +58,7 @@ Drive: ${lib}${drive} CHANNEL: $(printf %.2d ${lib}) TARGET: $(printf %.2d ${dri EOF - echo "Drive ${drive}: VDSTK${lib}${drive}" >> /etc/mhvtl/library_contents.${libid} + echo "Drive ${drive}: ULT${lib}${drive}" >> /etc/mhvtl/library_contents.${libid} done @@ -96,7 +96,7 @@ MAP 1: EOF for ((tape=1; tape<=${ntape}; tape++)); do - echo "Slot ${tape}: V$(printf %.2d ${lib})$(printf %.3d ${tape})TA" >> /etc/mhvtl/library_contents.${libid} + echo "Slot ${tape}: V$(printf %.2d ${lib})$(printf %.3d ${tape})L8" >> /etc/mhvtl/library_contents.${libid} done for ((i=1;i<=${freetapeslots};i++)); do diff --git a/continuousintegration/ci_runner/recreate_ci_running_environment.sh b/continuousintegration/ci_runner/recreate_ci_running_environment.sh index e1216aa67ce89d1e1f27fb0239c7504364c6183d..df63ec8dc31489e0a63f47e4f04b87e3e8c56ba4 100755 --- a/continuousintegration/ci_runner/recreate_ci_running_environment.sh +++ b/continuousintegration/ci_runner/recreate_ci_running_environment.sh @@ -63,7 +63,7 @@ ls -lR /opt/mhvtl mkdir -p /opt/mhvtl sudo groupadd vtl || true sudo adduser vtl -g vtl || true -sudo make_vtl_media -C /etc/mhvtl +sudo make_vtl_media --config-dir=/etc/mhvtl --home-dir=/opt/mhvtl chown -R vtl.vtl /opt/mhvtl ################################################################################ diff --git a/continuousintegration/orchestration/tests/prepare_tests.sh b/continuousintegration/orchestration/tests/prepare_tests.sh index e23c222e06e4a7fed58fe64fcc10f16ea373b454..dc9c7d3e2e9fb2c7282dfcfe2cc80b5bb0764f2c 100755 --- a/continuousintegration/orchestration/tests/prepare_tests.sh +++ b/continuousintegration/orchestration/tests/prepare_tests.sh @@ -276,7 +276,7 @@ kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin --json version | jq for ((i=0; i<${#TAPES[@]}; i++)); do VID=${TAPES[${i}]} kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin tape add \ - --mediatype "T10K500G" \ + --mediatype "LTO8" \ --purchaseorder "order" \ --vendor vendor \ --logicallibrary ${TAPEDRIVES_IN_USE[${i}%${NB_TAPEDRIVES_IN_USE}]} \ diff --git a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp index b88fdcf0549a63eae6d746fd98b7e23bb233a10c..279b6f9d9bd307211527cdfd3b7a798439584fad 100644 --- a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp +++ b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp @@ -33,14 +33,14 @@ namespace castor::tape::tapeserver { drive::DriveInterface * drive::createDrive(SCSI::DeviceInfo di, System::virtualWrapper& sw) { - if (std::string::npos != di.product.find("T10000")) { + if (std::string::npos != di.product.find("MHVTL") || std::string::npos != di.vendor.find("MHVTL")) { + return new DriveMHVTL(di, sw); + } else if (std::string::npos != di.product.find("T10000")) { return new DriveT10000(di, sw); } else if (std::string::npos != di.product.find("ULT") || std::string::npos != di.product.find("Ultrium")) { return new DriveLTO(di, sw); } else if (std::string::npos != di.product.find("03592")) { return new DriveIBM3592(di, sw); - } else if (std::string::npos != di.product.find("MHVTL")) { - return new DriveMHVTL(di, sw); } else if (std::string::npos != di.product.find("VIRTUAL")) { /* In case of a VIRTUAL drive, it could have been pre-allocated * for testing purposes (with "pre-cooked" contents). */ @@ -195,7 +195,8 @@ drive::deviceInfo drive::DriveMHVTL::getDeviceInfo() { devInfo.productRevisionLevel = SCSI::Structures::toString(inquiryData.prodRevLvl); devInfo.vendor = SCSI::Structures::toString(inquiryData.T10Vendor); devInfo.serialNumber = getSerialNumber(); - devInfo.isPIsupported = inquiryData.protect; + // It's set to false because Logical Block Protection is not implemented for DriveMHVTL + devInfo.isPIsupported = false; return devInfo; }