Skip to content

Commit

Permalink
core: force delete rook-ceph-exporter pod
Browse files Browse the repository at this point in the history
Force delete rook-ceph-exporter pod that is stuck in terminating
state due to unavailability of node.

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit dd90ef5)
  • Loading branch information
sp98 committed Jul 31, 2023
1 parent b57f0c7 commit ff906e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/operator/ceph/cluster/cephstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ func (c *cephStatusChecker) getRookPodsOnNode(node string) ([]v1.Pod, error) {
"rook-ceph-mgr",
"rook-ceph-mds",
"rook-ceph-rgw",
"rook-ceph-exporter",
}
podsOnNode := []v1.Pod{}
listOpts := metav1.ListOptions{
Expand Down
3 changes: 2 additions & 1 deletion pkg/operator/ceph/cluster/cephstatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ func TestGetRookPodsOnNode(t *testing.T) {
{"app": "rook-ceph-rgw"},
{"app": "user-app"},
{"app": "rook-ceph-mon"},
{"app": "rook-ceph-exporter"},
}

pod := v1.Pod{
Expand Down Expand Up @@ -362,7 +363,7 @@ func TestGetRookPodsOnNode(t *testing.T) {
pods, err := c.getRookPodsOnNode("node0")
assert.NoError(t, err)
// A pod is having two matching labels and its returned only once
assert.Equal(t, 11, len(pods))
assert.Equal(t, 12, len(pods))

podNames := []string{}
for _, pod := range pods {
Expand Down

0 comments on commit ff906e9

Please sign in to comment.