Skip to content

luminous: rgw: policy fix for nonexistent objects#29153

Merged
yuriw merged 1 commit intoceph:luminousfrom
davebiffuk:s3_policy_tracker_39272
Oct 10, 2019
Merged

luminous: rgw: policy fix for nonexistent objects#29153
yuriw merged 1 commit intoceph:luminousfrom
davebiffuk:s3_policy_tracker_39272

Conversation

@davebiffuk
Copy link

@davebiffuk davebiffuk commented Jul 22, 2019

https://tracker.ceph.com/issues/39272


rgw: backport of #27309 - policy fix for nonexistent objects

This is the patch from #27309, backported to Luminous.

Fixes: https://tracker.ceph.com/issues/39272
Signed-off-by: Dave Holland dh3@sanger.ac.uk

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

@davebiffuk davebiffuk force-pushed the s3_policy_tracker_39272 branch from 93aaf89 to 5af20b4 Compare July 22, 2019 08:41
@sebastian-philipp sebastian-philipp changed the title rgw: backport of pr27309 - policy fix for Luminous Luminous: rgw:policy fix for Luminous Jul 22, 2019
@sebastian-philipp sebastian-philipp changed the title Luminous: rgw:policy fix for Luminous Luminous: rgw: policy fix for Luminous Jul 22, 2019
@sebastian-philipp
Copy link
Contributor

looks like you haven't done a git cherry-pick -x. Could you please cherry-pick the original commit instead?

@sebastian-philipp sebastian-philipp added this to the luminous milestone Jul 22, 2019
@davebiffuk
Copy link
Author

Hi,

As I understand it (I'm not a git expert) this can't be cherry-picked, because the patch in pr27309 doesn't apply cleanly on Luminous - bucket_policy.verify_permission has slightly different arguments. So this isn't a straight application of the original commit, but a slightly different patch.

Would it be acceptable instead if I include the "cherry picked from ..." text that would have been included in the commit message?

Thanks,
Dave

@sebastian-philipp
Copy link
Contributor

Hi,

As I understand it (I'm not a git expert) this can't be cherry-picked, because the patch in pr27309 doesn't apply cleanly on Luminous - bucket_policy.verify_permission has slightly different arguments. So this isn't a straight application of the original commit, but a slightly different patch.

Would it be acceptable instead if I include the "cherry picked from ..." text that would have been included in the commit message?

Thanks,
Dave

Well, you can cherry-pick -x and then resolve the conflicts. Additionally, please uncomment the conflicts section in the commit message. see http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO_backport_commits

@davebiffuk
Copy link
Author

Thanks for your patience while I try to get this into shape! I believe I've done the cherry-pick as you asked.

@smithfarm smithfarm changed the title Luminous: rgw: policy fix for Luminous luminous: rgw: policy fix for Luminous Jul 22, 2019
@smithfarm
Copy link
Contributor

smithfarm commented Jul 22, 2019

@davebiffuk The commit message is not quite right. We have a "best practice" that says, when cherry-picking, do not edit the original commit message. The cherry-picked commit message can be divided into three parts:

(1) the part before the (cherry picked from . . .) line
(2) the (cherry picked from . . .) line itself
(3) the part after the (cherry picked from . . .) line

(1) is expected to be an exact copy of the original commit message (generated automatically by git - the idea is to not touch this part at all)
(2) also generated by git - not to be modified at all
(3) this part should include the Conflicts section if there were any cherry-pick conflicts or if any other manual changes were made.

If you think it's warranted, (3) can also include any other information you deem to add, such as your Signed-off-by line etc. But only the Conflicts section is mandatory - the rest is optional.

@smithfarm smithfarm requested a review from cbodley July 22, 2019 16:41
@smithfarm smithfarm changed the title luminous: rgw: policy fix for Luminous luminous: rgw: policy fix for nonexistent objects Jul 22, 2019
@smithfarm
Copy link
Contributor

make check is shown as "Pending - running" but in reality it succeeded 17 hours ago.

… object that is non-existent.

Fixes http://tracker.ceph.com/issues/38638

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 5eb50b7)

 Conflicts:
	src/rgw/rgw_op.cc
	  bucket_policy.verify_permission has slightly different arguments
@davebiffuk davebiffuk force-pushed the s3_policy_tracker_39272 branch from 8b55c69 to a752b21 Compare July 23, 2019 09:17
@davebiffuk
Copy link
Author

@smithfarm Thanks for the pointers. Forgive my inexperience - I wasn't trying to take Pritha's credit, just record my name for future "blame" (or otherwise). But I guess git records that? I believe I've got the commit message correct now.

@smithfarm
Copy link
Contributor

smithfarm commented Jul 23, 2019

@davebiffuk Commit message looks good now - thanks. You can add your Signed-off-by line in the bottom section (try git cherry-pick -xs), at your discretion. But you're right: git and github already record that information and most backporters omit it.

@yuriw
Copy link
Contributor

yuriw commented Oct 8, 2019

@yuriw yuriw merged commit be9a038 into ceph:luminous Oct 10, 2019
smithfarm added a commit to smithfarm/ceph that referenced this pull request Oct 30, 2019
I have seen PR descriptions with a single backport tracker URL mentioned twice.
When backport-resolve-issue hit one of these, it would say:

Found backport tracker: https://tracker.ceph.com/issues/39272
Found backport tracker: https://tracker.ceph.com/issues/39272
-----------------------------------------------------------------
INFO:root:Tracker https://tracker.ceph.com/issues/39272 links to PR ceph#29153
INFO:root:Backport Tracker 39272 target version already populated with correct value v12.2.13
INFO:root:Backport Tracker 39272 status is already set to Resolved
-----------------------------------------------------------------
INFO:root:Tracker https://tracker.ceph.com/issues/39272 links to PR ceph#29153
INFO:root:Backport Tracker 39272 target version already populated with correct value v12.2.13
INFO:root:Backport Tracker 39272 status is already set to Resolved
=================================================================

This commit fixes the issue.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants