Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: rgwx-skip-decrypt also skips decompression of encrypted objects #52247

Merged
merged 3 commits into from Jul 3, 2023

Conversation

cbodley
Copy link
Contributor

@cbodley cbodley commented Jun 28, 2023

#46188 added support for combining encryption and compression at the same time, but multisite does not replicate these objects correctly. the decompression filter cannot run without the decryption filter, because it's the unencrypted data that gets compressed. encrypted objects are replicated in their encrypted form, so we preserve their initial compression attribute instead of trying to de/recompress

Fixes: https://tracker.ceph.com/issues/57905

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

compression is applied before encryption. so if we skip decryption, we
can't decompress either

Fixes: https://tracker.ceph.com/issues/57905

Signed-off-by: Casey Bodley <cbodley@redhat.com>
fetch_remote_obj() transfers objects in their encrypted form, so does
not have access to the decrypted data for checksum verification

Signed-off-by: Casey Bodley <cbodley@redhat.com>
…bjects

if the source object was both compressed and encrypted, preserve its
original compression attribute so it can be decompressed the same way it
was originally compressed

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor Author

cbodley commented Jun 28, 2023

in teuthology, multisite tests use compression type 'random', but local multisite testing doesn't support compression so i had to hack it in:

diff --git a/src/test/rgw/test_multi.py b/src/test/rgw/test_multi.py
index 57d27343efc..9c19537f667 100644
--- a/src/test/rgw/test_multi.py
+++ b/src/test/rgw/test_multi.py
@@ -347,6 +347,11 @@ def init(parse_args):
                 if len(endpoints):
                     arg += ['--endpoints', ','.join(endpoints)]
                 zone.create(cluster, arg)
+                # enable compression
+                cluster.admin(zone.zone_args() + [
+                    'zone', 'placement', 'modify',
+                    '--placement-id', 'default-placement',
+                    '--compression', 'zlib'])
             else:
                 zone.get(cluster)
             zonegroup.zones.append(zone)

with that change, i'm able to reproduce the ZlibCompressor: Decompression error: decompress return -3 errors on replication that cause the test_encrypted_object_sync test case to fail with a checkpoint timeout

with the fix applied, replication succeeds and the test case passes

@cbodley
Copy link
Contributor Author

cbodley commented Jun 30, 2023

jenkins test api

1 similar comment
@cbodley
Copy link
Contributor Author

cbodley commented Jun 30, 2023

jenkins test api

@cbodley
Copy link
Contributor Author

cbodley commented Jun 30, 2023

'passed' qa in rerun https://pulpito.ceph.com/cbodley-2023-06-30_13:12:49-rgw-wip-cbodley-testing-distro-default-smithi/

there were still some dead jobs due to Error reimaging machines: [Errno 104] Connection reset by peer, but none of those prevented the multisite tests from running. the two multisite jobs showed the normal test failures, but passed test_encrypted_object_sync which had been failing/crashing in https://tracker.ceph.com/issues/57905

@cbodley cbodley merged commit 813fb28 into ceph:main Jul 3, 2023
12 checks passed
@cbodley cbodley deleted the wip-57905 branch July 3, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants