Repository navigation
rgw/archive: Disable logging for archive zone - #50676
Conversation
mattbenjamin
left a comment
There was a problem hiding this comment.
this looks plausible to me; can you coordinate with me on downstream backports for testing?
sure.. Also please note that this change doesn't handle deleting the logs (if any created in the old release or mixed-mode clusters). They need to be cleaned up manually. |
|
@mattbenjamin @cbodley Other thing I noticed while working on this PR is that archive zone creates multiple versions of the same object depending on the number of zones configured. For eg., if there are two zones z1, z2 (apart from the archive-zone) configured, when an object ('test-object') is created, archive zone seems to be replicating the object from both the zones and storing two separate copies (though with different version-ids) .. This seems incorrect and a bug to me. Based on etag/src_mtime, it should have ideally filtered the objects already sync'ed from other zones. Can you please confirm. |
in normal sync, the destination zone sends its current object mtime in the it looks like that logic is broken by RGWArchiveDataSyncModule::sync_object(), which generates a random version id for the destination object; so |
There was a problem hiding this comment.
ok, but two comments:
- in existing deployments, this wouldn't take effect until a
radosgw-admin zone modifycalls this function - ideally this would use
RGWSyncModulesManager::supports_data_export(zone.tier_type)so we do the right thing for other sync modules like elasticsearch and cloud sync too
unfortunately, i think that sync module stuff is specific to rados; so maybe this should all be in RGWSyncPolicyCompat::convert_old_sync_config(), where we have access to the 'sync module service'?
There was a problem hiding this comment.
* in existing deployments, this wouldn't take effect until a `radosgw-admin zone modify` calls this function
Right..Thanks! Initially I tried doing this check as part of RGWSI_Zone::do_start() using RGWSyncModulesManager::supports_data_export() but that doesn't update the zone params stored at the backend.
So for existing deployments, do you suggest we need these changes in RGWSI_Zone::do_start() as well (in case radosgw-admin zone modify is not executed)? Or can we update release notes to execute the cmd post upgrade?
* ideally this would use `RGWSyncModulesManager::supports_data_export(zone.tier_type)` so we do the right thing for other sync modules like elasticsearch and cloud sync toounfortunately, i think that sync module stuff is specific to rados; so maybe this should all be in
RGWSyncPolicyCompat::convert_old_sync_config(), where we have access to the 'sync module service'?
Ok. I observed that at times RGWSyncModulesManager may not be initialized by the time we want to use supports_data_export(..).. I will recheck in this code-path and update.
There was a problem hiding this comment.
what do you think about leaving the zone's log_data flag alone, and relying exclusively on RGWBucketSyncPolicyHandler::bucket_exports_data() to do the right thing? that would make things easier on existing users
these services are a mess of circular dependencies :( from RGWServices_Def::init(), it looks like the order is zone_svc -> sync_modules_svc -> bucket_sync_sobj
There was a problem hiding this comment.
what do you think about leaving the zone's
log_dataflag alone, and relying exclusively onRGWBucketSyncPolicyHandler::bucket_exports_data()to do the right thing? that would make things easier on existing users
yes..I initially started with those changes and it helps to disable the logging internally. But bucket sync status and zone_params->log_data still shows incorrect values, which did not seem right. If that is acceptable, I will redo those changes.
these services are a mess of circular dependencies :( from RGWServices_Def::init(), it looks like the order is zone_svc -> sync_modules_svc -> bucket_sync_sobj
Thanks for confirming.
There was a problem hiding this comment.
for bucket sync status, i see that bucket_sync_status() is using RGWBucketSyncPolicyHandler::bucket_imports_data() to tell whether the bucket has any sources. but bucket_source_sync_status() is using RGWZone::syncs_from(zone_name) which only consults the sync_from/sync_from_all fields. maybe we should use bucket_exports_data() there instead?
There was a problem hiding this comment.
right. log_index_operation() in cls/rgw/cls_rgw.cc runs on the osd side, and bool log_op is a parameter for the bucket index operations in cls/rgw/cls_rgw_client.h; so we'd use bucket_exports_data() on the rgw side to determine what to pass for log_op
There was a problem hiding this comment.
Got it. Thanks!
There was a problem hiding this comment.
i was hoping that we could add the per-bucket control as well here (using bucket_exports_data() instead of need_to_log_data()), but this looks correct 👍
@smanjara should we follow up on the per-bucket part later?
There was a problem hiding this comment.
@cbodley sure we could follow up with another pr.
Thanks! Will file a tracker to fix it then. |
thanks soumya. seems to be coming from my change in bcea963 |
Thanks Shilpa. Raised https://tracker.ceph.com/issues/59184 for the same. |
51a3352 to
c679ff1
Compare
There was a problem hiding this comment.
if (!driver->svc()->zone->zone_syncs_from(zone, source)) {driveris already aRadosStore*so we don't need the castsRGWSI_Zone::zone_syncs_from()already checkstarget_zone.syncs_from(source_zone)driver->svc()->zone->get_zone()is justzonehere
There was a problem hiding this comment.
thanks! addressed it.
e0d6d45 to
8985267
Compare
|
jenkins test windows |
8985267 to
fff109d
Compare
Zones (such as archive zone) which do not export data should have sync logging disabled. Fixes# https://tracker.ceph.com/issues/59106 Signed-off-by: Soumya Koduri <[email protected]>
Signed-off-by: Soumya Koduri <[email protected]>
fff109d to
d7af6c2
Compare
|
jenkins test make check |
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
Since archive zone is not used as source for the incremental sync, disable its data logging. In addition, correct
bucket sync statuscmd ouput for the zones with archive zone listed as source.Fixes: https://tracker.ceph.com/issues/59106
Signed-off-by: Soumya Koduri [email protected]
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows