Skip to content

mgr/dashboard: Fix dashboard api tests in teuthology - #65868

Closed
afreen23 wants to merge 1 commit into
ceph:mainfrom
afreen23:fix-module-enable-tests
Closed

afreen23 wants to merge 1 commit into
ceph:mainfrom
afreen23:fix-module-enable-tests

Conversation

@afreen23

@afreen23 afreen23 commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Fixes https://tracker.ceph.com/issues/70669

This issue happens when iostat module enabled -> mgr respawned -> dashboard restart (attempts to bind to 8443) -> Port 8443 unavailable -> and API cant access. This is a race condition between process restart and OS port release. It is worsened by rapid restarts, slow cleanup on shared/flaky test hosts like Teuthology, It's not an inherent server bug or misbehavior in the dashboard service. This failure is a test/lifecycle/environment flake.

We need to find a suitable time window here, probably increasing the time to wait for mgr re-initialization and port to be assigned to dashboard.

Increasing timeouts and removing nested retry mechanisms to properly debug and trace tests.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Oct 10, 2025
@afreen23

Copy link
Copy Markdown
Contributor Author

from tests:

2025-10-13T22:52:14.881 INFO:tasks.cephfs_test_runner:test_list_enabled_module (tasks.mgr.dashboard.test_mgr_module.MgrModuleTest) ... ERROR
2025-10-13T22:52:14.881 INFO:tasks.cephfs_test_runner:
2025-10-13T22:52:14.882 INFO:tasks.cephfs_test_runner:======================================================================
2025-10-13T22:52:14.882 INFO:tasks.cephfs_test_runner:ERROR: test_list_enabled_module (tasks.mgr.dashboard.test_mgr_module.MgrModuleTest)
2025-10-13T22:52:14.882 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2025-10-13T22:52:14.882 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2025-10-13T22:52:14.882 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_1ba73ed5cfae95603b5b9a451c6a7ed26fc9a8f0/qa/tasks/mgr/dashboard/test_mgr_module.py", line 78, in test_list_enabled_module
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:    self.wait_until_true(_is_iostat_enabled, timeout=30)
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_1ba73ed5cfae95603b5b9a451c6a7ed26fc9a8f0/qa/tasks/ceph_test_case.py", line 339, in wait_until_true
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:    raise TestTimeoutError("Timed out after {0}s and {1} retries".format(elapsed, retry_count))
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:tasks.ceph_test_case.TestTimeoutError: Timed out after 30s and 0 retries
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:Ran 90 tests in 1556.095s
2025-10-13T22:52:14.883 INFO:tasks.cephfs_test_runner:
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:FAILED (errors=1, skipped=1)
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:======================================================================
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:ERROR: test_list_enabled_module (tasks.mgr.dashboard.test_mgr_module.MgrModuleTest)
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_1ba73ed5cfae95603b5b9a451c6a7ed26fc9a8f0/qa/tasks/mgr/dashboard/test_mgr_module.py", line 78, in test_list_enabled_module
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:    self.wait_until_true(_is_iostat_enabled, timeout=30)
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/github.com_ceph_ceph-c_1ba73ed5cfae95603b5b9a451c6a7ed26fc9a8f0/qa/tasks/ceph_test_case.py", line 339, in wait_until_true
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:    raise TestTimeoutError("Timed out after {0}s and {1} retries".format(elapsed, retry_count))
2025-10-13T22:52:14.884 INFO:tasks.cephfs_test_runner:tasks.ceph_test_case.TestTimeoutError: Timed out after 30s and 0 retries
2025-10-13T22:52:14.885 INFO:tasks.cephfs_test_runner:
2025-10-13T22:52:14.885 ERROR:teuthology.run_tasks:Saw exception from tasks.
Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_teuthology_78c036dc9ad59cb33807dc7f21fda50de2f348d2/teuthology/run_tasks.py", line 112, in run_tasks
    manager.__enter__()
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/teuthworker/src/github.com_ceph_ceph-c_1ba73ed5cfae95603b5b9a451c6a7ed26fc9a8f0/qa/tasks/cephfs_test_runner.py", line 211, in task
    raise RuntimeError("Test failure: {0}".format(", ".join(bad_tests)))
