Commit Graph

37035 Commits

Author SHA1 Message Date
Greg Farnum
515ab2d587 MDCache: add a scrub_dentry() function, and wire it up to the admin socket
scrub_dentry() is passed a string path, and it validates it before replying. We
hook up an admin socket command "scrub_path" to call it and dump the output.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:42:14 -08:00
Greg Farnum
fa75434faf MDS: CInode: implement validated_data::dump()
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 12:41:51 -08:00
Greg Farnum
0d6f8b659f MDS: CInode::validate_disk_state()
Add a function that will validate the on-disk state of the CInode. We currently
check that the on-disk backtrace matches (or is older) and compare rstats on
dirfrags against the parent dir's inode (for directories only).

TODO: validate that the on-disk Inode object matches what the parent
directory holds.

It's using a sort-of new programming model, trying to stuff stack data into
a Continuation object and write everything sequentially instead of having
a function and Context per IO.

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: John Spray <john.spray@redhat.com>
2014-11-07 11:48:44 -08:00
Greg Farnum
153aa2027b Rebase: MDS: Add an MDSContinuation for ease of use
Unlike the regular Continuation, this one works in terms of an MDRequest
and has wrappers to provide Context callbacks that are either
internal MDS or IO appropriate.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2014-11-07 11:48:44 -08:00
Greg Farnum
a7020dd1c2 Continuation: Add a new Continuation class.
Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: John Spray <john.spray@redhat.com>

SQUASH "Continuation: Add a new Continuation class."
2014-11-07 11:48:43 -08:00
Greg Farnum
c575d16290 MDCache: create_unlinked_system_inode() as the guts of create_system_inode()
This way we can create duplicate CInodes without actually linking them
into the cache. It'll be helpful for comparing different versions of
disk states and in-memory state, etc.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
9441283f03 MDS: MDRequestImpl: provide filepath/filepath2 substitute for MClientRequest
Use this passthru in the Server path locking functions so that we can get
locks or auth pins without an associated MClientRequest.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
adee21bfa3 MDRequest: dump internal op names as well as IDs
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
05d2444d73 MDCache: remove #if 0'd code
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
f8db040c46 mdstypes: add a same_sums() function to nest_info_t
operator== is checking equality of the version as well, but I want
something I can use to check that the internal sums match. This is useful
for eg comparing the sums of a set of dirfrags to the tally stored in
the inode.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:43 -08:00
Greg Farnum
af4bddd54d test/mds: unit tests for the inode_backtrace_t and inode_t compare() functions
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
4743f28b26 mdstypes: write inode_t::compare() function
This compares one inode_t against another, seeing which version is newer
and checking that differences in the data members make sense given that.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
7795a4e113 MDS: add operator==() and compare() for inode_backtrace_t
The compare() function checks one backtrace against another and indicates
if they're equivalent (or divergent!) and the relative freshness.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
aed1498922 MDS: CInode: add a fetch_backtrace() utility function
Expose MDCache::fetch_backtrace and call it from the CInode context.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:42 -08:00
Greg Farnum
80fac9e627 mds: add an MDSInternalContextWrapper and MDSIOContextWrapper
These let us wrap generic function tooling up inside of the appropriate
type-checking, and verify we haven't done anything too stupid.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-11-07 11:48:00 -08:00
John Spray
dc307ac260 tools: persist trimmed_pos in journal dump
...rather than inferring something from expire_pos
that could leave trash behind in the range between
the original trimmed_pos and expire_pos.

Be backward compatible with old journal dumps
so that if someone is updating for other reasons
like getting better tools, they can still import
their journal.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-11-07 11:53:21 +00:00
John Spray
fb29e71f9a tools: fix MDS journal import
Previously it only worked on fresh filesystems which
hadn't been trimmed yet, and resulted in an invalid
trimmed_pos when expire_pos wasn't on an object
boundary.

Fixes: #10025

Signed-off-by: John Spray <john.spray@redhat.com>
2014-11-07 11:34:43 +00:00
Gregory Farnum
6977d02f0d Merge pull request #2870 from ceph/wip-blacklist-respawn
osdc: fix Journaler write error handling

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2014-11-06 21:55:21 -08:00
Gregory Farnum
574c1d4bad Merge pull request #2853 from ceph/wip-9977
tools: skip up to expire_pos in journal-tool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2014-11-06 21:46:57 -08:00
Greg Farnum
abc995b6b4 qa/workunits/fs/misc: combine sudo and echo effectively
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2014-11-06 17:59:22 -08:00
Greg Farnum
3aa7797741 qa: use sudo even more when rsyncing /usr
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2014-11-06 17:48:01 -08:00
Loic Dachary
948b184c48 Merge pull request #2593 from cernceph/wip-reusepart
ceph-disk: set guid if reusing a journal partition

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-11-06 22:02:43 +01:00
Loic Dachary
de8ae6dcab Merge pull request #2871 from branto1/wip-systemd-run-not-avail
Fix rhbz#1157938

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-11-06 16:44:54 +01:00
Boris Ranto
2a61735621 Fedora 19 uses systemd but there is no systemd-run available in the release (rhbz#1157938), this patch makes sure that the init scripts check for availability of systemd-run before they use it (otherwise, they fall back to the default method)
Signed-off-by: Boris Ranto <branto@redhat.com>
2014-11-06 15:38:51 +01:00
Federico Gimenez
5ac05d46e8 Fix tests on btrfs: leftover subvolumes removed
Signed-off-by: Federico Gimenez <fgimenez@coit.es>
2014-11-06 13:59:01 +01:00
Josh Durgin
0401542797 Merge pull request #2859 from ceph/wip-9877
rgw: RGWRados::get_obj() returns wrong len if len == 0

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-11-06 13:18:41 +01:00
Josh Durgin
b436f0820a Merge pull request #2865 from ceph/wip-9479
rgw: send back ETag on S3 object copy

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-11-06 13:14:29 +01:00
Josh Durgin
1dea385b1f Merge pull request #2866 from ceph/wip-9973
rgw: remove swift user manifest (DLO) hash calculation

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-11-06 13:13:17 +01:00
Josh Durgin
7f5d035680 Merge pull request #2867 from ceph/wip-9918
rgw: update swift subuser perm masks when authenticating

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-11-06 13:09:15 +01:00
Josh Durgin
e8a2a02f0a Merge pull request #2864 from ceph/wip-9478
rgw: S3 object copy content type fix

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-11-06 13:05:32 +01:00
John Spray
762eda88a1 osdc: fix Journaler write error handling
Since we started wrapping the write error
handler in a finisher, multiple calls to
handle_write_error would hit the assert()
on the second call before the actual
handler had been called (at the other end
of the finisher) from the first call.

The symptom was that the MDS was intermittently
failing to respawn on blacklist, seen in #10011.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-11-06 11:46:29 +00:00
Loic Dachary
67f8b10393 Merge pull request #2868 from zhouyuan/bench_tool_isa
EC: Allow bench.sh to test ISA backend also

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-11-06 11:12:12 +01:00
Jason Dillaman
61ebfebd59 librbd: don't close an already closed parent image upon failure
If librbd is not able to open a child's parent image, it will
incorrectly close the parent image twice, resulting in a crash.

Fixes: #10030
Backport: firefly, giant
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2014-11-06 05:01:38 -05:00
Yuan Zhou
d13b478094 EC: Allow bench.sh to test ISA backend also
Update bench.sh/plot tool to cover ISA backend.
ISA will output a fake echinique 'cauchy_good' so the plot tool
don't need to be changed.

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
2014-11-06 15:48:48 +08:00
David Zafman
52cb44c4dd osd, mon: Send initial pg create time from mon to osd
Fixes: #9887

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-11-05 20:10:09 -08:00
Jason Dillaman
2e63944344 librbd: Refactor librbd unit tests to use test fixtures
Current librbd unit tests create and destroy pools for each
test.  By migrating to a test fixture, the same pool(s) are
now used for all tests within a test case.  This speeds up
the runtime of the librbd tests.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2014-11-05 17:47:20 -05:00
Yehuda Sadeh
5d9f36f757 rgw: update swift subuser perm masks when authenticating
Fixes: #9918
Backport: firefly, giant
It seems that we weren't setting the swift perm mask correctly.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-11-05 14:41:47 -08:00
Yehuda Sadeh
ef6d3ad964 rgw: remove swift user manifest (DLO) hash calculation
Fixes: #9973
Backport: firefly, giant

Previously we were iterating through the parts, creating hash of the
parts etags (as S3 does for multipart uploads). However, swift just
calculates the etag for the empty manifest object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-11-05 13:45:46 -08:00
Yehuda Sadeh
b1bfc3a7e0 rgw: send back ETag on S3 object copy
Fixes: #9479
Backport: firefly, giant
We didn't send the etag back correctly. Original code assumed the etag
resided in the attrs, but attrs only contained request attrs.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-11-05 13:30:02 -08:00
Yehuda Sadeh
31963459a0 rgw: S3 object copy content type fix
Fixes: #9478
Backport: firefly, giant
Content type for S3 object copy response should be set to
application/xml.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-11-05 12:35:42 -08:00
Jianpeng Ma
3103c8a4db ObjectStore: Fix a error comment.
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-11-05 05:14:38 -08:00
Jianpeng Ma
a1aa70f2f2 ObjectStore: Don't use largest_data_off to calc data_align.
If largest_data_off % CEPH_PAGE_SIZE != 0, the get_data_aligment return
a erro value. This make the FileJouranl::align_bl to memcopy much data.

Tested-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-11-05 05:14:14 -08:00
Jianpeng Ma
8ba504dee8 buffer: Add _memcopy_count to track total count of memcopy by rebuild/rebuild_page_aligned/c_str.
Using thie filed, we know the payload of
rebuild/rebuild_page_aligned/c_str and tune performance accroding.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2014-11-05 05:12:22 -08:00
Sage Weil
3d45a68d0a mds: fix log_client config
This broke when channels were refactored.  Set and update log_client
config using generic helpers.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
7dc2ca826e osd: configure log_client properly
This broke when the channel refactor happened--we weren't configuring
the LogClient settings at all.  Fix it by using the generic helpers to
make this reasonably painless.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
da6a8a36e2 mon: move log config parsing into LogClient.h helper
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
0fd54a7e4a move Monitor::update_log_client to LogChannel::update_config
None of this is specific to the monitor.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
4561aff746 move get_conf_str_map_helper to str_map.h (from Monitor.h)
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
84fec864ca osd: add 'cluster_log [type] [message ...]' tell command
Useful for debugging.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
4f40975013 commong/LogEntry: string_to_clog_type
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00