nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: rook/rook
Pull request #6802 (2020-12-09 16:00:59)

ceph: add mgr caps for csi-rbd-node client (bp #6765)
This is an automated backport of pull request #6765 done by Mergify
---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.io/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.io/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/
</details>



Patch:
diff --git a/pkg/operator/ceph/csi/secrets.go b/pkg/operator/ceph/csi/secrets.go
index d78f559ca..d43178f25 100644
--- a/pkg/operator/ceph/csi/secrets.go
+++ b/pkg/operator/ceph/csi/secrets.go
@@ -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",
 	}
 }


Test patch:
diff --git a/pkg/operator/ceph/csi/secrets_test.go b/pkg/operator/ceph/csi/secrets_test.go
index 00b2dfc16..3120ff23c 100644
--- a/pkg/operator/ceph/csi/secrets_test.go
+++ b/pkg/operator/ceph/csi/secrets_test.go
@@ -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) {