RuntimeError: Test failure: test_list_enabled_module (tasks.mgr.dashboard.test_mgr_module.MgrModuleTest)
2025-10-13T22:52:15.127 ERROR:teuthology.util.sentry: Sentry event: https://sentry.ceph.com/organizations/ceph/?query=b7c59cd7e3c34ffea4780725a5adbaa9
Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_teuthology_78c036dc9ad59cb33807dc7f21fda50de2f348d2/teuthology/run_tasks.py", line 112, in run_tasks
    manager.__enter__()
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/teuthworker/src/github.com_ceph_ceph-c_1ba73ed5cfae95603b5b9a451c6a7ed26fc9a8f0/qa/tasks/cephfs_test_runner.py", line 211, in task
    raise RuntimeError("Test failure: {0}".format(", ".join(bad_tests)))
RuntimeError: Test failure: test_list_enabled_module (tasks.mgr.dashboard.test_mgr_module.MgrModuleTest)
2025-10-13T22:52:15.128 DEBUG:teuthology.run_tasks:Unwinding manager cephfs_test_runner
2025-10-13T22:52:15.138 DEBUG:teuthology.run_tasks:Unwinding manager rgw
2025-10-13T22:52:15.187 DEBUG:tasks.rgw.client.0:waiting for process to exit
2025-10-13T22:52:15.187 INFO:teuthology.orchestra.run:waiting for 300
2025-10-13T22:52:15.191 INFO:tasks.rgw.client.0.smithi128.stdout:2025-10-13T22:52:15.187+0000 7fd365373640 -1 received  signal: Terminated from /usr/bin/python3 /bin/daemon-helper term radosgw --rgw-frontends beast port=80 -n client.0 --cluster ceph -k /etc/ceph/ceph.client.0.keyring --log-file /var/log/ceph/rgw.ceph.client.0.log --rgw_ops_log_socket_path /home/ubuntu/cephtest/rgw.opslog.ceph.client.0.sock --foreground  (PID: 40515) UID: 0
2025-10-13T22:52:15.191 INFO:tasks.rgw.client.0.smithi128.stdout:2025-10-13T22:52:15.187+0000 7fd36b014980 -1 shutting down
2025-10-13T22:52:20.268 INFO:tasks.daemonwatchdog.daemon_watchdog:daemon ceph.rgw.client.0 is failed for ~0s
2025-10-13T22:52:21.294 INFO:tasks.rgw.client.0:Stopped
2025-10-13T22:52:21.295 DEBUG:teuthology.orchestra.run.sm

Fixes https://tracker.ceph.com/issues/70669

This issue happens when iostat module enabled -> mgr respawned -> dashboard restart (attempts to bind to 8443) -> Port 8443 unavailable -> and API cant access.
This is a race condition between process restart and OS port release. It is worsened by rapid restarts, slow cleanup on shared/flaky test hosts like Teuthology,
It's not an inherent server bug or misbehavior in the dashboard service. This failure is a test/lifecycle/environment flake.

We need to find a suitable time window here, probably increasing the time to wait for mgr re-initialization and port to be assigned to dashboard.

Increasing timeouts and removing nested retry mechanisms to properly debug and trace tests.

Signed-off-by: Afreen Misbah <[email protected]>
@lee-j-sanders

Copy link
Copy Markdown
Member

@ljflores

Copy link
Copy Markdown
Member

@afreen23 @nizamial09 feel free to merge if you deem it okay. This has passed teuthology testing, but I see that the two dashboard CI checks are failing, so I'll leave the decision to you.

@afreen23

afreen23 commented Nov 24, 2025 •

Copy link
Copy Markdown
Contributor Author

@afreen23 @nizamial09 feel free to merge if you deem it okay. This has passed teuthology testing, but I see that the two dashboard CI checks are failing, so I'll leave the decision to you.

Hi @ljflores , the issue is still there I can see in test results. I need to circle around this, but this was pushed out. I will take it next sprint (next week)

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Jan 23, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Feb 22, 2026
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants