Skip to content

mgr/mgr_util: improvements for RTimer#60008

Merged
rishabh-d-dave merged 2 commits intoceph:mainfrom
rishabh-d-dave:mgr-util-improve
Oct 18, 2024
Merged

mgr/mgr_util: improvements for RTimer#60008
rishabh-d-dave merged 2 commits intoceph:mainfrom
rishabh-d-dave:mgr-util-improve

Conversation

@rishabh-d-dave
Copy link
Contributor

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

In class RTimer in mgr_util.py, "self.finished.set()" is run even though
the event self.finished was set just now. If it wasn't set, the while
loop the precedes it would've never finished running. Therefore, remove
this redundant line of code.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave rishabh-d-dave force-pushed the mgr-util-improve branch 2 times, most recently from 195c74b to ce10ac0 Compare September 26, 2024 19:29
When an exception occurs in class RTimer of mgr_util.py, only the
exception message is logged but not only this is insufficient for
debugging but also it is hard to spot in logs. This should not be the
case, especially for an occurring exception. Therefore, add code to log
traceback and exception name as well along with exception's message.

Log entry before this patch -

2024-09-27T00:22:38.656+0530 7f05c7e006c0  0 [volumes ERROR mgr_util] task exception: dummy exception for testing

Log entry with this patch -

2024-09-27T00:40:26.509+0530 7f61d64006c0  0 [volumes ERROR mgr_util] exception encountered in RTimer instance "<RTimer(Thread-7, started daemon 140058183075520)>":
Traceback (most recent call last):
  File "/home/rishabh/repos/ceph/minor3/src/pybind/mgr/mgr_util.py", line 91, in run
    self.function(*self.args, **self.kwargs)
  File "/home/rishabh/repos/ceph/minor3/src/pybind/mgr/volumes/fs/stats_util.py", line 232, in _update_progress_bars
    raise RuntimeError('dummy exception for testing')
RuntimeError: dummy exception for testing

Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave
Copy link
Contributor Author

jenkins test windows

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@rishabh-d-dave
Copy link
Contributor Author

jenkins test windows

@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check arm64

@rishabh-d-dave rishabh-d-dave added the wip-rishabh-testing Rishabh's testing label label Oct 1, 2024
@rishabh-d-dave
Copy link
Contributor Author

This PR is under test in https://tracker.ceph.com/issues/68354.

@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check arm64

@rishabh-d-dave
Copy link
Contributor Author

@rishabh-d-dave rishabh-d-dave merged commit 4546b09 into ceph:main Oct 18, 2024
@rishabh-d-dave rishabh-d-dave deleted the mgr-util-improve branch October 18, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants