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

osd: fix OpRequest and tracked op dump information #16504

Merged
merged 2 commits into from Jul 24, 2017

Conversation

Projects
None yet
4 participants
@Yan-waller
Copy link
Contributor

Yan-waller commented Jul 22, 2017

if we use command ceph daemon osd.# dump_historic_ops to check the history tracked ops, the client_addr is always dumped as - which result in clients indistinguishable from each other.

"description": "osd_op(client.24123.0:328 3.36 3:6ec0d61b:::rbd_data.10472ae8944a.0000000000000289:head [write 4141056~4096 [fadvise_seque
ntial]] snapc 0=[] ondisk+write+known_if_redirected e36)",
            "initiated_at": "2017-07-22 14:24:25.925633",
            "age": 4.893190,
            "duration": 0.272642,
            "type_data": {
                "flag_point": "commit sent; apply or cleanup",
                "client_info": {
                    "client": "client.24123",
                    "client_addr": "-",
                    "tid": 328
                },

It is because connection was reset to nullptr in function _unregistered before the op has been inserted into history, so the get_orig_source_addr always return an empty entity addr.

Signed-off-by: Yan Jun yan.jun8@zte.com.cn

Yan-waller added some commits Jul 22, 2017

common: dump field name of 'flag_point' and 'client_info'
we used to open "type_data" section as a array (that's open_array_section),
some key field names can not be dumped out. use open_object_section to dump them
as following:

before this change:
------------------
"description": "osd_op(client.4202.0:4958 3.28 3:163e8348:::rbd_data.10472ae8944a.0000000000000164:head [write 1691648~4096 [fadvise_sequential]] snapc 0=[] ondisk+write+known_if_redirected e24)",
            "initiated_at": "2017-07-22 14:22:13.469324",
            "age": 17.595664,
            "duration": 0.460406,
            "type_data": [
                "commit sent; apply or cleanup",
                {
                    "client": "client.4202",
                    "client_addr": "-",
                    "tid": 4958
                },
-----------------
after:
-----------------
"description": "osd_op(client.24123.0:328 3.36 3:6ec0d61b:::rbd_data.10472ae8944a.0000000000000289:head [write 4141056~4096 [fadvise_sequential]] snapc 0=[] ondisk+write+known_if_redirected e36)",
            "initiated_at": "2017-07-22 14:24:25.925633",
            "age": 4.893190,
            "duration": 0.272642,
            "type_data": {
                "flag_point": "commit sent; apply or cleanup",
                "client_info": {
                    "client": "client.24123",
                    "client_addr": "-",
                    "tid": 328
                },
----------------

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
osd: store op request source info
if we use command 'ceph daemon osd.# dump_historic_ops' to check the history
 tracked ops, the 'client_addr' is always dumped as '-' which result in clients
indistinguishable from each other.

"description": "osd_op(client.24123.0:328 3.36 3:6ec0d61b:::rbd_data.10472ae8944a.0000000000000289:head [write 4141056~4096 [fadvise_sequential]] snapc 0=[] ondisk+write+known_if_redirected e36)",
            "initiated_at": "2017-07-22 14:24:25.925633",
            "age": 4.893190,
            "duration": 0.272642,
            "type_data": {
                "flag_point": "commit sent; apply or cleanup",
                "client_info": {
                    "client": "client.24123",
                    "client_addr": "-",
                    "tid": 328
                },

It is because 'connection' was reset to nullptr in function '_unregistered'
before op has been inserted into history, so the 'get_source_addr' always return
empty entity addr.

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
@xiexingguo

This comment has been minimized.

Copy link
Member

xiexingguo commented Jul 22, 2017

good patch:-)

@scienceluo

This comment has been minimized.

Copy link
Contributor

scienceluo commented Jul 22, 2017

Jenkins retest this please

@xiexingguo xiexingguo added this to the luminous milestone Jul 24, 2017

@xiexingguo

This comment has been minimized.

Copy link
Member

xiexingguo commented Jul 24, 2017

retest this please

@liewegas liewegas merged commit 5a422d7 into ceph:master Jul 24, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.