-
Notifications
You must be signed in to change notification settings - Fork 554
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: use go-ceph rbd admin task api for 'trash remove' & 'flatten' #2633
Conversation
eae9bbf
to
161fd06
Compare
161fd06
to
aeffec9
Compare
/retest ci/centos/k8s-e2e-external-storage/1.22 |
failed due to #2264 |
build.env
Outdated
@@ -13,7 +13,7 @@ CSI_IMAGE_VERSION=canary | |||
|
|||
# Ceph version to use | |||
BASE_IMAGE=docker.io/ceph/ceph:v16 | |||
CEPH_VERSION=octopus | |||
BUILD_TAGS=ceph_preview |
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.
can we document the ceph_preview thing ?
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.
can we document the ceph_preview thing ?
BUILD_TAGS=ceph_preview | |
# ceph_preview tag is required to access go-ceph APIs which are under preview. | |
BUILD_TAGS=ceph_preview |
@humblec is this sufficient ?
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.
add a link to https://github.com/ceph/go-ceph/blob/master/docs/api-stability.md#preview here
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.
I do not think we should set ceph_preview
as default. Make sure that APIs from go-ceph are stable and part of the latest release.
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.
ceph_preview
is removed and go-ceph is upgraded to v0.13.0 in this pr instead
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.
LGTM . @Rakshith-R have you verified its working with older ceph releases where we don't have manager command support?
internal/util/connection.go
Outdated
@@ -123,6 +123,16 @@ func (cc *ClusterConnection) GetRBDAdmin() (*ra.RBDAdmin, error) { | |||
return ra.NewFromConn(cc.conn), nil | |||
} | |||
|
|||
// GetTaskAdmin returns TaskAdmin to add tasks on rbd volumes. |
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.
rbd volumes
to rbd images
Yes, I ran it with ceph 14.2.2 where there's rbd task support, works as expected. |
you mean no rbd task support? |
yes 😅 |
aeffec9
to
826f0be
Compare
5c01d0b
to
2ead05f
Compare
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.
Suggestion to squash the last two patches together (drop cr
from flattenRbdImage()
).
Having ceph_preview
as default in the BUILD_TAGS
is not very clean, we should probably wait until go-ceph provides a version where there is no need to set the build tag.
build.env
Outdated
@@ -13,7 +13,7 @@ CSI_IMAGE_VERSION=canary | |||
|
|||
# Ceph version to use | |||
BASE_IMAGE=docker.io/ceph/ceph:v16 | |||
CEPH_VERSION=octopus | |||
BUILD_TAGS=ceph_preview |
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.
I do not think we should set ceph_preview
as default. Make sure that APIs from go-ceph are stable and part of the latest release.
@humblec you have requested changes on this PR. PTAL |
/retest ci/centos/k8s-e2e-external-storage/1.21 |
@Rakshith-R "ci/centos/k8s-e2e-external-storage/1.21" test failed. Logs are available at location for debugging |
This commit removes `rv.Connect(cr)` since the rbdVolume should have an active connection in this stage of the function call. `rv.getCloneDepth(ctx)` will work after a connect to the cluster. Signed-off-by: Rakshith R <rar@redhat.com>
1f93b1e
to
c9f93de
Compare
Pull request has been modified.
With introduction of go-ceph rbd admin task api, credentials are no longer required to be passed as cli cmd is not invoked. Signed-off-by: Rakshith R <rar@redhat.com>
This commit removes rbdVol.getTrashPath() function since it is no longer being used due to introduction of go-ceph rbd admin task api for deletion. Signed-off-by: Rakshith R <rar@redhat.com>
This function returns new go-ceph TaskAdmin to add tasks on rbd volumes. Signed-off-by: Rakshith R <rar@redhat.com>
Signed-off-by: Rakshith R <rar@redhat.com>
c9f93de
to
3da4afd
Compare
Pull request has been modified.
few lines creeped in to migration.go during rebase, fixed that. |
Thanks @Rakshith-R , I will let @nixpanic to confirm once, as I heard previous changes were tested too. |
Closes: #2186
New Mgr Not Supported errors thrown by go-ceph
API call not implemented server-side: No handler found for 'rbd task add trash remove'
(rook 1.2.0, ceph v:14.2.2)rados: ret=-13, Permission denied: "access denied: does your client key have mgr caps? See http://docs.ceph.com/en/latest/mgr/administrator/#client-authentication"
(when user secret does not have mgr caps)