-
Notifications
You must be signed in to change notification settings - Fork 40k
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
storageclass ceph add imageformat parameter #45805
storageclass ceph add imageformat parameter #45805
Conversation
Hi @weiwei04. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/assign @saad-ali please take a look, thanks. |
@saad-ali any comments on this pr? |
/assign @rootfs would you please take a look, thanks. |
pkg/volume/rbd/rbd.go
Outdated
default: | ||
return nil, fmt.Errorf("invalid option %q for volume plugin %s", k, r.plugin.GetPluginName()) | ||
} | ||
} | ||
// sanity check | ||
if imageFormat != rbdImageFormat1 && imageFormat != rbdImageFormat2 { | ||
return nil, fmt.Errorf("invalid ceph imageformat %s, neither 1 or 2", imageFormat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Error("invalid ..., expecting %s or %s", imageFormat1, imageFormat2)
@k8s-bot ok to test |
Though image format 1 is deprecated, it is still used by krbd (which rbd volume is based on). Newer kernel starts to support format 2 but many linux distros don't have them yet. The plan is to wait till they pick up the newer kernel and we add image format options. |
d9ed3db
to
36eada0
Compare
@k8s-bot pull-kubernetes-federation-e2e-gce test this |
@rootfs modified the error log, please take a look, thanks. |
@weiwei04 please update readme and more diagnostic messages when older krbd failes to map v2 image |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Bump to verify CLA. |
28adc3a
to
60f8ae5
Compare
@@ -192,6 +193,10 @@ parameters: | |||
* `pool`: Ceph RBD pool. Default is "rbd". | |||
* `userId`: Ceph client ID that is used to map the RBD image. Default is the same as `adminId`. | |||
* `userSecretName`: The name of Ceph Secret for `userId` to map RBD image. It must exist in the same namespace as PVCs. It is required. | |||
* `imageFormat`: Ceph RBD image format, "1" or "2". Default is "1". | |||
* `imageFeatures`: Ceph RBD image format 2 features, comma delimited. This is optional, and only be used if you set `imageFormat` to "2". For a complete list of available image features, please refer to [RBD docs](http://docs.ceph.com/docs/master/man/8/rbd/). By default, all features (except for striping) will be enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all features are supported and unfortunately RBD docs are not well updated.
/release-note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rootfs lgtm
@rootfs |
/lgtm thanks for contributing! |
/approve |
/approve no-issue |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: eparis, rootfs, weiwei04 No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eparis, rootfs, weiwei04 Associated issue requirement bypassed by: eparis The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
3 similar comments
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eparis, rootfs, weiwei04 Associated issue requirement bypassed by: eparis The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eparis, rootfs, weiwei04 Associated issue requirement bypassed by: eparis The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eparis, rootfs, weiwei04 Associated issue requirement bypassed by: eparis The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/sig storage |
Automatic merge from submit-queue |
@@ -209,6 +209,7 @@ parameters: | |||
pool: kube | |||
userId: kube | |||
userSecretName: ceph-secret-user | |||
imageFormat: "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does "1" need to be in double quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it need to be in double quotes, because parameters
is a map of string to string.
Will there ever be a case when imageFormat will be nil or ""? I'm not sure exactly where in the lifecycle of a PV Provision() is called. For example, if a PV were created before this code was merged. |
hi,
After this code is merged, |
What this PR does / why we need it:
Add a imageformat parameter for StorageClass(ceph rbd)
k8s hard coded ceph imageformat 1, according to ceph manual, imageformat 1 was deprecated, we should add an extra ceph parameter to set ceph rbd imageformat. Ceph rbd imageformat can only be 1 or 2, set the default value to 1.
Release note: