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

Add support for rbd_image_options_t #111

Merged
merged 3 commits into from
Dec 11, 2019
Merged

Conversation

nixpanic
Copy link
Member

@nixpanic nixpanic commented Nov 29, 2019

While rewriting Ceph-CSI to use go-ceph instead of the rbd command, some functionality is missing in go-ceph. One of the missing pieces is support for setting certain options while creating an image (optional data-pool).

This series adds support for rbd_image_options_t with getter/setter functions and the like based on librbd.h.

Note that Mimic added a new option, hence updating the tests to consume a more recent version (Nautilus, was Luminous).

In order to keep this working with Luminous, rbd/rbd_options_list.pgo is used to generate rbd/rbd_options_list.go which may, or may not include RBD_IMAGE_OPTION_FLATTEN, depending on the Ceph version. (Does not work as expected)

As Travis CI has been configured to run on Luminous, RBD_IMAGE_OPTION_FLATTEN has been disabled and will not be available for now.

@nixpanic
Copy link
Member Author

Well, yes, it is expected that this fails on Ceph Luminous... I'll consider commenting RBD_IMAGE_OPTION_FLATTEN unless I can find an easy/clean way to use #ifdef or similar.

@nixpanic nixpanic force-pushed the rbd/options branch 2 times, most recently from 5366b6b to f6b91ab Compare November 29, 2019 12:29
micro-osd.sh Outdated Show resolved Hide resolved
rbd/rbd_options_test.go Outdated Show resolved Hide resolved
@nixpanic
Copy link
Member Author

nixpanic commented Dec 3, 2019 via email

Dockerfile Show resolved Hide resolved
rbd/rbd_options.go Outdated Show resolved Hide resolved
rbd/rbd_options.go Outdated Show resolved Hide resolved
rbd/rbd_options.go Outdated Show resolved Hide resolved
rbd/rbd_options_test.go Outdated Show resolved Hide resolved
rbd/rbd_options_test.go Outdated Show resolved Hide resolved
rbd/rbd.go Outdated Show resolved Hide resolved
@nixpanic
Copy link
Member Author

I think this is ready, all concerns/remarks should have been addressed.

@humblec
Copy link

humblec commented Dec 11, 2019

@phlogistonjohn can you please take a look at this ?

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.

@phlogistonjohn
Copy link
Collaborator

@nixpanic I merged the other PR (splitting out the other create functions) first. Please rebase this at your convenience.

Prepare for adding support for RbdImageOptions with
RBD_IMAGE_OPTION_FLATTEN that has been introduced in Ceph Mimic.
Nautilus is the most recent supported versions, so use that for testing.

Signed-off-by: Niels de Vos <[email protected]>
There are several RbdImageOptions that can be used to configure features
of an RBD image while creating, cloning, migrating and copying. A
follow-up patch will add Create4() where the RbdImageOptions can be
used.

Signed-off-by: Niels de Vos <[email protected]>
This allows to set additional options while creating RBD images.
Ceph-CSI will initially consume this to configure an optionally
different pool for data.

Signed-off-by: Niels de Vos <[email protected]>
@nixpanic
Copy link
Member Author

nixpanic commented Dec 11, 2019 via email

@phlogistonjohn phlogistonjohn merged commit b86563d into ceph:master Dec 11, 2019
@nixpanic nixpanic deleted the rbd/options branch January 20, 2020 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants