Changeset 38361
- Timestamp:
- Jun 3, 2015, 2:28:35 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tools/stsci_disks/p1_clear.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/stsci_disks/p1_clear.pl
r38279 r38361 70 70 71 71 my $time = time(); 72 my $logDest = "neb://any/stsci_shuffle/${host}.${volume}/${dir}. ${time}";72 my $logDest = "neb://any/stsci_shuffle/${host}.${volume}/${dir}.log.${time}"; 73 73 my $ipprc = PS::IPP::Config->new( "GPC1" ) or die "Could not create config object.\n"; 74 74 $ipprc->redirect_output($logDest) or die "Could not redirect output to logfile ${logDest}\n"; … … 77 77 my $root = "/data/${host}.${volume}/nebulous/${dir}"; 78 78 my @subdirectories = <$root/*>; 79 my $md5_fails = 0; 79 80 80 81 #print "/data/${host}.${volume}/nebulous/${dir}/*\n"; … … 130 131 $vols[$i] = $vols[$i] . ".0"; 131 132 } 133 134 # Check that we actually have a key on the host we're checking. 135 my $local_uris = $neb->find_instances($keys[$i],"~" . $host . "." . $volume); 136 if ($#{ $local_uris } == -1) { 137 $vols[$i] = undef(); 138 print "# No registered copy of $keys[$i] on ${host}.${volume}. Treating as NOVOL\n"; 139 # die "No local copy of $keys[$i] on $host . $volume\n"; 140 } 132 141 } 133 142 elsif ($belongs[$i] == 1) { … … 161 170 system("cp -a $files[$i] ${unknown_dir}/$keys[$i]"); 162 171 } 163 system("sync") == 0 or die "Couldn't sync?";164 }165 }172 } 173 } 174 system("sync") == 0 or die "Couldn't sync?"; 166 175 $otime = $time; 167 176 $time = time(); … … 174 183 if ($belongs[$i] == 0) { 175 184 if (defined($vols[$i])) { 185 print "$keys[$i] $vols[$i] $host $volume \n"; 176 186 my $uris = $neb->find_instances($keys[$i],$vols[$i]); 177 187 @$uris = map {URI->new($_)->file if $_} @$uris; … … 184 194 my $tmpmd5 = local_md5sum($uri); 185 195 if ($tmpmd5 ne $md5sums[$i]) { 186 die "Post-replication md5sum does not match! $tmpmd5 != $md5sums[$i]"; 196 if (defined($vols[$i])) { 197 print "MD5SUM FAIL: $keys[$i] $vols[$i] $md5sums[$i] found: $tmpmd5 \n"; 198 } 199 else { 200 print "MD5SUM FAIL: $keys[$i] NOVOL_BECAUSE_UNKNOWN $md5sums[$i] found: $tmpmd5 \n"; 201 } 202 $md5_fails ++; 203 next; 204 # die "Post-replication md5sum does not match! $keys[$i]: $vols[$i] $tmpmd5 != $md5sums[$i]"; 187 205 } 188 206 # End my best validation thought. 189 207 190 208 if (defined($vols[$i])) { 209 # print "HERE: $keys[$i] $host $volume\n"; 191 210 $neb->cull($keys[$i],$host . "." . $volume); 192 211 } … … 200 219 $time = time(); 201 220 $dtime = $time - $otime; 202 print "LOG END $subdir $time $dtime \n";203 die;221 print "LOG END $subdir $time $dtime $md5_fails\n"; 222 # die; 204 223 } 205 224
Note:
See TracChangeset
for help on using the changeset viewer.
