Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Feb 13, 2026

Describe what this PR does

Replace direct CLI command execution with go-ceph library APIs for blocklist operations
in AddCephBlocklist and RemoveCephBlocklist functions.

Fixes below issues -

'rpc error: code = Internal desc = failed to fence CIDR block ["10.1.112.80/32
    10.1.112.50/32" "10.1.112.71/32" "10.1.112.51/32" "10.1.112.52/32" "10.1.112.70/32"]:
    failed to blocklist IP "10.1.112.80": an error (exit status 22) occurred while
    running ceph args: [osd blocklist add 10.1.112.80 43829h6m0s --id=csi-rbd-provisioner
    --keyfile=***stripped*** -m=10.1.112.84:3300,10.1.112.83:3300,10.1.112.87:3300,10.1.112.86:3300,10.1.112.82:3300]
    stderr: "43829h6m0s not valid:  43829h6m0s doesn''t represent a float\nInvalid
    command: unused arguments: [''43829h6m0s'']\nosd blocklist [<range>] <blocklistop:add|rm>
    <addr> [<expire:float>] :  add (optionally until <expire> seconds from now) or
    remove <addr> from blocklist\nError EINVAL: invalid command\n"'
  result: Failed

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

I0212 12:34:31.312009       1 utils.go:350] ID: 32 GRPC call: /fence.FenceController/FenceClusterNetwork
I0212 12:34:31.312157       1 utils.go:351] ID: 32 GRPC request: {"cidrs":[{"cidr":"10.90.89.66/32"},{"cidr":"11.67.12.42/24"}],"parameters":{"clusterID":"rook-ceph"},"secrets":"***stripped***"}
I0212 12:34:32.307383       1 cephcmds.go:337] ID: 32 blocklisted IP "10.90.89.66/32" successfully
I0212 12:34:33.315575       1 cephcmds.go:337] ID: 32 blocklisted IP "11.67.12.42/24" successfully
I0212 12:34:33.315704       1 utils.go:357] ID: 32 GRPC response: {}

[root@c1 /]# ceph osd blocklist ls
cidr:11.67.12.42:0/24 2031-02-12T17:40:30.279345+0000
cidr:10.90.89.66:0/32 2031-02-12T17:40:29.981120+0000

I0212 12:36:50.953078       1 utils.go:350] ID: 35 GRPC call: /fence.FenceController/UnfenceClusterNetwork
I0212 12:36:50.953550       1 utils.go:351] ID: 35 GRPC request: {"cidrs":[{"cidr":"10.90.89.66/32"},{"cidr":"11.67.12.42/24"}],"parameters":{"clusterID":"rook-ceph"},"secrets":"***stripped***"}
I0212 12:36:51.206350       1 cephcmds.go:379] ID: 35 unblocked IP "10.90.89.66/32" successfully
I0212 12:36:52.210111       1 cephcmds.go:379] ID: 35 unblocked IP "11.67.12.42/24" successfully
I0212 12:36:52.211070       1 utils.go:357] ID: 35 GRPC response: {}

[root@c1 /]# ceph osd blocklist ls
listed 0 entries
```<hr>This is an automatic backport of pull request #6054 done by [Mergify](https://mergify.com).

Replace direct CLI command execution with go-ceph library APIs for
blocklist operations in AddCephBlocklist and RemoveCephBlocklist
functions.

Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 4eb84a0)
@mergify mergify bot mentioned this pull request Feb 13, 2026
6 tasks
@mergify mergify bot added the ok-to-test Label to trigger E2E tests label Feb 13, 2026
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.34

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.34

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.34

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.32

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.33

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.33

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.32

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.33

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.32

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants