Skip to content

common/io_exerciser: Modify is_locked_by_me call in ceph_test_rados_io_sequence - #60211

Merged
cbodley merged 1 commit into
ceph:mainfrom
JonBailey1993:JonBailey1993/ceph_test_rados_io_sequence_lock_fix
Oct 9, 2024
Merged

cbodley merged 1 commit into
ceph:mainfrom
JonBailey1993:JonBailey1993/ceph_test_rados_io_sequence_lock_fix

Conversation

@JonBailey1993

Copy link
Copy Markdown
Contributor

Fixes issue introduced in #59857 (54e0865)

is_locked_by_me() is a function of ceph::mutex which is only used in debug builds. By using the ceph_mutex_is_locked_by_me macro, we can neatly make sure we only run this function in debug mode, allowing compilation to no longer fail due to missing ceph::mutex specific functions when running in release mode.

Signed-off-by: JonBailey1993 [email protected]

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

…o_sequence

is_locked_by_me() is a function of ceph::mutex which is only used in debug builds. By using the ceph_mutex_is_locked_by_me macro, we can neatly make sure we only run this function in debug mode, allowing compilation to no longer be affected when running in release mode.

Signed-off-by: Jon Bailey <[email protected]>
@github-actions github-actions Bot added the common label Oct 9, 2024
@JonBailey1993

Copy link
Copy Markdown
Contributor Author

ceph API tests failed

Traceback (most recent call last): File "/home/jenkins-build/build/workspace/ceph-api/build/../qa/tasks/vstart_runner.py", line 1610, in <module> exec_test() File "/home/jenkins-build/build/workspace/ceph-api/build/../qa/tasks/vstart_runner.py", line 1453, in exec_test LocalCephCluster(LocalContext()).mon_manager.wait_for_all_osds_up(timeout=30) File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/ceph_manager.py", line 2902, in wait_for_all_osds_up assert time.time() - start < timeout, \ AssertionError: timeout expired in wait_for_all_osds_up

Given that this is a single line fix in a file that does not get included in the OSD compilation, I am going to retrigger the test.

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test api

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ronen-fr

ronen-fr commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

As this blocks CI builds - should be merged, I think, as soon as the gating checks are OK.

@cbodley

cbodley commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

i pushed to ceph-ci to verify the builds. 'make check' only builds what's needed for unit tests, so doesn't cover ceph_test_* targets

pending in https://shaman.ceph.com/builds/ceph/pr-60211/

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@jmundack

jmundack commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

@JonBailey1993 - do you have a thoughts/ideas on how we can improve the CI pipelines so that this would have been caught in the original PR?

@cbodley
cbodley merged commit e48735c into ceph:main Oct 9, 2024
@JonBailey1993

Copy link
Copy Markdown
Contributor Author

@jmundack This issue was only found when a build was done in release mode, so we could have change the CI so it runs its make checks in debug and release - that would be very expensive though. Maybe just sometimes chooses between the two if we want to increase coverage and lower the risk a bit of this happening again without doubling the machine power needed.

In addition, cbodley mentioned above that ceph_test_* targets are not built during the make checks CI pipeline, so the above would not be enough to prevent the build break that occurred here. Maybe we need an additional pipeline to just do a release build and ensure it compiles - that's a lot of machine time though just to do a single check.

Alternatively, rather than increasing the machine time required for testing CI testing every PR, we could modify functions that only exist in debug mode to make it clear that they will compile in debug only, for example, ceph::Mutex::is_locked_by_me() could be named ceph::Mutex::is_locked_by_me_debug_only() in this case - or maybe a better solution would be to make things like that a private method to the class, so that the interface I used above is a requirement if you want to call the function. That would mean its not possible to call a method that doesn't exist in release mode as the interface (in this case a MACRO) substitutes an appropriate value, preferably at compile time, when used.

The other issue I fixed was in #60186. This caused by two PRs going in at the same time where one used a function and the other changed the function parameters, which unless we serialise the PR process, massively slowing it down, cannot be completely fixed I believe. Things like making CI tests and hardware more stable and faster would reduce the window between submitting PRs and merging them which would make this issue less likely to be hit as PRs would be more likely to be closer to the head of main when they are submitted due to not having to wait as long before hitting the merge pull request button, but my thinking is there is no way to eliminate this second issue entirely.

It was my first PR for Ceph that caused these issues (sorry), so I'm not sure how feasible any of these thoughts are but hopefully there's some useful nuggets in my response.

For myself, for the time being I think I need to make use of Ceph-CI and learn more about it, as it looks like this has better coverage of distros, architectures and build types so should give me a bit more coverage before submitting changes in the future.

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.

6 participants