Changeset 39943
- Timestamp:
- Jan 12, 2017, 5:27:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20150312/ippScripts/scripts/rawcheck.pl
- Property svn:mergeinfo changed
/trunk/ippScripts/scripts/rawcheck.pl merged: 39942
r39934 r39943 208 208 my $existing_copies = 0; 209 209 my $Ngood = 0; 210 my $Nbad = 0; 210 211 my %good_instances = (); 211 212 my %bad_instances = (); 213 214 #unsafe 215 my $continue_checking_md5sums = 1; 216 my %good_instances_unchecked = (); 217 #end unsafe 212 218 213 219 my @files = map {URI->new($_)->file if $_} @$instances; … … 223 229 $instance_exists = 1; 224 230 $existing_copies++; 225 $instance_md5sum = local_md5sum($files[$i]); 226 if ($instance_md5sum eq $md5sum) { 227 push @{ $good_instances{$instance_site} }, $i; 231 if ($continue_checking_md5sums == 1) { #unsafe 232 $instance_md5sum = local_md5sum($files[$i]); 233 if ($instance_md5sum eq $md5sum) { 234 push @{ $good_instances{$instance_site} }, $i; 235 $is_good = 1; 236 $Ngood++; 237 } 238 else { 239 push @{ $bad_instances{$instance_site} }, $i; 240 $Nbad++; 241 } 242 } #unsafe 243 else { #unsafe 244 $instance_md5sum = 'CHECKING_STOPPED'; 245 push @{ $good_instances_unchecked{$instance_site} }, $i; 228 246 $is_good = 1; 229 247 $Ngood++; 230 } 231 else { 232 push @{ $bad_instances{$instance_site} }, $i; 233 } 248 } #end unsafe 234 249 } 235 250 else { … … 242 257 $instance_exists,$is_good,$instance_md5sum, 243 258 $files[$i],$instance_host,$instance_volume); 259 260 #unsafe 261 # Remove this section when we decide to go back to actually checking everything 262 # to make sure we don't have any secret data corruption 263 if ($Ngood > 0) { 264 print "# Breaking from validation check, as a valid copy has been found.\n"; 265 $continue_checking_md5sums = 0; 266 } 267 #end unsafe 244 268 } 245 269 … … 300 324 ## leave everything in the best state possible. 301 325 printf(">> %d %d\n",$Ngood, $#files + 1); 302 if ($Ngood != $#files + 1) { 326 # if ($Ngood != $#files + 1) { 327 if ($Nbad > 0) { 303 328 my $good_copy; 304 329 my $good_copy_index; … … 331 356 if ($do_cull == 1) { $do_cull = -1; } 332 357 } 358 359 #unsafe 360 foreach my $site_key (keys %good_instances_unchecked) { 361 push @{ $good_instances{$site_key} }, @{ $good_instances_unchecked{$site_key} }; 362 } 363 #end unsafe 333 364 334 365 ## We can now attempt to make replicated copies to the sites that require additional copies. - Property svn:mergeinfo changed
Note:
See TracChangeset
for help on using the changeset viewer.
