Skip to content

mgr/dashboard: rbd mirroring snapshot support - #46263

Merged
epuertat merged 1 commit into
ceph:mainfrom
rhcs-dashboard:rbd-mirroring-snapshot
Jun 7, 2022
Merged

epuertat merged 1 commit into
ceph:mainfrom
rhcs-dashboard:rbd-mirroring-snapshot

Conversation

@pereman2

@pereman2 pereman2 commented May 13, 2022 •

Copy link
Copy Markdown
Contributor

When parsing images if an image has the snapshot mode enabled, it will try to run commands
that don't work with that mode. The solution was not running those for now and appending the mode in the get call.

e2e tests are not done here!

Things to consider:

backend

  • Can we get the rbd disk usage from snapshot mirroring image mode?
  • Is an image protected in snapshot mode?
  • set_snap doesn't work with snapshot mode.

frontend

  • disable performing actions snapshots with snapshot mode
  • 1 joint table for all modes or 2 different ones?
    Screenshot from 2022-05-18 19-47-01

Image List
Screenshot from 2022-05-19 16-42-19

Mirror snapshots (the one starts with .mirror) is created implicitly when enabling an image snapshot mirroring and is handled differently. So all of the snapshot actions (like clone, protect etc) doesn't work. Hence disabling those.
Screenshot from 2022-05-16 15-27-10

Screenshot from 2022-05-19 16-45-13

Screenshot from 2022-05-19 16-41-37

Screenshot from 2022-05-19 16-41-14

Screenshot from 2022-05-30 14-39-13

Screenshot from 2022-05-30 14-39-23

Screenshot from 2022-05-27 17-33-01

Screenshot from 2022-05-26 17-38-18

Screenshot from 2022-05-26 17-59-29

Known Issues so far

  • Disk usage is not there for snapshot mirror images
  • Deleting is not possible from frontend for snapshot mirror enabled images. If we disable the snapshot mirroring then we can delete.

Fixes: https://tracker.ceph.com/issues/55648
Signed-off-by: Pere Diaz Bou [email protected]
Signed-off-by: Nizamudeen A [email protected]

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

@pereman2
pereman2 requested a review from a team as a code owner May 13, 2022 15:24
@pereman2
pereman2 requested review from Sarthak0702 and aaSharma14 and removed request for a team May 13, 2022 15:24
@pereman2 pereman2 changed the title mgr/dashboard: rbd mirroring snapshot support [wip] mgr/dashboard: rbd mirroring snapshot support May 13, 2022
@nizamial09
nizamial09 force-pushed the rbd-mirroring-snapshot branch from 8181b33 to 26ed966 Compare May 16, 2022 09:55
@pereman2
pereman2 requested a review from a team as a code owner May 16, 2022 09:55
@nizamial09
nizamial09 force-pushed the rbd-mirroring-snapshot branch from 26ed966 to 1c52b6c Compare May 16, 2022 09:55
@pereman2
pereman2 removed the request for review from a team May 16, 2022 10:49
@nizamial09
nizamial09 force-pushed the rbd-mirroring-snapshot branch 8 times, most recently from 2996f50 to a9bcc7a Compare May 19, 2022 11:54
@nizamial09

Copy link
Copy Markdown
Member

There is one bug in the list table, where even if there is no journal feature enabled, the mirror_mode is set to journal by default. It might be the behaviour but still the journaling feature is not showing as enabled in the image. I confirmed with @ideepika about this behaviour. She said it might not be a dashboard issue. @epuertat @pereman2

@nizamial09
nizamial09 force-pushed the rbd-mirroring-snapshot branch from a9bcc7a to 888c4a1 Compare May 19, 2022 15:38
@pereman2
pereman2 force-pushed the rbd-mirroring-snapshot branch from 951f966 to 08e836f Compare May 30, 2022 15:58
@nizamial09

Copy link
Copy Markdown
Member

I think mirroring should be disabled for Edit action!

What do you mean?

Changing the mirroring mode while editing the image should be disabled

Why was that actually? Is it not possible to change the mirroring mode of an image?

@pereman2

Copy link
Copy Markdown
Contributor Author

jenkins test api

1 similar comment
@aaSharma14

Copy link
Copy Markdown
Contributor

jenkins test api

@idryomov
idryomov requested review from ideepika and removed request for idryomov June 1, 2022 12:02
@avanthakkar

avanthakkar commented Jun 1, 2022 •

Copy link
Copy Markdown
Contributor

I think mirroring should be disabled for Edit action!

What do you mean?

Changing the mirroring mode while editing the image should be disabled

Why was that actually? Is it not possible to change the mirroring mode of an image?

No. I think there's no cli support for editing/changing mirroring mode. And btw I've already added a commit in this PR for tht.

@ideepika ideepika left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

as we discussed in meeting the PR work looks good! added some comments, with review in progress.

some questions would like to discuss:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you explain why we used journaling feature instead of using mirror_mode here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

because mirror_mode says journal even when the journaling is disabled. I mean even if there is no mirroring enabled, the mode is always journal. so I couldn't rely on the mirror_mode for journal. I think I discussed this with you and you said it might be an issue from rbd side? @ideepika

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see, yeah I remember now, since we use journaling feature just for mirroring, it should be fine, I will take a look into the discrepancy, please open a tracker if you happen to reproduce it. @nizamial09

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@epuertat

epuertat commented Jun 2, 2022

Copy link
Copy Markdown
Member

Moving out from ready to merge to address comments from @ideepika

@epuertat

epuertat commented Jun 2, 2022

Copy link
Copy Markdown
Member

jenkins test dashboard

@nizamial09

Copy link
Copy Markdown
Member

And btw I've already added a commit in this PR for tht.

Just tested this. but this will mean that we cannot enable snapshot/journal mirroring on an existing image right? So I don't think we should disable editing it. @avanthakkar

@nizamial09

Copy link
Copy Markdown
Member
  • move to trash, when mirror snapshot might lead to inconsistency if we try to delete mirror snapshot that's in sync or maintained for rollback purpose. If possible to delete, would suggest
    mirror snapshot trash having some warning for scheduler generated (starting with .mirror*)
    snapshots. This will be taken care of when mirroring is disabled/deleted or we
    reach rbd_mirroring_max_mirroring_snapshots which could be a good advanced
    option to add, default being 3 for rbd_mirroring_max_mirroring_snapshot.

thanks for this. i tested it and its not working properly from dashboard. so created a tracker. https://tracker.ceph.com/issues/55894 along with other improvement topics too. lets keep it separate and do it in a different PR to keep this one minimal.

@nizamial09
nizamial09 force-pushed the rbd-mirroring-snapshot branch from b0f75f8 to d8c7ca0 Compare June 6, 2022 15:51
Enable snapshot mirroring from the Pools -> Image

Also show the mirror-snapshot in the image where snapshot is enabled

When parsing images if an image has the snapshot mode enabled, it will
try to  run commands that don't work with that mode. The solution was
not running those for now and appending the mode in the get call.

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

Signed-off-by: Pere Diaz Bou <[email protected]>
Signed-off-by: Nizamudeen A <[email protected]>
Signed-off-by: Aashish Sharma <[email protected]>
Signed-off-by: Avan Thakkar <[email protected]>
@nizamial09
nizamial09 requested a review from ideepika June 6, 2022 15:56
@nizamial09

Copy link
Copy Markdown
Member

And btw I've already added a commit in this PR for tht.

Just tested this. but this will mean that we cannot enable snapshot/journal mirroring on an existing image right? So I don't think we should disable editing it. @avanthakkar

based on the discussion with @avanthakkar i re enabled editing the mirroring.

@pereman2
pereman2 force-pushed the rbd-mirroring-snapshot branch from d8c7ca0 to 489a385 Compare June 6, 2022 15:57
@pereman2

pereman2 commented Jun 7, 2022

Copy link
Copy Markdown
Contributor Author

jenkins test cephadm

@pereman2

pereman2 commented Jun 7, 2022

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard cephadm

@ideepika ideepika left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, thanks!

@avanthakkar

Copy link
Copy Markdown
Contributor

jenkins test dashboard cephadm

@epuertat
epuertat merged commit 65acb3e into ceph:main Jun 7, 2022
@epuertat
epuertat deleted the rbd-mirroring-snapshot branch June 7, 2022 14:25
mmgaggle added a commit to mmgaggle/ceph that referenced this pull request Oct 5, 2026
The op_*() methods of the S3 bucket and object handlers test the
sub-resources they serve, and run any other request as the plain
bucket or object operation for its method. A request for an S3 API
that rgw lacks therefore runs as another operation, and is answered
success:

- DeleteBucketMetricsConfiguration and the other configuration deletes
  for analytics, inventory, intelligent-tiering and metadata tables run
  as DeleteBucket, and delete an empty bucket.
- PutObjectAnnotation and UpdateObjectEncryption run as PutObject, and
  replace the object's data with the request body. RenameObject runs as
  PutObject with no body, and leaves an empty object at the destination.
- DeleteObjectAnnotation runs as DeleteObject, and deletes the object.
- The Get and List calls run as ListObjects or GetObject.

ceph#46263 fixed this for DeleteBucketEncryption and DeleteBucketReplication
by serving those sub-resources; each API that S3 has added since falls
through the same way.

Return no op for a request whose query names one of these APIs'
sub-resources and none that its method serves, which is answered
405 MethodNotAllowed. S3 answers the same for a sub-resource that a
region does not serve, such as accelerate, and S3 clients read it as a
feature the endpoint lacks. The test is in the op_get(), op_put(),
op_delete() and op_post() methods of the S3 bucket and object handlers,
so it does not apply to the S3 website handlers, whose query strings
are the site's. HEAD and OPTIONS requests are left alone.

Fixes: https://tracker.ceph.com/issues/80921
Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Kyle Bader <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants