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

rbd: add support for CloneImageByID() #1000

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

nixpanic
Copy link
Member

@nixpanic nixpanic commented Jun 21, 2024

RBD image groups can be used to create consistent snapshots of all images that are part of the group. The new rbd_clone4() API makes it possible to create a new RBD image from a single snapshot that was created as part of the group snapshot.

Note about testing status

The rbd_clone4() API has only just been backported to Squid for version 19.1.1. There are no released container images available yet that contain this new API, only the ceph-ci/ceph:main image seems to have it.

Checklist

  • Added tests for features and functional changes
  • Public functions and types are documented
  • Standard formatting is applied to Go code
  • Is this a new API? Added a new file that begins with //go:build ceph_preview
  • Ran make api-update to record new APIs

New or infrequent contributors may want to review the go-ceph Developer's Guide including the section on how we track API Status and the API Stability Plan.

The go-ceph project uses mergify. View the mergify command guide for information on how to interact with mergify. Add a comment with @Mergifyio rebase to rebase your PR when github indicates that the PR is out of date with the base branch.

@phlogistonjohn
Copy link
Collaborator

Early feedback: can you please name the file after the feature and not a ceph version. This has caused confusion in the past (literally yesterday in #999) and isn't strictly needed. Something like clone_image_by_id.go would be fine IMO. Additionally, if you think it'll only be available for squid initially let's have build tags excluding it from pacific, quincy, and reef too - at least for now.

@nixpanic nixpanic marked this pull request as ready for review June 24, 2024 13:20
@nixpanic nixpanic force-pushed the rbd_clone4 branch 2 times, most recently from cdb01f3 to 4596b70 Compare June 24, 2024 13:52
@nixpanic
Copy link
Member Author

Tests seem to run in squid and main:
image

@phlogistonjohn phlogistonjohn added the API This PR includes a change to the public API of a go-ceph package label Jun 24, 2024
nixpanic added a commit to nixpanic/ceph-csi that referenced this pull request Jun 24, 2024
The new rbd_clone4() API is only available in Squid and newer. Squid is
not yet released, therefor it is required to use the container image
from the Ceph CI registry.

rbd_clone() is added in PR ceph/go-ceph#1000, that branch needs to be
vendored as well.
Copy link
Collaborator

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

Minor typo, code generally looks ok.

rbd/clone_image_by_id.go Outdated Show resolved Hide resolved
@nixpanic nixpanic force-pushed the rbd_clone4 branch 2 times, most recently from 6c99adc to 1d1bac3 Compare June 25, 2024 07:27
nixpanic added a commit to nixpanic/ceph-csi that referenced this pull request Jun 25, 2024
The new rbd_clone4() API is only available in Squid and newer. Squid is
not yet released, therefor it is required to use the container image
from the Ceph CI registry.

rbd_clone() is added in PR ceph/go-ceph#1000, that branch needs to be
vendored as well.
rbd/clone_image_by_id.go Show resolved Hide resolved
rbd/clone_image_by_id_test.go Outdated Show resolved Hide resolved
nixpanic added a commit to nixpanic/ceph-csi that referenced this pull request Jun 25, 2024
The new rbd_clone4() API is only available in Squid and newer. Squid is
not yet released, therefor it is required to use the container image
from the Ceph CI registry.

rbd_clone() is added in PR ceph/go-ceph#1000, that branch needs to be
vendored as well.
RBD image groups can be used to create consistent snapshots of all
images that are part of the group. The new rbd_clone4() API makes it
possible to create a new RBD image from a single snapshot that was
created as part of the group snapshot.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
Copy link
Collaborator

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

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

lgtm, thanks.

rbd/clone_image_by_id.go Show resolved Hide resolved
Copy link
Collaborator

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@mergify mergify bot merged commit ee25db9 into ceph:master Jun 25, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API This PR includes a change to the public API of a go-ceph package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants