Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/MDSMonitor: use stringstream instead of dout for mds repaired #28683

Merged
merged 1 commit into from
Jul 13, 2019

Conversation

david-z
Copy link
Member

@david-z david-z commented Jun 21, 2019

Fixes: http://tracker.ceph.com/issues/40472

Signed-off-by: Zhi Zhang zhangz.david@outlook.com

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

@david-z david-z requested a review from batrick June 21, 2019 03:36
@david-z david-z added the cephfs Ceph File System label Jun 21, 2019
} else {
dout(1) << "repaired: no-op on rank " << role << dendl;
ss << "repaired: no-op on rank " << role;
Copy link
Member

Choose a reason for hiding this comment

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

If both this is essentially a no-op, it's basically the same as saying it was modified from the user's point of view. I don't think it's useful to return to the user the fact that it is a no-op, even if it's useful to log it.

I'd just push the return message to ss regardless of the branch, and log each branch's message to dout nonetheless.

Copy link
Member

Choose a reason for hiding this comment

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

If both this is essentially a no-op, it's basically the same as saying it was modified from the user's point of view. I don't think it's useful to return to the user the fact that it is a no-op, even if it's useful to log it.

These messages across the MDSMonitor tend to err on the side of overly helpful (or absent 😦). I think it's okay to give helpful information (that the rank is not damaged).

With that said, "no-op" is not the right message, let's use:

ss << "nothing to do: rank is not damaged";

I'd just push the return message to ss regardless of the branch, and log each branch's message to dout nonetheless.

We don't do that for any other message so I don't see a reason to start. These commands are already logged.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that's fine with me. The 'no-op' was the bit that really seemed off; especially because no-ops in the monitor tend to be assumed as an idempotent operation of whatever we're trying to achieve. If not being damaged is the information we want actually want to relay, then 👍

@david-z
Copy link
Member Author

david-z commented Jun 26, 2019

@batrick Pls review the latest changes, thanks.

@tchaikov
Copy link
Contributor

tchaikov commented Jul 5, 2019

@batrick shall we run this through a cephfs qa suite?

@batrick
Copy link
Member

batrick commented Jul 5, 2019

@batrick shall we run this through a cephfs qa suite?

Sure. Will do!

@batrick batrick merged commit 7ad76ea into ceph:master Jul 13, 2019
batrick added a commit that referenced this pull request Jul 13, 2019
* refs/pull/28683/head:
	mon/MDSMonitor: use stringstream instead of dout for mds repaired

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
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.

4 participants