Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgwlc: send pool transition notifications too #57551

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattbenjamin
Copy link
Contributor

@mattbenjamin mattbenjamin commented May 19, 2024

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

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

@mattbenjamin mattbenjamin requested a review from a team as a code owner May 19, 2024 16:44
@github-actions github-actions bot added the rgw label May 19, 2024
@@ -1441,52 +1475,12 @@ class LCOpAction_Transition : public LCOpAction {
null_yield);
auto version_id = oc.o.key.instance;

ret = notify->publish_reserve(oc.dpp, nullptr);
if (ret < 0) {
r = notify->publish_reserve(oc.dpp, nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

the event_types above (line:1463 - line:1469) doesn't take !(bucket->versioned) case into account. Can you please address that too ..

if (! oc.bucket->versioned()) {
   event_types.push_back(rgw::notify::ObjectTransition);
}  else if (oc.o.is_current() && !oc.o.is_delete_marker()) {
   event_types.insert(event_types.end(),
                     {rgw::notify::ObjectTransitionCurrent,
                      rgw::notify::LifecycleTransition});
} else {
   event_types.push_back(rgw::notify::ObjectTransitionNoncurrent);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure LifecycleTransition is set correctly, either

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

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
event_types.push_back(rgw::notify::ObjectTransitionNoncurrent);
}

std::unique_ptr<rgw::sal::Notification> notify =
Copy link
Contributor

Choose a reason for hiding this comment

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

This would generate events for all transitions including cloud-transition. Should we remove events from delete_tier_obj() (line:1379-1401) to avoid duplicate notifications? (unless we plan to have new notify:: type for deleted objects post cloud-transition)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so you would propose to remove all notifications currently being sent in delete_tier_obj()?

When a tiering operation causes the removal of a local object as
a side effect, it is not a lifecycle delete, so don't send
lifecycle notifications for the delete (but send any transition
notifications that are configured).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Missed when the new event types were added.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Copy link
Contributor

@soumyakoduri soumyakoduri left a comment

Choose a reason for hiding this comment

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

Looks Great.. Thanks Matt!!

@ivancich ivancich added the wip-eric-testing-1 for ivancich testing label May 30, 2024
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@ivancich
Copy link
Member

QA had this error; could it be in any way related to this PR or is it unrelated?

from: https://qa-proxy.ceph.com/teuthology/ivancich-2024-05-31_15:05:26-rgw-wip-eric-testing-1-distro-default-smithi/7735483/teuthology.log

2024-05-31T15:57:39.822 INFO:teuthology.orchestra.run.smithi044.stdout:FAILED s3tests_boto3/functional/test_s3.py::test_lifecycle_expiration_newer_noncurrent
2024-05-31T15:57:39.822 INFO:teuthology.orchestra.run.smithi044.stdout:= 1 failed, 629 passed, 125 skipped, 103 deselected, 1 xfailed, 18 warnings in 1313.49s (0:21:53) =
2024-05-31T15:57:39.936 INFO:teuthology.orchestra.run.smithi044.stdout:ERROR: InvocationError for command /home/ubuntu/cephtest/s3-tests-client.0/.tox/py/bin/pytest -v -m 'not fails_on_rgw and not cloud_transition and not test_of_sts and not webidentity_test and not fails_with_subdomain and not sse_s3' (exited with code 1)

@ivancich ivancich removed the wip-eric-testing-1 for ivancich testing label Jun 3, 2024
@cbodley cbodley removed the needs-qa label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants