Skip to content

mds: dump formatter even for errors#57673

Merged
batrick merged 6 commits intoceph:mainfrom
batrick:i66184
Jun 5, 2024
Merged

mds: dump formatter even for errors#57673
batrick merged 6 commits intoceph:mainfrom
batrick:i66184

Conversation

@batrick
Copy link
Member

@batrick batrick commented May 23, 2024

The admin_socket framework only dumps the formatter by default if the command succeeds.

Fixes: a4dc881
Fixes: https://tracker.ceph.com/issues/66184

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

@batrick batrick requested a review from leonid-s-usov May 23, 2024 17:37
@github-actions github-actions bot added the cephfs Ceph File System label May 23, 2024
@batrick batrick marked this pull request as draft May 23, 2024 17:43
@batrick
Copy link
Member Author

batrick commented May 23, 2024

asok_command always prepends and "ERROR" message so we just can't/shouldn't use it for QA testing (where the command may fail).

@batrick
Copy link
Member Author

batrick commented May 23, 2024

(still more to fix...)

@batrick batrick marked this pull request as ready for review May 23, 2024 17:48
@github-actions github-actions bot added the tests label May 23, 2024
Copy link
Contributor

@leonid-s-usov leonid-s-usov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that tell_command will assert for non-zero status. You should use check_status=False kwarg if you want to process the rc externally, the asok_command had it

Copy link
Contributor

@leonid-s-usov leonid-s-usov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@vshankar
Copy link
Contributor

jenkins retest this please

@batrick
Copy link
Member Author

batrick commented May 28, 2024

jenkins test api

@batrick
Copy link
Member Author

batrick commented May 28, 2024

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

@batrick
Copy link
Member Author

batrick commented May 28, 2024

jenkins test api

1 similar comment
@batrick
Copy link
Member Author

batrick commented May 30, 2024

jenkins test api

@batrick
Copy link
Member Author

batrick commented May 30, 2024

jenkins test make check

@batrick
Copy link
Member Author

batrick commented May 30, 2024

jenkins test make check arm64

@batrick
Copy link
Member Author

batrick commented Jun 4, 2024

jenkins test api

@batrick
Copy link
Member Author

batrick commented Jun 4, 2024

batrick added 6 commits June 4, 2024 15:44
And change second argument to std::string_view to have more flexible
conversions.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
The admin_socker framework only dumps the formatter by default if the command
succeeds.

Fixes: a4dc881
Fixes: https://tracker.ceph.com/issues/66184
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Existing convention is that "css" is short for CachedStackStringStream while
"ss" is stringstream.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
It's unpleasant to test for existence in json. Just dump an empty string if not present.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
As it's being used for error output.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
The asok interface will mangle stdout if the command actually fails.

The reason `flush path` is done via the asok interface is because the tell/asok
interfaces were unified after these tests were written and `flush path` was
only available via the asok interface.

Fixes: https://tracker.ceph.com/issues/66184
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@batrick
Copy link
Member Author

batrick commented Jun 4, 2024

Pulled vstart_runner change out as it was failing api tests. It's now at #57881

@batrick batrick merged commit dddc23d into ceph:main Jun 5, 2024
@batrick batrick deleted the i66184 branch June 5, 2024 00:49
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