Project

General

Profile

Tasks #57569

implement chown admin rest entrypoint

Added by Casey Bodley over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Giuseppe Baccini
Target version:
-
% Done:

0%

Tags:
Reviewed:
Affected Versions:
Pull request ID:

History

#1 Updated by Giuseppe Baccini over 1 year ago

A bit of context: there are some function in SAL interface that are using some detail of RadosStore specific implementation.
An example are link/unlink functions:

int RGWBucketAdminOp::link(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err){
...
  int r = static_cast<rgw::sal::RadosStore*>(store)->ctl()->bucket->unlink_bucket(owner.get_id(), old_bucket->get_info().bucket, null_yield, dpp, false);  
...
}

This code should not be aware of RadosStore because it is logically abstract.
A solution for this could be try to add to rgw::sal::Bucket the methods link/unlink that internally will call specific handlers for concrete subclasses.
A reference implementation for link/unlink should be taken from RGWBucketCtl type.

#2 Updated by Casey Bodley over 1 year ago

  • Assignee set to Giuseppe Baccini

#3 Updated by Soumya Koduri over 1 year ago

Giuseppe Baccini wrote:

A bit of context: there are some function in SAL interface that are using some detail of RadosStore specific implementation.
An example are link/unlink functions:

[...]

This code should not be aware of RadosStore because it is logically abstract.

I think this may eventually be cleaned up. Daniel can confirm.

A solution for this could be try to add to rgw::sal::Bucket the methods link/unlink that internally will call specific handlers for concrete subclasses.

It may not be right to move these APIs to rgw::sal::Bucket if they are not applicable to other stores.

#4 Updated by Giuseppe Baccini over 1 year ago

Soumya Koduri wrote:

It may not be right to move these APIs to rgw::sal::Bucket if they are not applicable to other stores.

Why not? link/unlink are operations desirable to have.

#5 Updated by Giuseppe Baccini over 1 year ago

  • Subject changed from move bucket link/unlink into rgw::sal::Bucket to implement chown admin rest entrypoint

#6 Updated by Giuseppe Baccini over 1 year ago

This item has been repurposed to: implement chown admin rest entrypoint.
After a chat with Daniel Gryniewicz we agreed that link/unlink are operations tight bound with rados.
It can make more sense to implement a chown rest entrypoint to call the rgw::sal::Bucket::chwon method that is already abstract.

Also available in: Atom PDF