ceph: add mgr caps for csi-rbd-node client
If the kernel doesnt support mapping of rbd image with deep-flatten feature,cephcsi need to flatten the rbd image first and than map the image on the node. cephcsi first tries to add a task to flatten the rbd image if its receives any permission error it will try to call rbd CLI command which is a blocking call. This commit adds mgr caps to the csi-rbd-node user so that cephcsi will add flatten task and return immediate error to the kubelet, let kubelet retry again,If we go with blocking rbd CLI call we may end up having stale maps on the node in corner cases. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
1 parent
f5c7c13bb3
commit
ece9efd978
2 files changed
+2
-1
No files matched your search
@@ -81,6 +81,7 @@ func createCSIKeyringCephFSProvisioner(s *keyring.SecretStore) (string, error) {
|
||||
func cephCSIKeyringRBDNodeCaps() []string {
|
||||
return []string{
|
||||
"mon", "profile rbd",
|
||||
"mgr", "allow rw",
|
||||
"osd", "profile rbd",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
|
||||
func TestCephCSIKeyringRBDNodeCaps(t *testing.T) {
|
||||
caps := cephCSIKeyringRBDNodeCaps()
|
||||
assert.Equal(t, caps, []string{"mon", "profile rbd", "osd", "profile rbd"})
|
||||
assert.Equal(t, caps, []string{"mon", "profile rbd", "mgr", "allow rw", "osd", "profile rbd"})
|
||||
}
|
||||
|
||||
func TestCephCSIKeyringRBDProvisionerCaps(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user