[multisite] How to trigger metadata sync update?
Hi folks, I desperately need some help to figure out how to trigger metadata sync update in a multisite environment. I'd like to change any data item in RGWBucketInfo at the master zone and want the other zones to pick up the changes. I have tried to use rgw::sal::Bucket::put_info() and RGWBucketCtl::store_bucket_instance_info(). Either approach only updates the local bucket info and the other zones do not pick up the updates. What am I missing? Could someone please show me an example on how to trigger sync update? Thanks a lot, Yixin
Hi Yixin, Any metadata change will internally call forward_request_to_master() to write the changes on the metadata master zone first and then it is applied on other zones. What kind of data item are you trying to add? -shilpa On Wed, May 17, 2023 at 4:49 PM Yixin Jin <yjin77@yahoo.ca> wrote:
Hi folks,
I desperately need some help to figure out how to trigger metadata sync update in a multisite environment. I'd like to change any data item in RGWBucketInfo at the master zone and want the other zones to pick up the changes. I have tried to use rgw::sal::Bucket::put_info() and RGWBucketCtl::store_bucket_instance_info(). Either approach only updates the local bucket info and the other zones do not pick up the updates. What am I missing? Could someone please show me an example on how to trigger sync update?
Thanks a lot, Yixin _______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
Hi Shilpa, Thanks for the tip. I will look through the code that uses this function to get more ideas. I am currently prototyping an idea to apply redirect_zone at bucket level. Thanks, Yixin Sent from Yahoo Mail on Android On Wed., May 17, 2023 at 5:12 p.m., Shilpa Manjrabad Jagannath<smanjara@redhat.com> wrote: Hi Yixin, Any metadata change will internally call forward_request_to_master() to write the changes on the metadata master zone first and then it is applied on other zones. What kind of data item are you trying to add? -shilpa On Wed, May 17, 2023 at 4:49 PM Yixin Jin <yjin77@yahoo.ca> wrote: Hi folks, I desperately need some help to figure out how to trigger metadata sync update in a multisite environment. I'd like to change any data item in RGWBucketInfo at the master zone and want the other zones to pick up the changes. I have tried to use rgw::sal::Bucket::put_info() and RGWBucketCtl::store_bucket_instance_info(). Either approach only updates the local bucket info and the other zones do not pick up the updates. What am I missing? Could someone please show me an example on how to trigger sync update? Thanks a lot, Yixin _______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
Hi Shilpa, I checked out the calls of "forward_request_to_master()" and noticed that it only serves the purpose of forwarding those requests that came from the external sources, such as S3 clients. The difficulty I have encountered is to make a change in RGWBucketInfo in the master zone and expect that change to be synced up in other zones. The change is made with radosgw-admin, not S3 client. I can see the effect of the change in the master zone via "radosgw-admin bucket stats" but other zones don't show it. Any other venues I can explore? Thanks, Yixin On Wednesday, May 17, 2023 at 05:12:09 p.m. EDT, Shilpa Manjrabad Jagannath <smanjara@redhat.com> wrote: Hi Yixin, Any metadata change will internally call forward_request_to_master() to write the changes on the metadata master zone first and then it is applied on other zones. What kind of data item are you trying to add? -shilpa On Wed, May 17, 2023 at 4:49 PM Yixin Jin <yjin77@yahoo.ca> wrote:
Hi folks,
I desperately need some help to figure out how to trigger metadata sync update in a multisite environment. I'd like to change any data item in RGWBucketInfo at the master zone and want the other zones to pick up the changes. I have tried to use rgw::sal::Bucket::put_info() and RGWBucketCtl::store_bucket_instance_info(). Either approach only updates the local bucket info and the other zones do not pick up the updates. What am I missing? Could someone please show me an example on how to trigger sync update?
Thanks a lot, Yixin
_______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
on the metadata master zone, any metadata writes (whether through rgw::sal::Bucket::put_info() or RGWBucketCtl::store_bucket_instance_info()) should be writing two entries to the metatalog log: https://github.com/ceph/ceph/blob/0345083/src/rgw/services/svc_meta_be_sobj...., both in RGWSI_MetaBackend_SObj::post_modify() and in pre_modify(). these metadata log entries should eventually get picked up by other zones during metadata sync. you can use `radosgw-admin mdlog list` to inspect the log entries on the metadata master zone, or `radosgw-admin sync status` on the other zones to track the progress of metadata sync On Thu, May 18, 2023 at 11:33 AM Yixin Jin <yjin77@yahoo.ca> wrote:
Hi Shilpa,
I checked out the calls of "forward_request_to_master()" and noticed that it only serves the purpose of forwarding those requests that came from the external sources, such as S3 clients. The difficulty I have encountered is to make a change in RGWBucketInfo in the master zone and expect that change to be synced up in other zones. The change is made with radosgw-admin, not S3 client. I can see the effect of the change in the master zone via "radosgw-admin bucket stats" but other zones don't show it.
Any other venues I can explore?
Thanks, Yixin
On Wednesday, May 17, 2023 at 05:12:09 p.m. EDT, Shilpa Manjrabad Jagannath <smanjara@redhat.com> wrote:
Hi Yixin,
Any metadata change will internally call forward_request_to_master() to write the changes on the metadata master zone first and then it is applied on other zones. What kind of data item are you trying to add?
-shilpa
On Wed, May 17, 2023 at 4:49 PM Yixin Jin <yjin77@yahoo.ca> wrote:
Hi folks,
I desperately need some help to figure out how to trigger metadata sync update in a multisite environment. I'd like to change any data item in RGWBucketInfo at the master zone and want the other zones to pick up the changes. I have tried to use rgw::sal::Bucket::put_info() and RGWBucketCtl::store_bucket_instance_info(). Either approach only updates the local bucket info and the other zones do not pick up the updates. What am I missing? Could someone please show me an example on how to trigger sync update?
Thanks a lot, Yixin
_______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
_______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
Thanks, Casey, I did see the other zones show that their metadata are lagged behind and later they caught up. However, the bucket info shown in those zones doesn't reflect the change I made at the master zone. Since I added a new string field to RGWBucketInfo and updated its encode/decode, your comment made me think that I might have missed updating its other member functions, particularly dump()/decode_json(). After changing them, the other zones pick up the changes. Shilpa/Casey, thanks a lot for the quick help :) Yixin On Thursday, May 18, 2023 at 12:39:07 p.m. EDT, Casey Bodley <cbodley@redhat.com> wrote: on the metadata master zone, any metadata writes (whether through rgw::sal::Bucket::put_info() or RGWBucketCtl::store_bucket_instance_info()) should be writing two entries to the metatalog log: https://github.com/ceph/ceph/blob/0345083/src/rgw/services/svc_meta_be_sobj...., both in RGWSI_MetaBackend_SObj::post_modify() and in pre_modify(). these metadata log entries should eventually get picked up by other zones during metadata sync. you can use `radosgw-admin mdlog list` to inspect the log entries on the metadata master zone, or `radosgw-admin sync status` on the other zones to track the progress of metadata sync On Thu, May 18, 2023 at 11:33 AM Yixin Jin <yjin77@yahoo.ca> wrote:
Hi Shilpa,
I checked out the calls of "forward_request_to_master()" and noticed that it only serves the purpose of forwarding those requests that came from the external sources, such as S3 clients. The difficulty I have encountered is to make a change in RGWBucketInfo in the master zone and expect that change to be synced up in other zones. The change is made with radosgw-admin, not S3 client. I can see the effect of the change in the master zone via "radosgw-admin bucket stats" but other zones don't show it.
Any other venues I can explore?
Thanks, Yixin
On Wednesday, May 17, 2023 at 05:12:09 p.m. EDT, Shilpa Manjrabad Jagannath <smanjara@redhat.com> wrote:
Hi Yixin,
Any metadata change will internally call forward_request_to_master() to write the changes on the metadata master zone first and then it is applied on other zones. What kind of data item are you trying to add?
-shilpa
On Wed, May 17, 2023 at 4:49 PM Yixin Jin <yjin77@yahoo.ca> wrote:
Hi folks,
I desperately need some help to figure out how to trigger metadata sync update in a multisite environment. I'd like to change any data item in RGWBucketInfo at the master zone and want the other zones to pick up the changes. I have tried to use rgw::sal::Bucket::put_info() and RGWBucketCtl::store_bucket_instance_info(). Either approach only updates the local bucket info and the other zones do not pick up the updates. What am I missing? Could someone please show me an example on how to trigger sync update?
Thanks a lot, Yixin
_______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
_______________________________________________ Dev mailing list -- dev@ceph.io To unsubscribe send an email to dev-leave@ceph.io
participants (3)
-
Casey Bodley
-
Shilpa Manjrabad Jagannath
-
Yixin Jin