Commit 7c91738a authored by Jorge Camarero Vera's avatar Jorge Camarero Vera Committed by Michael Davis
Browse files

Replaces CASTOR licence agreement comments with those of CTA.

parent bcae7f74
# The CERN Tape Archive (CTA) project
# Copyright (C) 2015 CERN
# @project The CERN Tape Archive (CTA)
# @copyright Copyright(C) 2015-2021 CERN
# @license This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required (VERSION 2.6)
project(cta)
......@@ -74,7 +73,7 @@ include(cmake/CTAVersions.cmake)
IF(DEFINED PackageOnly)
message (STATUS "Running CMake in package-only mode")
set(COMPILE_PACKAGING "1")
set(COMPILE_PACKAGING "1")
ELSE(DEFINED PackageOnly)
message (STATUS "Running in full configuration mode.")
message (STATUS "Override with -DPackageOnly:Bool=true")
......@@ -94,7 +93,7 @@ ELSE(DEFINED PackageOnly)
ELSE()
# log choosen default (RelWithDebInfo) and set it
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
message (STATUS "Override with -DCMAKE_BUILD_TYPE:STRING=Debug")
message (STATUS "Override with -DCMAKE_BUILD_TYPE:STRING=Debug")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
# this command is not yet available in SLC6's cmake 2.6
......@@ -149,7 +148,7 @@ ELSE(DEFINED PackageOnly)
add_subdirectory(rdbms)
add_subdirectory(scheduler)
add_subdirectory(tapeserver)
add_subdirectory(statistics)
add_subdirectory(continuousintegration/orchestration/tests)
......@@ -205,7 +204,7 @@ add_custom_target(fullunittests
COMMAND tests/cta-unitTests-multiProcess
COMMAND ${VALGRIND} ${VALGRIND_OPTS_W_SUPPR} --child-silent-after-fork=yes tests/cta-unitTests-multiProcess
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} tests/cta-unitTests-multiProcess
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/valgrind.suppr tests/helgrind.suppr
COMMENT "Running unit tests with memory leak and race conditions detection" VERBATIM)
......@@ -223,7 +222,7 @@ add_custom_target(helgrind
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} tests/cta-unitTests
COMMAND echo ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} tests/cta-unitTests-multiProcess
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} tests/cta-unitTests-multiProcess
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT "Running unit tests with race conditions detection" VERBATIM)
......@@ -239,39 +238,39 @@ add_custom_target(helgrindBase
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=-OStoreDBPlusMockSchedulerTestVFS*:OStoreTestVFS*:OStoreDBPlusMockSchedulerTestVFS*:InMemory*
COMMAND echo ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests-multiProcess
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests-multiProcess
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT "Running unit tests with race conditions detection (except slow sections)" VERBATIM)
add_custom_target(helgrindScheduler
echo ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/Scheduler*
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/Scheduler*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT "Running unit tests with race conditions detection (Mock scheduler section)" VERBATIM)
add_custom_target(helgrindOStoreDB
echo ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=OStoreTestVFS*
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=OStoreTestVFS*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT "Running unit tests with race conditions detection (Object store DB section)" VERBATIM)
add_custom_target(helgrindDataTransfer
echo ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/DataTransferSessionTest*
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=OStoreDBPlusMockSchedulerTestVFS/DataTransferSessionTest*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT "Running unit tests with race conditions detection (Data transfer section)" VERBATIM)
add_custom_target(helgrindInMemoryCatalogue
echo ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=InMemory/*
COMMAND ${VALGRIND} --tool=helgrind ${HELGRIND_OPTS_W_SUPPR} -q tests/cta-unitTests --gtest_filter=InMemory/*
DEPENDS tests/cta-unitTests tests/cta-unitTests-multiProcess tests/helgrind.suppr
COMMENT "Running unit tests with race conditions detection (In memory catalogue section)" VERBATIM)
add_custom_target(parallelHelgrind
echo
DEPENDS helgrindBase helgrindMockSechduler helgrindOStoreDB helgrindDataTransfer helgrindInMemoryCatalogue)
#!/bin/sh
# @project The CERN Tape Archive (CTA)
# @copyright Copyright(C) 2021 CERN
# @license This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
VID=L80013
FILES=`nslisttape -sV $VID | cut -f1 -d' '`
......
#!/bin/bash
# @project The CERN Tape Archive (CTA)
# @copyright Copyright(C) 2021 CERN
# @license This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
VID=`/usr/bin/tpstat | /bin/grep @ | /bin/awk '{print $7}'`
STDEVICE=`/bin/readlink --canonicalize /dev/tape | /bin/sed -e 's;^/dev/nst;/dev/st;'`
......
#!/bin/sh
# @project The CERN Tape Archive (CTA)
# @copyright Copyright(C) 2021 CERN
# @license This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
VID=$1
INCREMENT=3
......
#!/usr/bin/perl -w
# @project The CERN Tape Archive (CTA)
# @copyright Copyright(C) 2010-2021 CERN
# @license This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# tape-verify
#
# German Cancio <German.Cancio@cern.ch>
#
#
# Copyright (c) 2010-2018 CERN
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
=pod
......@@ -26,7 +29,7 @@ read CASTOR tapes and verify consistency
=head1 DESCRIPTION
The tape-verify tool allows to read a CASTOR tape and to verify its contents against the stored metadata in the name server.
The tape-verify tool allows to read a CASTOR tape and to verify its contents against the stored metadata in the name server.
=head1 OPTIONS
......@@ -158,7 +161,7 @@ sub app_options() {
{ NAME => 'usephysmap=s',
HELP => 'use physical mapping file if available (for tape positioning optimisation)',
DEFAULT => 'yes'},
DEFAULT => 'yes'},
{ NAME => 'notracks=f',
HELP => 'Number of tracks actually written on that tape (for tape positioning optimisation, if --usephysmap=no); accepts fractions to indicate occupancy of last track',
......@@ -171,7 +174,7 @@ sub app_options() {
{ NAME => 'totalbands=i',
HELP => 'Number of physical bands for this media.',
DEFAULT => 4},
{ NAME => 'lastblockid=i',
HELP => 'last block ID on tape. If not specified, approximates it by using name server information (last known file blockID + length in blocks + 50% of flush size)',
DEFAULT => undef},
......@@ -182,7 +185,7 @@ sub app_options() {
{ NAME => 'noaction',
HELP => 'dry run: do not launch actual verification.'},
);
return \@array;
......@@ -263,7 +266,7 @@ $EC=LC::Exception::Context->new->will_store_all;
#my $EC=LC::Exception::Context->new->will_report_all;
#
#
# load_ns_info: retrieve file and segment information for a given VID:
# segment: fseq, size, checksum
# file: size, checksum
......@@ -328,7 +331,7 @@ sub load_ns_info {
$warnings++;
}
# now read this into $self->{'FILEINFO'} with the following structure:
# now read this into $self->{'FILEINFO'} with the following structure:
# $self->{'INFO_FSEQ'}{<fseq>}{'CHKSUM'}
# {'BLOCKID'}
# {'SIZE'}
......@@ -368,7 +371,7 @@ sub load_ns_info {
if (defined $chksum) {
$chksum =~ s%^0+(\S+)$%$1%;
}
$self->{'INFO_FSEQ'}{$fseq}{'CHKSUM'}=$chksum;
$self->{'INFO_FSEQ'}{$fseq}{'SIZE'}=$size;
$self->{'INFO_FSEQ'}{$fseq}{'FILENAME'}=$fname;
......@@ -395,7 +398,7 @@ sub load_ns_info {
# (XXXXX TODO: move all this into a different method. It has nothing to do with the name server initialisation)
#
#
# two alternatives:
# two alternatives:
# a) a mapping is provided containing the physical wrap and LPOS information for each FSEQ
# b) no mapping available, the physical layout is constructed deducing from name server and command line information (last block ID (optional), no wraps (required))
#
......@@ -431,11 +434,11 @@ sub load_ns_info {
#
# XXXX to be improved: assume end-to-end time is 105s
#
#
$self->{'TOTALSEEKTIME'} = 105;
if (($this_app->option("usephysmap") eq 'yes') && (-e $this_app->option("physmapdir") . "/" . $self->{'VID'} . ".pmap")) {
# use map file
# format of map file: <fseq1> <wrap ID> <LPOS> <block id (dec)> separated by (one or more) spaces
......@@ -452,7 +455,7 @@ sub load_ns_info {
$self->{'POSPERTRACK'}=171144;
my $physmapfile = $this_app->option("physmapdir") . "/" . $self->{'VID'} . ".pmap";
$self->verbose ("using physical map file: " . $physmapfile);
my $handle;
......@@ -475,7 +478,7 @@ sub load_ns_info {
$self->error($line);
return undef;
}
if (uc($fseq) ne 'EOD') { # EOD is special and only is for the last segment
$self->{'INFO_FSEQ'}{$fseq}{'START_TRACK'} = $wrap;
$self->{'INFO_FSEQ'}{$fseq}{'START_POS_TRACK'} = ($wrap %2 ? $self->{'POSPERTRACK'} - $lpos : $lpos);
......@@ -501,11 +504,11 @@ sub load_ns_info {
}
$prevfseq = $fseq ;
}
} else {
# no mapfile, construct physical layout
$self->verbose ("not using (or not found) physical map file..");
my ($lastfseq) = @{$self->get_last_fseq(1)};
my $totalblocks = $this_app->option("lastblockid");
if (defined $totalblocks) {
......@@ -513,7 +516,7 @@ sub load_ns_info {
} else {
# total blocks not provided as option, take it from name server information
# assume it's the blockID of the last file on nslisttape + its size + 3 trailer blocks + 16GB worth of uncommitted written space (32GB / 2)
# this of course won't work on tapes where the last file has been deleted from ns (the more files deleted at the end without gaps, the more inaccurate)
# this of course won't work on tapes where the last file has been deleted from ns (the more files deleted at the end without gaps, the more inaccurate)
$totalblocks = $self->{INFO_FSEQ}{$lastfseq}{'BLOCKID'} + int(($self->{'INFO_FSEQ'}{$lastfseq}{'SIZE'} + 16 * 1000 ** 3) / ($DATABLOCKSIZE)) + 3;
}
......@@ -561,18 +564,18 @@ sub check_file_metadata {
} else {
$shout='warn';
}
my $tmpfile="/tmp/tape-verify_nsls.".$$;
my @files;
foreach (@fseq) {
push (@files,"'".$self->get_fname_by_fseq($_)."'");
push (@files,"'".$self->get_fname_by_fseq($_)."'");
# quote the files - protect against spaces etc in the file name
}
unless (file_contents($tmpfile,join("\n",@files))) {
$this_app->error("cannot write $tmpfile");
return undef;
}
my $cmd = "/bin/cat $tmpfile | /usr/bin/xargs $NSLSCMD";
......@@ -603,7 +606,7 @@ sub check_file_metadata {
foreach my $f (split(/\n/,$err)) {
if ($f =~ m/No such file or directory/) {
# means that a file has been renamed or deleted during the time window between
# nslisstape and nsls. This is unfrequent but can (and does) happen, in particular
# nslisstape and nsls. This is unfrequent but can (and does) happen, in particular
# when checking "fresh" tapes (eg. containing active data).
# just report a complaint (warning,error) in this case.
$self->$shout($f);
......@@ -617,11 +620,11 @@ sub check_file_metadata {
}
}
# now iterate over the files (or fseqs) and obtain the file checksum, and compare it to the segment checksum
# nsls -l --checksum <file> format:
# mrw-r--r-- 1 gcancio c3 104857647 Nov 11 2009 AD 8d81e820 /castor/cern.ch/user/g/gcancio/gwtest-100MBfile/91d8b729-2088-4c28-a8c7-f834511ea501-lxbrb1314
my ($size,$chksum,$fname);
foreach my $f (split(/\n/,$qryout)) {
if ($f =~ m%^\S+\s+\S+\s+\S+\s+\S+\s+(\S+)\s+\S+\s+\S+\s+\S+\s+\S+\s+(\S+)\s+(/castor/.+)$%) {
......@@ -732,7 +735,7 @@ sub get_list_fnames {
my $self=shift;
return [(sort (keys %{$self->{'INFO_FNAM'}}))];
}
sub get_fname_by_fseq {
my ($self,$fseq)=@_;
......@@ -742,7 +745,7 @@ sub get_fname_by_fseq {
}
return $self->{'INFO_FSEQ'}{$fseq}{'FILENAME'};
}
sub get_fseq_by_fname {
my ($self,$fname)=@_;
unless (exists $self->{'INFO_FNAM'}{$fname}) {
......@@ -870,12 +873,12 @@ sub physical_distance_pos {
# opposite direction
return abs($self->{'POSPERTRACK'} - $self->get_end_pos_track_by_fseq($fseq1) - $self->get_start_pos_track_by_fseq($fseq2));
}
}
}
# check if two segments fseq1, fseq2 do physically overlap in the track direction requiring the drive to step back.
# the third parameter (margin) specifies the margin (in terms of position units) to be applied to both fseqs
# eg. is there a physical overlap in the ranges fseq1[start, end+margin] and fseq2[start-margin, end]?
# eg. is there a physical overlap in the ranges fseq1[start, end+margin] and fseq2[start-margin, end]?
# to be useful, tracks should be in the same direction. Returns 0 (no overlap) if tracks are in different directions.
sub have_overlap {
my ($self, $fseq1, $fseq2,$margin) = @_;
......@@ -893,47 +896,47 @@ sub have_overlap {
return 0;
}
}
# compute the cost of moving from fseq1 to fseq2 in terms of seconds.
sub position_cost {
my ($self, $fseq1, $fseq2) = @_;
my $phys_distance = $self->physical_distance_pos($fseq1,$fseq2);
return -1 if ($phys_distance == -1); # obvious case
#
# parameters below calculated using multi-Linear Regression analysis of ~380K file positions on LTO-7M
# these are unconfirmed for other media types (in particular LTO-8) but according to IBM, should be very similar if not identical
#
my $penalty = 4.357; # changing fseq to non-contiguous one base overhead
# is it the same track?
if ($self->get_end_track_by_fseq($fseq1) != $self->get_start_track_by_fseq($fseq2)) {
# no, different track, head needs to change track
$penalty += 6.714; # changing track has an additional overhead
$penalty += 6.714; # changing track has an additional overhead
# are the tracks on the same band?
if (int($self->get_end_track_by_fseq($fseq1) / ($self->{'TOTALPHYSTRACKS'} / $self->{'TOTALBANDS'})) !=
int($self->get_start_track_by_fseq($fseq2) / ($self->{'TOTALPHYSTRACKS'} / $self->{'TOTALBANDS'}))) {
# different band
$penalty += 3.23; # changing band has an additional overhead
}
}
}
# are both tracks in the same direction ?
if ($self->track_direction_end($fseq1) == $self->track_direction_start($fseq2)) {
# yes, they are in the same direction
# is the starting of fseq2 in the motion sense after the end of fseq1, or does the drive have to step back?
# is the starting of fseq2 in the motion sense after the end of fseq1, or does the drive have to step back?
if ($self->get_end_pos_track_by_fseq($fseq1) > $self->get_start_pos_track_by_fseq($fseq2)) {
# begin of fseq2 is before end of fseq1 in the motion sense which therefore requires stopping, rewinding, stopping and changing direction
$penalty += 11.37; # rewinding has an additional overhead
}
} else {
# no, both tracks are in different direction, head needs to stop and start in opposite direction
$penalty += 5.363; # direction change has an additional overhead
$penalty += 5.363; # direction change has an additional overhead
}
return ($self->physical_distance_pos($fseq1,$fseq2) * 0.0005655 + $penalty);
}
......@@ -993,10 +996,10 @@ sub fseq_reorder_scan {
}
}
}
return [@forth,@back];
}
#
# receives a list of fseqs to retrieve and returns them in the optimal order according to the "scan2" algorithm.
......@@ -1026,7 +1029,7 @@ sub fseq_reorder_scan2 {
}
}
}
foreach $fseq (@fseqs) {
if ($self->track_direction_start($fseq) == 0) {
if (exists $overlap{$fseq}) {
......@@ -1050,16 +1053,16 @@ sub fseq_reorder_scan2 {
if ((scalar @back2) < 10) {
push(@back1,@back2); @back2=();
}
@forth1 = sort {$self->get_start_pos_track_by_fseq($a) <=> $self->get_start_pos_track_by_fseq($b)} @forth1;
@forth2 = sort {$self->get_start_pos_track_by_fseq($a) <=> $self->get_start_pos_track_by_fseq($b)} @forth2;
@back1 = sort {$self->get_start_pos_track_by_fseq($a) <=> $self->get_start_pos_track_by_fseq($b)} @back1;
@back2 = sort {$self->get_start_pos_track_by_fseq($a) <=> $self->get_start_pos_track_by_fseq($b)} @back2;
return [@forth1,@back1,@forth2,@back2];
}
#
......@@ -1073,7 +1076,7 @@ sub fseq_reorder_scan2 {
#
# receives a list of fseqs to retrieve and returns them in the optimal order according to the "SLTF" (shortest locate time first aka nearest neighbor) algorithm.
# note: always starts with BOT (fseq 0).
# note: always starts with BOT (fseq 0).
#
sub fseq_reorder_sltf {
my ($self, @fseqs) = @_;
......@@ -1101,7 +1104,7 @@ sub fseq_reorder_sltf {
}
return [@visited];
}
sub _initialize {
......@@ -1161,7 +1164,7 @@ sub signal_handler {
sub finish {
unless ($total_errors) {
if (!$total_warnings) {
if (!$total_warnings) {
$this_app->OK('tape-verify for VID '.$vid.' terminated successfully.');
} else {
$this_app->warn('tape-verify for VID '.$vid.' terminated with '.$total_warnings.' warnings.');
......@@ -1173,7 +1176,7 @@ sub finish {
}
}
#------------------------------------------------------------
# main loop
......@@ -1244,11 +1247,11 @@ $this_app->set_report_logfile($objlog);
$this_app->log('-----------------------------------------------------');
$this_app->log('-----------------------------------------------------');
$this_app->info('tape-verify version '. $this_app->version().' started by '.
$this_app->username() .' at: '.scalar(localtime).' on '.$this_app->hostname());
my $nsinfo=NServerInfo->new($vid);
#
......@@ -1299,7 +1302,7 @@ if ($this_app->option('all') || $this_app->option('fulltape')){
if ($this_app->option('random')) {
push (@fseqs,@{$nsinfo->get_random_fseq($this_app->option('random'))});
}
if (@ARGV) {
# provided files and/or fseqs as command line arguments
......@@ -1325,8 +1328,8 @@ if ($this_app->option('all') || $this_app->option('fulltape')){
} else {
push(@fseqs,$object);
}
}
}
}
}
}
# remove potential duplicates, as multiple options can lead to fseqs appearing more than once
my %seen = ();
......@@ -1379,7 +1382,7 @@ if (lc($this_app->option('posalgo')) eq "linear") {
} else {
$this_app->warn("not supported positioning algorithm: ".$this_app->option('posalgo').", falling back to SLTF");
@fseqs = @{$nsinfo->fseq_reorder_sltf(@fseqs)};
}
}
unless ($rao == 1) {
$this_app->verbose("list of fseqs to be checked after reordering: " . join(",",@fseqs));
......@@ -1398,7 +1401,7 @@ foreach my $fseq (@fseqs) {
#
if (($this_app->option('metadata') eq "full") || ($this_app->option('metadata') eq 'only')) {
$this_app->info("verifying file metadata for ".scalar(@fseqs)." files, please wait....");
$nscheck = $nsinfo->check_file_metadata(@fseqs);
if (!defined $nscheck) {
$this_app->error("cannot obtain name server information for VID $vid");
......@@ -1476,7 +1479,7 @@ foreach (@fseqs) {
}
my $starttime=time();
my $starttime=time();
my $tape_read_start_time=undef;
#
......@@ -1493,14 +1496,14 @@ while (!$finished && $readtp_runs < $this_app->option("maxretries")) {
$readttape_executable = $this_app->option('readtp');
} else {
$readttape_executable = $this_app->option('readtpblkid');
}
}
unless (-x $readttape_executable) {
$this_app->error("cannot find executable: ".$readttape_executable);
$total_errors++;
&finish();
}
$readtp_runs++;
my $cmd = $readttape_executable." ".$vid;
if ($complete) {
......@@ -1530,7 +1533,7 @@ while (!$finished && $readtp_runs < $this_app->option("maxretries")) {
}
$this_app->info('read tape run '.$readtp_runs.': verifying tape '.$vid.' for '.scalar(@fseqs).' file(s) and '.sprintf("%.2f",$total_size/(1000*1000)).
$this_app->info('read tape run '.$readtp_runs.': verifying tape '.$vid.' for '.scalar(@fseqs).' file(s) and '.sprintf("%.2f",$total_size/(1000*1000)).
' MB, please be patient...');
$this_app->verbose('invoking read tape: '.$cmd);
......@@ -1552,7 +1555,7 @@ while (!$finished && $readtp_runs < $this_app->option("maxretries")) {
$this_app->error("failed to run $cmd, aborting...");
$total_errors++;
&finish();
}
}
if ($err) {
$this_app->warn("read tape returned STDERR output: ".$err);