Skip to content

Commit

Permalink
Skip ceph-file-controller-detect-version pod check in test_add_capaci…
Browse files Browse the repository at this point in the history
…ty[10] (red-hat-storage#10749)


Signed-off-by: am-agrawa <[email protected]>
  • Loading branch information
am-agrawa authored Nov 18, 2024
1 parent a335bc6 commit 49f867c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ocs_ci/ocs/resources/pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -2333,11 +2333,15 @@ def get_pod_restarts_count(
restart_dict = {}
ocp_pod_obj = OCP(kind=constants.POD, namespace=namespace)
for p in list_of_pods:
# we don't want to compare osd-prepare and canary pods as they get created freshly when an osd need to be added.
if (
"rook-ceph-osd-prepare" not in p.name
and "rook-ceph-drain-canary" not in p.name
):
# we don't want to compare osd-prepare and canary pods as they get
# created freshly when an osd need to be added. Also skip check on ceph-file-controller-detect-version
# as it's a temp. pod.
exclude_names = (
"rook-ceph-osd-prepare",
"rook-ceph-drain-canary",
"ceph-file-controller-detect-version",
)
if all(exclude_name not in p.name for exclude_name in exclude_names):
pod_count = ocp_pod_obj.get_resource(p.name, "RESTARTS")
restart_dict[p.name] = int(pod_count.split()[0])
logger.info(f"get_pod_restarts_count: restarts dict = {restart_dict}")
Expand Down

0 comments on commit 49f867c

Please sign in to comment.