]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd, test: When head missing a snapset, clones not an error
authorDavid Zafman <dzafman@redhat.com>
Mon, 26 Oct 2015 01:57:18 +0000 (18:57 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 25 Feb 2016 20:50:26 +0000 (12:50 -0800)
Fix log message for this case and make into "info"

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit f508ddc6e9b40fe5c1c54e5faa569f2bc7b78c4b)

src/osd/ReplicatedPG.cc
src/test/osd/osd-scrub-snaps.sh

index e89db3239fa8e94be8fa0f3f74b2887b31580962..93a077ba91e40e2992748adab3ebba4a6d64cb8d 100644 (file)
@@ -11442,6 +11442,13 @@ void ReplicatedPG::_scrub(
       expected = soid.has_snapset();
     }
     if (!expected) {
+      // If we couldn't read the head's snapset, then just ignore clones and
+      // don't count as an error.
+      if (head && !snapset) {
+       osd->clog->info() << mode << " " << info.pgid << " " << soid
+                         << " clone ignored due to missing snapset";
+       continue;
+      }
       osd->clog->error() << mode << " " << info.pgid << " " << soid
                           << " is an unexpected clone";
       ++scrubber.shallow_errors;
index 7708f56ea449537076661ae163bc620fab7034e0..6465ba65f0b09fcfd97e049472c5acf7ab6f86f6 100755 (executable)
@@ -164,15 +164,15 @@ err_strings[10]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/5c889059/o
 err_strings[11]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/61f68bb1/obj3/head on disk size [(]3840[)] does not match object info size [(]768[)] adjusted for ondisk to [(]768[)]"
 err_strings[12]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/83425cc4/obj6/1 is an unexpected clone"
 err_strings[13]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/3f1ee208/obj2/snapdir no 'snapset' attr"
-err_strings[14]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/3f1ee208/obj2/7 is an unexpected clone"
-err_strings[15]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/3f1ee208/obj2/4 is an unexpected clone"
+err_strings[14]="log_channel[(]cluster[)] log [[]INF[]] : scrub 1.0 1/3f1ee208/obj2/7 clone ignored due to missing snapset"
+err_strings[15]="log_channel[(]cluster[)] log [[]INF[]] : scrub 1.0 1/3f1ee208/obj2/4 clone ignored due to missing snapset"
 err_strings[16]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/a8759770/obj4/snapdir expected clone 1/a8759770/obj4/7"
 err_strings[17]="log_channel[(]cluster[)] log [[]INF[]] : scrub 1.0 1/a8759770/obj4/snapdir 1 missing clone[(]s[)]"
 err_strings[18]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/6cf8deff/obj1/1 is an unexpected clone"
 err_strings[19]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/e478ac7f/obj9/1 is missing in clone_size"
 err_strings[20]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/29547577/obj11/1 is an unexpected clone"
 err_strings[21]="log_channel[(]cluster[)] log [[]ERR[]] : scrub 1.0 1/94122507/obj14/1 size 1032 != clone_size 1033"
-err_strings[22]="log_channel[(]cluster[)] log [[]ERR[]] : 1.0 scrub 21 errors"
+err_strings[22]="log_channel[(]cluster[)] log [[]ERR[]] : 1.0 scrub 19 errors"
 
 for i in `seq 0 ${#err_strings[@]}`
 do