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

common/LogEntry: include EntityName in log entries #15395

Merged
merged 6 commits into from Jun 2, 2017

Conversation

Projects
None yet
2 participants
@liewegas
Member

liewegas commented May 31, 2017

See the entity logger authenticated as (mon.$hostname, client.foo, mgr.$hostname) instead
of the entity_name_t (client.4122, mon.0). This is particularly helpful for librbd
users and for ceph-mgr, which otherwise appears as client.NNN in the logs.

liewegas added some commits May 31, 2017

common/LogEntry: include EntityName in log entries
We want the auth name (mon.hostname), not the entity_name_t (mon.0) to
appear in the log messages.  In particular this is helpful for the mgr,
which will now appear as mgr.hostname instead of client.1234.

Signed-off-by: Sage Weil <sage@redhat.com>
librados: use EntityName in monitor_log line
Signed-off-by: Sage Weil <sage@redhat.com>
common/entity_name: do not populate type_id string for type==0
The EntityName ctor leaves type == 0.  If we encode and
then decode that value, we end up calling set(), which
tries (and fails) to populate the type_id string, leaving
you with an instance that renders as 'unknown.' instead
of ''.

Signed-off-by: Sage Weil <sage@redhat.com>
pybind/rados: add monitor_log2
Signed-off-by: Sage Weil <sage@redhat.com>
librados: add rados_monitor_log2 that includes EntityName
Signed-off-by: Sage Weil <sage@redhat.com>

@liewegas liewegas added the common label May 31, 2017

@liewegas liewegas requested a review from tchaikov May 31, 2017

@@ -342,6 +343,11 @@ const entity_inst_t& LogClient::get_myinst()
return messenger->get_myinst();
}
const EntityName& LogClient::get_myname()

This comment has been minimized.

@tchaikov

tchaikov Jun 1, 2017

Contributor

could be a const method.

@liewegas liewegas added the needs-qa label Jun 1, 2017

@liewegas

This comment has been minimized.

Member

liewegas commented Jun 1, 2017

retest this please

1 similar comment
@liewegas

This comment has been minimized.

Member

liewegas commented Jun 1, 2017

retest this please

@liewegas

This comment has been minimized.

Member

liewegas commented Jun 1, 2017

retest this please

qa/workunits/cephtool/test.sh: adjust watch test
Signed-off-by: Sage Weil <sage@redhat.com>

@liewegas liewegas merged commit 6bedb4c into ceph:master Jun 2, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@liewegas liewegas deleted the liewegas:wip-log-entity branch Jun 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment