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

librbd: add preliminary support for new operation feature bit #19903

Merged
merged 4 commits into from Jan 13, 2018

Conversation

dillaman
Copy link

This feature bit will be used to disable operations (e.g. clone, snap create

The layering and data-pool features are enabled automatically
when striping or a data pool is specified, respectively. For
the 'rbd feature XYZ' command, hide all non-mutable features.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
m_image_ctx.object_prefix = std::move(m_object_prefix);
m_image_ctx.init_layout();
} else {
m_image_ctx.features = m_features;
m_image_ctx.flags = m_flags;
m_image_ctx.op_features = m_op_features;
m_image_ctx.operations_disabled = (
(m_op_features & ~RBD_OPERATION_FEATURES_ALL) != 0ULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

@dillaman I am not sure I quite understand how it is going to be used. This looks like it should have been explained in the commit 3fe7a2a log message, which looks like truncated.

So operations_disabled is true, when m_op_features contains an unknown bit, i.e. we are an older client. Then we can't do any operations? Probably, I will need just to wait for the next PR to see a use case )

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, I fixed the truncated commit message. The goal is to avoid introducing individual feature bits that break older clients when the older clients can still safely read and write to the image but they won't know how to properly handle some new feature. The two immediate examples will be (1) cloning v2 where snapshots will be unprotected so we cannot let an older client delete a clone that uses the new format and (2) image groups where we cannot let images be removed when they are part of a group w/o cleaning up.

Jason Dillaman added 3 commits January 12, 2018 08:12
This will initially be utilized to restrict older clients from
performing operations against an image if (1) it doesn't
support the new feature bit, or (2) doesn't support the specific
enabled op feature.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

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

lgtm

@trociny trociny merged commit 79fbe60 into ceph:master Jan 13, 2018
@dillaman dillaman deleted the wip-librbd-op-features branch January 13, 2018 13:00
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Jul 31, 2018
Mimic introduced RBD_FEATURE_OPERATIONS feature (PR ceph#19903),
which dashboard_v2 supports. This was backported by 3c175d2
(a cherry-pick of 5056cba). This change disables that support, as
long as there's no plan to backport that RBD feature.

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Aug 3, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Aug 3, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Aug 8, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Aug 8, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Aug 23, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Sep 5, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Sep 26, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
epuertat added a commit to rhcs-dashboard/ceph that referenced this pull request Oct 1, 2018
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced
in PR: ceph#19903,
209f6fc)

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants