Commit Graph

33575 Commits

Author SHA1 Message Date
John Spray
f7e9ff174f tools: Create cephfs-journal-tool
This is for debugging/repairing CephFS journals.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
John Spray
fb8f469886 mds: add getter for ESession.client_inst
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
730a0115bc mds: Add getter for EMetablob.client_name
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
220f9c96a3 mds: Add EMetaBlob::get_dentries
For tools that would like to know which dentries are
touched by a metablob, without understanding its
internal format.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
f4927f00a4 mds: switch __u32 with LogEvent::EventType typedef
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
c1b185bde8 mds: Add LogEvent::str_to_type
For cephfs-journal-tool to resolve user input to a EVENT_* constant

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
e7f4b9e22f mds: Fix Dumper::undump (missing lock)
Two problems were causing undump to fail:
* Objecter lock was not being taken around call to
  .write() and .write_full() calls, causing assertion.
* Once that is fixed, it is necessary to use a separate,
  local lock to protect the completion condition for
  write operations

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
96720b6dcb mds: Add EMetaBlob::get_inodes
Used for filtering in journal tool

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
b3e57ba588 mds: Publicize some EMetaBlob members
This makes them accessible for JournalTool.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
2282739b74 mds: Refactor CINode encoding into CInodeStore
CInode itself combined the on-disk format and
encode/decode logic with lots of other complex
behaviours.  This separates the simple parts
out so that they can be used by other tools that
are interested in looking at inodes outside of
a running MDS.

There is a small overhead because CInodeStore
can't decode a SnapRealm inline, so it keeps
a temporary copy of the encoded bufferlist.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
bf7b84c951 mds: Add get_metablob to LogEvent
Previously the only way to get at the payload
of things like EUpdate and EOpen was to replay() them
(required a full running MDS) or to use downcasting
(yuck).

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
e56b88fe13 mds: Add ENoOp for padding journals
This allows us to implement journal splicing
without moving blocks around, and without modifying
the outer journal syntax.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:29 +01:00
John Spray
74ac6e4e1b mds: Add get_paths method to EMetaBlob
Used by cephfs-journal-tool to filter events
by path fragment.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:28 +01:00
John Spray
3fa825c9ed osdc: Revise Journaler format
* Separate journal encoding/envelope format
  code (JournalStream) from I/O code (Journaler)
* Add new sentinel and start_ptr fields to
  prefix and suffix of log events.
* Add journal encoding version to journal header

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:28 +01:00
John Spray
928d0f58d2 mds: Fix typo 'Sesion'
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:28 +01:00
John Spray
e3a9f66970 objecter: Don't warn on multiple admin sockets
Suppress messages about failure to register admin sockets
if they are EEXIST, because this is a case that can occur
naturally if multiple objecter/librados clients are instantiated
within the same process.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:28 +01:00
John Spray
d4a250ca79 common: Add write_stream(ostream) to bufferlist
Enable C++ style file I/O when writing binary output
from bufferlists.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:28 +01:00
John Spray
5b20debdcc mds: Add LogEvent::get_type_str()
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-18 11:21:28 +01:00
Yan, Zheng
991f7f15a6 Merge pull request #1821 from ceph/mds-optracker-fixes
mds: fix Server::submit_mdlog_entry()
2014-05-18 13:42:51 +08:00
Yan, Zheng
57c89bf814 mds: fix Server::submit_mdlog_entry()
mdr can be NULL when rolling back slave update

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-18 13:38:32 +08:00
Gregory Farnum
5ace4d1af7 Merge pull request #1809 from ceph/wip-4354-mds-optracker
MDS OpTracker

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-16 15:17:00 -07:00
Greg Farnum
ee92a39bce MDS: add admin socket cleanup on shutdown
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-16 15:15:55 -07:00
Ilya Dryomov
7a1538187f Merge pull request #1817 from ceph/wip-osdmon-pa-wait
OSDMonitor: set next commit in mon primary-affinity reply

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-16 20:37:05 +04:00
Ilya Dryomov
a78b14ec17 OSDMonitor: set next commit in mon primary-affinity reply
Commit 8c5c55c8b4 ("mon: set next commit in mon command replies")
fixed MMonCommand replies to include the right version, but the
primary-affinity handler was authored before that.  Fix it.

Backport: firefly
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-05-16 20:25:36 +04:00
Gregory Farnum
a877d12f0e Merge pull request #1816 from onlyjob/docs
sample.ceph.conf: minor update

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-05-16 07:08:53 -07:00
Dmitry Smirnov
6dfc544e5a sample.ceph.conf: minor update
* Moved filestore settings above [osd.*] declarations otherwise
   (if uncommented) those settings might be applied only to last
   OSD which is not very obvious.
 * Few options added.
2014-05-16 20:30:29 +10:00
Greg Farnum
405063b16e workunits: provide some output in the dirfrag.sh test
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-14 14:20:19 -07:00
Gregory Farnum
fe19a1dba6 Merge pull request #1803 from onlyjob/java-gcj
Java GCJ fixes

Reviewed-by: Greg Farnum <greg@inktank.com>
Acked-by: Noah Watkins <noahwatkins@gmail.com>
2014-05-14 13:24:20 -07:00
Samuel Just
e6e3cec313 Merge pull request #1806 from ceph/wip-8011
ReplicatedPG: block scrub on blocked object contexts

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-14 12:12:44 -07:00
John Wilkins
ab907c5abc doc: Clarified Debian uses sysvinit.
Fixes: #7182

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-14 00:23:22 -07:00
John Wilkins
c71c292123 doc: Added rgw print continue guidance.
Fixes: #7731

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-14 00:14:30 -07:00
John Wilkins
b082fd68b6 doc: Minor edit.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-14 00:13:41 -07:00
John Wilkins
ca833bd543 doc: Added clarifying text to CRUSH add command.
Fixes: #8322

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-14 00:02:09 -07:00
John Wilkins
48337e0c7b doc: Omitted glance_api_version=2 to fix creating images from volumes.
Fixes: #8347
2014-05-13 23:20:36 -07:00
John Wilkins
17930a1e86 doc: Changed example to use virtio and put key usage into one line.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-05-13 23:18:50 -07:00
Sage Weil
c7540cb6aa Merge pull request #1802 from ceph/wip-mds-misc
Wip mds misc

Reviewed-by: Sage Weil <sage@inktank.com>
2014-05-13 18:46:12 -07:00
Sage Weil
b4b128b263 Merge pull request #1810 from ceph/wip-fedora
doc: update instructions for RPM distros
2014-05-13 18:11:11 -07:00
Wido den Hollander
8dd1190dd5 Improve Bash completion for various tools 2014-05-13 23:48:53 +02:00
Greg Farnum
00225d739c test: fix some templates to match new output code
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-13 13:38:22 -07:00
John Spray
20aad8ff93 doc: update instructions for RPM distros
Fix RPM building instructions: this has been broken since
libs3 was included inline in the ceph repo as a submodule.
"rpmbuild -tb" was concatenating the ceph.spec and
libs3.spec files, resulting in something that didn't work.

Also, the instructions suggested downloading a .tar.gz file
whereas the specfile requires a .tar.bz2 file.

Also, add a convenient yum command line for getting the compile
dependencies on Fedora 20.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-13 19:22:43 +01:00
Greg Farnum
04c280e7c1 Merge remote-tracking branch 'origin/master' into wip-4354-mds-optracker
Conflicts:
	src/mds/Locker.cc
	src/osd/OpRequest.cc
	src/osd/OpRequest.h

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-13 10:54:12 -07:00
Yan, Zheng
26151ec62f mds: lower IO priority of storing backtrace
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-13 13:52:31 +08:00
Gregory Farnum
bfce3d4fac Merge pull request #1771 from ceph/wip-5021
Wip 5021

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-05-12 21:39:53 -07:00
Yan, Zheng
20814de9e9 Merge pull request #1807 from ceph/wip-mds-flock
mds: reduce verbosity of handle_client_file_{readlock,setlock}
2014-05-13 09:31:00 +08:00
Yan, Zheng
019483fdaa mds: reduce verbosity of handle_client_file_{readlock,setlock}
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-05-13 09:29:47 +08:00
Greg Farnum
ca313c20be mds: add a Server::submit_mdlog_entry() to provide event marking
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 18:27:42 -07:00
Samuel Just
7411477153 ReplicatedPG: block scrub on blocked object contexts
Fixes: #8011
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-05-12 15:31:11 -07:00
Samuel Just
c32c56b739 Merge pull request #1779 from ceph/wip-7553
Wip 7553

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-05-12 15:29:39 -07:00
Greg Farnum
ca91743003 Locker: mark_event in acquire_locks() when blocking or succeeding
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:44:14 -07:00
Greg Farnum
2df68b6b73 Server: mark events when journaling and replying
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-05-12 14:44:14 -07:00