]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #25967 from batrick/i37922
authorYuri Weinstein <yweinste@redhat.com>
Wed, 16 Jan 2019 20:31:23 +0000 (12:31 -0800)
committerGitHub <noreply@github.com>
Wed, 16 Jan 2019 20:31:23 +0000 (12:31 -0800)
luminous: qa: test_damage fixes

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
1  2 
qa/tasks/cephfs/test_damage.py

index 8fe41f580158769b11d4080d7cc3514640c7c158,632a1a50a0c34dc2c96b00926d1993498293ec08..01e9d5803b1b399001bac1dec84b3c186253b418
@@@ -160,26 -159,18 +160,26 @@@ class TestDamage(CephFSTestCase)
              ))
  
          # Blatant corruptions
 -        mutations.extend([
 -            MetadataMutation(
 -                o,
 -                "Corrupt {0}".format(o),
 -                lambda o=o: self.fs.rados(["put", o, "-"], stdin_data=junk),
 -                DAMAGED_ON_START
 -            ) for o in data_objects
 -        ])
 +        for obj_id in data_objects:
 +            if obj_id == "500.00000000":
 +                # purge queue corruption results in read-only FS
 +                mutations.append(MetadataMutation(
 +                    obj_id,
 +                    "Corrupt {0}".format(obj_id),
 +                    lambda o=obj_id: self.fs.rados(["put", o, "-"], stdin_data=junk),
 +                    READONLY
 +                ))
 +            else:
 +                mutations.append(MetadataMutation(
 +                    obj_id,
 +                    "Corrupt {0}".format(obj_id),
 +                    lambda o=obj_id: self.fs.rados(["put", o, "-"], stdin_data=junk),
 +                    DAMAGED_ON_START
 +                ))
  
          # Truncations
-         for obj_id in data_objects:
-             if obj_id == "500.00000000":
+         for o in data_objects:
+             if o == "500.00000000":
                  # The PurgeQueue is allowed to be empty: Journaler interprets
                  # an empty header object as an empty journal.
                  expectation = NO_DAMAGE