Skip to content

Comments

RGW: pubsub publish commit with etag populated#54569

Merged
yuvalif merged 1 commit intoceph:mainfrom
AliMasarweh:wip-alimasa-multi-pubsub-etag
Dec 17, 2023
Merged

RGW: pubsub publish commit with etag populated#54569
yuvalif merged 1 commit intoceph:mainfrom
AliMasarweh:wip-alimasa-multi-pubsub-etag

Conversation

@AliMasarweh
Copy link
Member

@AliMasarweh AliMasarweh commented Nov 20, 2023

Fixes: https://tracker.ceph.com/issues/63532

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@AliMasarweh AliMasarweh requested a review from a team as a code owner November 20, 2023 11:11
@github-actions github-actions bot added the rgw label Nov 20, 2023
@yuvalif
Copy link
Contributor

yuvalif commented Nov 20, 2023

can you please add a test for etag in "MPU complete" to the test suite?

@yuvalif
Copy link
Contributor

yuvalif commented Nov 20, 2023

please add:

Fixes: https://tracker.ceph.com/issues/63532

to the commit message

@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch from c274296 to a22bb01 Compare November 21, 2023 12:26
@cbodley cbodley removed the needs-qa label Nov 23, 2023
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch from a22bb01 to a7d40a2 Compare November 28, 2023 13:59
@AliMasarweh
Copy link
Member Author

AliMasarweh commented Nov 28, 2023

I think we still have an issue with etag not being populated in the main branch
So I need to fix the original issue before proceeding to work on the test

@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch from a7d40a2 to 2761671 Compare November 29, 2023 12:52
@yuvalif
Copy link
Contributor

yuvalif commented Nov 30, 2023

please test against the rgw suite, as there are changes here unrelated to notifications

@yuvalif yuvalif requested a review from cbodley November 30, 2023 13:56
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch from 2761671 to 81187ea Compare December 4, 2023 08:54
@github-actions github-actions bot added the tests label Dec 4, 2023
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch from 81187ea to 437f699 Compare December 4, 2023 11:01
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch 2 times, most recently from 1564aa2 to 4e7f375 Compare December 4, 2023 12:58
uint64_t min_part_size = cct->_conf->rgw_multipart_min_part_size;
auto etags_iter = part_etags.begin();
rgw::sal::Attrs attrs = target_obj->get_attrs();
rgw::sal::Attrs& attrs = target_obj->get_attrs();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbodley can you please see if this change has other implication?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's hard to tell. are we mutating the attrs? if not these should be const-refs instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we are mutating the attrs at line 2544:

  attrs[RGW_ATTR_ETAG] = etag_bl;

  if (compressed) {
    // write compression attribute to full object
    bufferlist tmp;
    encode(cs_info, tmp);
    attrs[RGW_ATTR_COMPRESSION] = tmp;
  }

@AliMasarweh
Copy link
Member Author

@AliMasarweh
Copy link
Member Author

jenkins test windows

@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch 2 times, most recently from c45aa3e to 5900adb Compare December 11, 2023 12:51
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch from 5900adb to 66ba85c Compare December 11, 2023 12:52
@AliMasarweh AliMasarweh force-pushed the wip-alimasa-multi-pubsub-etag branch from 66ba85c to 18c202c Compare December 14, 2023 09:49
@AliMasarweh
Copy link
Member Author

I think this is a successful teuthology run:
https://pulpito.ceph.com/alimasa-2023-12-15_02:48:26-rgw-wip-alimasa-multi-pubsub-etag-distro-default-smithi/

3 failures unrelated to my change:

rgw multisite test failures 
Command failed on smithi088 with status 100: 'DEBIAN_FRONTEND=noninteractive sudo -E apt-get -y --force-yes install python-dev' 
rgw multisite test failures 

can I merge?

@yuvalif
Copy link
Contributor

yuvalif commented Dec 17, 2023

I think this is a successful teuthology run: https://pulpito.ceph.com/alimasa-2023-12-15_02:48:26-rgw-wip-alimasa-multi-pubsub-etag-distro-default-smithi/

3 failures unrelated to my change:

rgw multisite test failures 
Command failed on smithi088 with status 100: 'DEBIAN_FRONTEND=noninteractive sudo -E apt-get -y --force-yes install python-dev' 
rgw multisite test failures 

can I merge?

yes. please merge once "make check" passes

@AliMasarweh
Copy link
Member Author

jenkins test make check

@AliMasarweh
Copy link
Member Author

jenkins test make check arm64

@yuvalif yuvalif merged commit 02b3d4c into ceph:main Dec 17, 2023
leonid-s-usov pushed a commit to ceph/ceph-ci that referenced this pull request Apr 8, 2024
This version refreshes object attrs after upload completes, which
seems to be the smallest available fix.  Appears to return the correct
value for ETag.

For 7.1, we could replace this fix with a validated backport of (at
least) ceph/ceph#54569.  This is a more intrusive
change and original author should do the backport.

Resolves: rhbz#2266579

Signed-off-by: matt benjamin <[email protected]>
Comment on lines -6709 to -6711
// remove the upload meta object ; the meta object is not versioned
// when the bucket is, as that would add an unneeded delete marker
int r = meta_obj->delete_object(this, y, true /* prevent versioning */);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before this moved to RGWCompleteMultipart::complete(), it was only being called on success. but complete() is called on errors too, so the change caused a regression in https://tracker.ceph.com/issues/65746

Comment on lines +6707 to +6708
int r = serializer->unlock();
if (r < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this unlock() call wasn't here before, and i'm not sure why it was added. in the successful path where we call meta_obj->delete_object(), we shouldn't do a separate unlock() because delete_object() deletes the lock implicitly (that's why it uses serializer->clear_locked())

// make reservation for notification if needed
std::unique_ptr<rgw::sal::Notification> res
= driver->get_notification(meta_obj.get(), nullptr, s, rgw::notify::ObjectCreatedCompleteMultipartUpload, y, &s->object->get_name());
res = driver->get_notification(meta_obj.get(), nullptr, s, rgw::notify::ObjectCreatedCompleteMultipartUpload, y,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems wrong for the Notification to point at the meta_obj rather than the target_obj. that's probably why you were seeing lifetime issues around it?

@cbodley
Copy link
Contributor

cbodley commented May 3, 2024

@AliMasarweh @yuvalif please see fix/cleanup in #57257

mkogan1 pushed a commit to mkogan1/ceph that referenced this pull request May 8, 2024
This version refreshes object attrs after upload completes, which
seems to be the smallest available fix.  Appears to return the correct
value for ETag.

For 7.1, we could replace this fix with a validated backport of (at
least) ceph#54569.  This is a more intrusive
change and original author should do the backport.

Resolves: rhbz#2266579
Resolves: rhbz#2271117

Signed-off-by: matt benjamin <[email protected]>
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.

3 participants