Bug 1505485 - [RGW-Compression] - Data synced to secondary site is not compressed.
Summary: [RGW-Compression] - Data synced to secondary site is not compressed.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW-Multisite
Version: 3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: 3.0
Assignee: Casey Bodley
QA Contact: Manohar Murthy
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-23 16:50 UTC by Manohar Murthy
Modified: 2017-12-05 23:49 UTC (History)
7 users (show)

Fixed In Version: RHEL: ceph-12.2.1-35.el7cp Ubuntu: ceph_12.2.1-37redhat1xenial
Doc Type: No Doc Update
Doc Text:
.
Clone Of:
Environment:
Last Closed: 2017-12-05 23:49:04 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 21895 0 None None None 2017-10-23 17:42:44 UTC
Red Hat Product Errata RHBA-2017:3387 0 normal SHIPPED_LIVE Red Hat Ceph Storage 3.0 bug fix and enhancement update 2017-12-06 03:03:45 UTC

Description Manohar Murthy 2017-10-23 16:50:51 UTC
Description of problem:
Data synced to secondary site in multi-site environment, is not compressed.
Synced data has to be compressed based on the compression value set in receiver site.


Version-Release number of selected component (if applicable):
[root@magna037 ~]# ceph -v
ceph version 12.2.1-23.el7cp (be330b70537e4ef13d8bbf289245640faf2093c7) luminous (stable)
[root@magna037 ~]#


How reproducible:
100%

Steps to Reproduce:
1. Enable compression on both sites.
2. Write data on primary site and check whether data is compressed.
3. Check whether synced data in secondary site compressed or not. 

Actual results:
Synced data should have compressed based the compression type set in secondary site.


Expected results:
Synced data is always uncompressed. If data is written directly to second site then it will be compressed. 

Additional info:

1. Enable compression on both sites.
2. Write data to primary site then check the used space in primary site only.

[root@magna037 ~]# radosgw-admin zone placement modify --rgw-zone=z-2  --placement-id=default-placement  --cluster source
{
    "id": "531b8fe4-b30e-4361-be2f-4e86194b39ad",
    "name": "z-2",
    "domain_root": "z-2.rgw.meta:root",
    "control_pool": "z-2.rgw.control",
    "gc_pool": "z-2.rgw.log:gc",
    "lc_pool": "z-2.rgw.log:lc",
    "log_pool": "z-2.rgw.log",
    "intent_log_pool": "z-2.rgw.log:intent",
    "usage_log_pool": "z-2.rgw.log:usage",
    "reshard_pool": "z-2.rgw.log:reshard",
    "user_keys_pool": "z-2.rgw.meta:users.keys",
    "user_email_pool": "z-2.rgw.meta:users.email",
    "user_swift_pool": "z-2.rgw.meta:users.swift",
    "user_uid_pool": "z-2.rgw.meta:users.uid",
    "system_key": {
        "access_key": "0te6NH5mcdcq0Tc5i8i2",
        "secret_key": "Oy4IOauQoL18Gp2zM7lC1vLmoawgqcYPbYGcWfXv"
    },
    "placement_pools": [
        {
            "key": "default-placement",
            "val": {
                "index_pool": "z-2.rgw.buckets.index",
                "data_pool": "z-2.rgw.buckets.data",
                "data_extra_pool": "z-2.rgw.buckets.non-ec",
                "index_type": 0,
                "compression": "zlib"
            }
        }
    ],
    "metadata_heap": "",
    "tier_config": [],
    "realm_id": "1455ca33-0e05-45a3-8a32-31772e24cd10"
}
[root@magna037 ~]#


[root@magna037 ~]# radosgw-admin bucket stats --bucket=bucket5 --cluster source{
    "bucket": "bucket5",
    "zonegroup": "9d15aca7-affa-4271-8476-bea449e8348d",
    "placement_rule": "default-placement",
    "explicit_placement": {
        "data_pool": "",
        "data_extra_pool": "",
        "index_pool": ""
    },
    "id": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.7",
    "marker": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.7",
    "index_type": "Normal",
    "owner": "t1",
    "ver": "0#21",
    "master_ver": "0#0",
    "mtime": "2017-10-23 11:14:17.270893",
    "max_marker": "0#00000000020.52.1",
    "usage": {
        "rgw.main": {
            "size": 301675680,
            "size_actual": 301690880,
            "size_utilized": 13739020,
            "size_kb": 294606,
            "size_kb_actual": 294620,
            "size_kb_utilized": 13418,
            "num_objects": 5
        }
    },
    "bucket_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    }
}
[root@magna037 ~]#

[root@magna022 ~]# radosgw-admin zone placement modify --rgw-zone=z-1  --placement-id=default-placement --compression=zlib --cluster target
{
    "id": "fdffba32-a5f6-4569-a527-78a03da25778",
    "name": "z-1",
    "domain_root": "z-1.rgw.meta:root",
    "control_pool": "z-1.rgw.control",
    "gc_pool": "z-1.rgw.log:gc",
    "lc_pool": "z-1.rgw.log:lc",
    "log_pool": "z-1.rgw.log",
    "intent_log_pool": "z-1.rgw.log:intent",
    "usage_log_pool": "z-1.rgw.log:usage",
    "reshard_pool": "z-1.rgw.log:reshard",
    "user_keys_pool": "z-1.rgw.meta:users.keys",
    "user_email_pool": "z-1.rgw.meta:users.email",
    "user_swift_pool": "z-1.rgw.meta:users.swift",
    "user_uid_pool": "z-1.rgw.meta:users.uid",
    "system_key": {
        "access_key": "0te6NH5mcdcq0Tc5i8i2",
        "secret_key": "Oy4IOauQoL18Gp2zM7lC1vLmoawgqcYPbYGcWfXv"
    },
    "placement_pools": [
        {
            "key": "default-placement",
            "val": {
                "index_pool": "z-1.rgw.buckets.index",
                "data_pool": "z-1.rgw.buckets.data",
                "data_extra_pool": "z-1.rgw.buckets.non-ec",
                "index_type": 0,
                "compression": "zlib"
            }
        }
    ],
    "metadata_heap": "",
    "tier_config": [],
    "realm_id": "1455ca33-0e05-45a3-8a32-31772e24cd10"
}
[root@magna022 ~]#

Site1::
[root@magna037 ~]# radosgw-admin bucket stats --bucket=bucket5 --cluster source{
    "bucket": "bucket5",
    "zonegroup": "9d15aca7-affa-4271-8476-bea449e8348d",
    "placement_rule": "default-placement",
    "explicit_placement": {
        "data_pool": "",
        "data_extra_pool": "",
        "index_pool": ""
    },
    "id": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.7",
    "marker": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.7",
    "index_type": "Normal",
    "owner": "t1",
    "ver": "0#21",
    "master_ver": "0#0",
    "mtime": "2017-10-23 11:14:17.270893",
    "max_marker": "0#00000000020.52.1",
    "usage": {
        "rgw.main": {
            "size": 301675680,
            "size_actual": 301690880,
            "size_utilized": 13739020,
            "size_kb": 294606,
            "size_kb_actual": 294620,
            "size_kb_utilized": 13418,
            "num_objects": 5
        }
    },
    "bucket_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    }
}
[root@magna037 ~]# 

Site 2 ::
[root@magna022 ~]# radosgw-admin bucket stats --bucket=bucket5 --cluster target

{
    "bucket": "bucket5",
    "zonegroup": "9d15aca7-affa-4271-8476-bea449e8348d",
    "placement_rule": "default-placement",
    "explicit_placement": {
        "data_pool": "",
        "data_extra_pool": "",
        "index_pool": ""
    },
    "id": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.7",
    "marker": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.7",
    "index_type": "Normal",
    "owner": "t1",
    "ver": "0#11",
    "master_ver": "0#0",
    "mtime": "2017-10-23 11:14:17.270893",
    "max_marker": "0#00000000010.324.1",
    "usage": {
        "rgw.main": {
            "size": 301675680,
            "size_actual": 301690880,
            "size_utilized": 301675680,
            "size_kb": 294606,
            "size_kb_actual": 294620,
            "size_kb_utilized": 294606,
            "num_objects": 5
        }
    },
    "bucket_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    }
}
[root@magna022 ~]#


Data written directly to secondary site is compressed.

[root@magna022 ~]# radosgw-admin bucket stats --bucket=bucket6 --cluster target
{
    "bucket": "bucket6",
    "zonegroup": "9d15aca7-affa-4271-8476-bea449e8348d",
    "placement_rule": "default-placement",
    "explicit_placement": {
        "data_pool": "",
        "data_extra_pool": "",
        "index_pool": ""
    },
    "id": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.8",
    "marker": "531b8fe4-b30e-4361-be2f-4e86194b39ad.4185.8",
    "index_type": "Normal",
    "owner": "t1",
    "ver": "0#11",
    "master_ver": "0#0",
    "mtime": "2017-10-23 11:26:46.087029",
    "max_marker": "0#00000000010.337.1",
    "usage": {
        "rgw.main": {
            "size": 301675680,
            "size_actual": 301690880,
            "size_utilized": 13739020,
            "size_kb": 294606,
            "size_kb_actual": 294620,
            "size_kb_utilized": 13418,
            "num_objects": 5
        }
    },
    "bucket_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    }
}
[root@magna022 ~]#

Comment 20 errata-xmlrpc 2017-12-05 23:49:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3387


Note You need to log in before you can comment on or make changes to this bug.