Project

General

Profile

Mds - dumpability » History » Version 1

Jessica Mack, 05/28/2015 06:03 PM

1 1 Jessica Mack
h1. Mds - dumpability
2
3
h3. Task Name: 
4
5
mds: dumpability
6
7
h3. Size: 
8
9
M
10
11
h3. Skill: 
12
13
beginner
14
15
h3. Mentor(s):
16
17
"Sage Weil":mailto:sage@inktank.com
18
 
19
h3. Components: 
20
21
mds, common/Formatter
22
23
h3. Description:
24
25
A 'dumpcache <filename>' command will dump all inodes, dentries, and dirs to a file using the operator<<() methods.  This is a good start, but only captures what is exposed by those methods--not all structure fields.
26
All encodable objects (that go to disk or over the wire) include a dump(Formatter*) method that will generate structured json (or xml etc) output for debugging.  The in-memory only structures (like CInode, CDentry, CDir) don't have these (yet).
27
The admin socket infrastructure lets you query a running daemon from the command line (e.g., 'ceph daemon mds.a <command.') and get the output.  It is fully buffered (entire result is built in memory, then written to the output).
28
The Formatter class has JSON and XML implementations.  It is fully buffered (entire output is generated in memory, then written to the output socket).
29
 
30
We should add dump() methods to all important in-memory structures, including:
31
* CInode
32
* CDir
33
* CDentry
34
* Capability
35
36
Any dump should be recursive (i.e., dumping the inode will also dump the capabilities).  It should not following links, thoguh (dumping a dir shouldn't dump all dentries and inodes.... or should it?)
37
38
We should also capture other improtant state, like:
39
* MDRequest / Mutation
40
* Session
41
* LogSegments
42
43
Then we wire them up to admin/dev comamnds to dump cache and other in-memory state.
44
 
45
46
h3. External Documentation:
47
48
h4. Coding tasks
49
50
# mds: add dump methods to CInode, CDir, CDentry, Capability
51
# mds: add dump methods to Session, MDRequest, LogSegment
52
# admin socket dump commands
53
# tell dump commands (dump to a file)
54