- Timestamp:
- Jan 12, 2017, 5:24:10 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/rawcheck.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/rawcheck.pl
r39933 r39942 205 205 my $existing_copies = 0; 206 206 my $Ngood = 0; 207 my $Nbad = 0; 207 208 my %good_instances = (); 208 209 my %bad_instances = (); 210 211 #unsafe 212 my $continue_checking_md5sums = 1; 213 my %good_instances_unchecked = (); 214 #end unsafe 209 215 210 216 my @files = map {URI->new($_)->file if $_} @$instances; … … 220 226 $instance_exists = 1; 221 227 $existing_copies++; 222 $instance_md5sum = local_md5sum($files[$i]); 223 if ($instance_md5sum eq $md5sum) { 224 push @{ $good_instances{$instance_site} }, $i; 228 if ($continue_checking_md5sums == 1) { #unsafe 229 $instance_md5sum = local_md5sum($files[$i]); 230 if ($instance_md5sum eq $md5sum) { 231 push @{ $good_instances{$instance_site} }, $i; 232 $is_good = 1; 233 $Ngood++; 234 } 235 else { 236 push @{ $bad_instances{$instance_site} }, $i; 237 $Nbad++; 238 } 239 } #unsafe 240 else { #unsafe 241 $instance_md5sum = 'CHECKING_STOPPED'; 242 push @{ $good_instances_unchecked{$instance_site} }, $i; 225 243 $is_good = 1; 226 244 $Ngood++; 227 } 228 else { 229 push @{ $bad_instances{$instance_site} }, $i; 230 } 245 } #end unsafe 231 246 } 232 247 else { … … 239 254 $instance_exists,$is_good,$instance_md5sum, 240 255 $files[$i],$instance_host,$instance_volume); 256 257 #unsafe 258 # Remove this section when we decide to go back to actually checking everything 259 # to make sure we don't have any secret data corruption 260 if ($Ngood > 0) { 261 print "# Breaking from validation check, as a valid copy has been found.\n"; 262 $continue_checking_md5sums = 0; 263 } 264 #end unsafe 241 265 } 242 266 … … 297 321 ## leave everything in the best state possible. 298 322 printf(">> %d %d\n",$Ngood, $#files + 1); 299 if ($Ngood != $#files + 1) { 323 # if ($Ngood != $#files + 1) { 324 if ($Nbad > 0) { 300 325 my $good_copy; 301 326 my $good_copy_index; … … 328 353 if ($do_cull == 1) { $do_cull = -1; } 329 354 } 355 356 #unsafe 357 foreach my $site_key (keys %good_instances_unchecked) { 358 push @{ $good_instances{$site_key} }, @{ $good_instances_unchecked{$site_key} }; 359 } 360 #end unsafe 330 361 331 362 ## We can now attempt to make replicated copies to the sites that require additional copies.
Note:
See TracChangeset
for help on using the changeset viewer.
