]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoMDSMonitor: Adjust handling of MDSes asking for standby-replay.
Greg Farnum [Thu, 20 Jan 2011 19:57:23 +0000 (11:57 -0800)]
MDSMonitor: Adjust handling of MDSes asking for standby-replay.

1) If the MDS does not specify an MDS to follow, we mark them as
standing-by for -2. MDSMap::find_standby_for() has been modified
to grab these MDSes.
2) If an MDS asks for standby-replay and specifies a name but
not a rank, fill in the rank if the named MDS is known to us. If it
is not known, do nothing.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Adjust replay state changes and options parsing.
Greg Farnum [Wed, 19 Jan 2011 23:59:46 +0000 (15:59 -0800)]
mds: Adjust replay state changes and options parsing.

The MDS used to interpret g_conf.id as a rank. It no longer does
so and requires that standby ranks/names be set via the g_conf options,
or else along with the replay command in the CLI. Remove the MDS versions
of standby_for_[rank|name] and just use the ones in g_conf for simplicity.

However, the MDS only looks at the rank when switching to standby;
making names usable will require an update to the MDSMonitor code to
plug in ranks from names.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomessages: Let MMDSBeacon set_standby_for_name from a c-string.
Greg Farnum [Sat, 22 Jan 2011 01:42:02 +0000 (17:42 -0800)]
messages: Let MMDSBeacon set_standby_for_name from a c-string.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoconfig: add new mds_standby options.
Greg Farnum [Wed, 19 Jan 2011 22:53:32 +0000 (14:53 -0800)]
config: add new mds_standby options.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: Keep journaler in readonly mode until replay completes.
Greg Farnum [Fri, 21 Jan 2011 19:07:52 +0000 (11:07 -0800)]
mds: Keep journaler in readonly mode until replay completes.

Previously we were switching it off for the final non-standby replay
when a standby-replay got activated. This caused issues
since the states weren't quite correct!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: use direct replay test when deciding whether to rebalance.
Greg Farnum [Wed, 12 Jan 2011 22:54:01 +0000 (14:54 -0800)]
mds: use direct replay test when deciding whether to rebalance.

The previous use of standby_for_rank testing was prone to errors
and I think would have ended up causing bugs if it was in the middle
of a standby_replay run when it got a new MDS map pushing
it into regular replay mode.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agotest: add new unit test "gather" for C_Gather.
Greg Farnum [Wed, 19 Jan 2011 18:45:59 +0000 (10:45 -0800)]
test: add new unit test "gather" for C_Gather.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agounits: base64 should test more round-trips
Colin Patrick McCabe [Tue, 18 Jan 2011 18:22:19 +0000 (10:22 -0800)]
units: base64 should test more round-trips

Test 1000 round trips.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agounits: better names for the base64 test
Colin Patrick McCabe [Tue, 18 Jan 2011 18:10:02 +0000 (10:10 -0800)]
units: better names for the base64 test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agounits: don't need -lcrypto
Colin Patrick McCabe [Tue, 18 Jan 2011 17:39:39 +0000 (09:39 -0800)]
units: don't need -lcrypto

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon: Allow ceph mds fail <name>
Colin Patrick McCabe [Tue, 18 Jan 2011 15:57:53 +0000 (07:57 -0800)]
mon: Allow ceph mds fail <name>

Formerly we only allowed "ceph mds fail <rank>", and also failed to
check if rank was correctly parsed.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agohealth: fix health display for MDSes
Colin Patrick McCabe [Tue, 18 Jan 2011 15:56:24 +0000 (07:56 -0800)]
health: fix health display for MDSes

When there are laggy MDSes, we should set health to WARN. Failed MDSes
should set health to FAIL. Stopped MDSes should not affect health.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: add comment explaining MDSMap::max_mds
Colin Patrick McCabe [Tue, 18 Jan 2011 15:56:07 +0000 (07:56 -0800)]
mds: add comment explaining MDSMap::max_mds

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoautomake: check for libedit
Colin Patrick McCabe [Tue, 18 Jan 2011 10:51:32 +0000 (02:51 -0800)]
automake: check for libedit

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: avoid polluting peer_info with acting[0]
Sage Weil [Tue, 18 Jan 2011 04:07:35 +0000 (20:07 -0800)]
osd: avoid polluting peer_info with acting[0]

This can confuse code that iterates over peer_info and finds the primary
(with bad info).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: make misdirected request warnings specify osdmap epoch
Sage Weil [Mon, 17 Jan 2011 23:47:47 +0000 (15:47 -0800)]
osd: make misdirected request warnings specify osdmap epoch

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agovstart: set pgp_bits to a sane value
Sage Weil [Mon, 17 Jan 2011 23:47:30 +0000 (15:47 -0800)]
vstart: set pgp_bits to a sane value

We need to specify pgp_bits as well or else we get the default (which makes
no sense when it's way bigger than pg_bits).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: disallow pgp_num > pg_num on osdmap creation
Sage Weil [Mon, 17 Jan 2011 23:46:48 +0000 (15:46 -0800)]
osd: disallow pgp_num > pg_num on osdmap creation

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoRevert "objecter: use raw_pg_to_pg when needed"
Sage Weil [Mon, 17 Jan 2011 23:44:44 +0000 (15:44 -0800)]
Revert "objecter: use raw_pg_to_pg when needed"

This reverts commit cfd87ceefb46358adaa1751975c8d3a6b063bdf9.

The client side behavior here is correct: we should feed the raw pg into
osdmap->pg_to_acting_osds.  The real problem is(was!) that pgp_num > pg_num
in current maps, which is illegal.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: make 'pg map <pgid>' output more explicit
Sage Weil [Mon, 17 Jan 2011 23:36:51 +0000 (15:36 -0800)]
mon: make 'pg map <pgid>' output more explicit

Show effective pgid in parens.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'testing' into unstable
Sage Weil [Mon, 17 Jan 2011 21:38:06 +0000 (13:38 -0800)]
Merge branch 'testing' into unstable

Conflicts:
src/mds/journal.cc

14 years agoosd: rebind heartbeat_messenger (with cluster one) when wrongly marked down
Sage Weil [Sat, 15 Jan 2011 00:58:47 +0000 (16:58 -0800)]
osd: rebind heartbeat_messenger (with cluster one) when wrongly marked down

This keeps things clean.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomessenger: let rebind() avoid multiple ports
Sage Weil [Sat, 15 Jan 2011 00:58:19 +0000 (16:58 -0800)]
messenger: let rebind() avoid multiple ports

We need to rebind two messengers, which means avoiding both old ports.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: drop messages from before we moved back to boot state
Sage Weil [Sat, 15 Jan 2011 00:57:38 +0000 (16:57 -0800)]
osd: drop messages from before we moved back to boot state

We want to make sure we ignore any messages sent to us before we moved
back to the boot state (after being wrongly marked down).  This is only
a problem currently while we are in the BOOT state and waiting to be
re-added to the map, because we may then call _share_map_incoming and
send something on the new rebound messenger to an old peer.  Also assert
that we are !booting there to be sure.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/overload2' into unstable
Sage Weil [Sat, 15 Jan 2011 23:52:36 +0000 (15:52 -0800)]
Merge remote branch 'origin/overload2' into unstable

14 years agoMake non-runnable source files not have execute bit set.
Tommi Virtanen [Fri, 7 Jan 2011 19:05:30 +0000 (11:05 -0800)]
Make non-runnable source files not have execute bit set.

14 years agoMake run-cli-tests not abort on first failure.
Tommi Virtanen [Sat, 15 Jan 2011 01:27:23 +0000 (17:27 -0800)]
Make run-cli-tests not abort on first failure.

14 years agoMake clitests avoid existing ceph.conf files.
Tommi Virtanen [Sat, 15 Jan 2011 01:25:41 +0000 (17:25 -0800)]
Make clitests avoid existing ceph.conf files.

14 years agoAdd TODO note for cauthtool -c conflict.
Tommi Virtanen [Sat, 15 Jan 2011 01:24:46 +0000 (17:24 -0800)]
Add TODO note for cauthtool -c conflict.

This triggered in unrelated ways while testing CEPH_CONF
support.

14 years agoCommand line -c should still override CEPH_CONF from env.
Tommi Virtanen [Sat, 15 Jan 2011 01:18:48 +0000 (17:18 -0800)]
Command line -c should still override CEPH_CONF from env.

14 years agoSanitize environment before running clitests.
Tommi Virtanen [Sat, 15 Jan 2011 00:39:38 +0000 (16:39 -0800)]
Sanitize environment before running clitests.

This avoids CEPH_KEYRING etc from slipping in.

14 years agocfuse: fix crash when bad address provided
Yehuda Sadeh [Sat, 15 Jan 2011 00:57:33 +0000 (16:57 -0800)]
cfuse: fix crash when bad address provided

14 years agoauth: new rotating secret ttl should depend on now() + ttl
Yehuda Sadeh [Sat, 15 Jan 2011 00:29:41 +0000 (16:29 -0800)]
auth: new rotating secret ttl should depend on now() + ttl

Before it only depended on the previous rotating secret (which was
always bigger than g_clock.now()). Since the tickets rotation is
never being done exactly when the old ticket expires (probably takes
a few seconds after that), then we ended up having tickets that expire
much sooner than we expected.

14 years agoMerge remote branch 'newdream/unstable' into unstable
Tommi Virtanen [Sat, 15 Jan 2011 00:33:00 +0000 (16:33 -0800)]
Merge remote branch 'newdream/unstable' into unstable

14 years agoRevert "unit tests: do standard ceph init before tests"
Tommi Virtanen [Fri, 14 Jan 2011 23:41:28 +0000 (15:41 -0800)]
Revert "unit tests: do standard ceph init before tests"

This reverts commit 77f90978dc38d025e05300f7650a550ae15704fa.

Unit tests should not parse the normal "-c ceph.conf" command line
arguments, they should not read config files, etc. If something
needs initializing for a specific unit tests, we'll either fix it
to not need it, initialize it just for that, or figure some nicer
way of doing this.

The commit also broke "make distcheck".

14 years agoMake git ignore *.t.err files generated by clitests.
Tommi Virtanen [Fri, 14 Jan 2011 19:48:46 +0000 (11:48 -0800)]
Make git ignore *.t.err files generated by clitests.

14 years agoMake git ignore more generated files in src/gtest.
Tommi Virtanen [Fri, 14 Jan 2011 18:45:52 +0000 (10:45 -0800)]
Make git ignore more generated files in src/gtest.

14 years agoPatch cram so it is able to write *.err files outside the source tree.
Tommi Virtanen [Fri, 14 Jan 2011 18:39:32 +0000 (10:39 -0800)]
Patch cram so it is able to write *.err files outside the source tree.

https://bitbucket.org/brodie/cram/issue/9/allow-read-only-directories-for-t

Found by "make distcheck".

14 years agoClean up test virtualenv on "make clean".
Tommi Virtanen [Fri, 14 Jan 2011 18:35:20 +0000 (10:35 -0800)]
Clean up test virtualenv on "make clean".

Found by "make distcheck".

14 years agoInclude the cli tests in a dist tarball.
Tommi Virtanen [Fri, 14 Jan 2011 18:33:31 +0000 (10:33 -0800)]
Include the cli tests in a dist tarball.

Found by "make distcheck".

14 years agoAlso distribute pre-downloaded tarballs.
Tommi Virtanen [Thu, 13 Jan 2011 21:38:40 +0000 (13:38 -0800)]
Also distribute pre-downloaded tarballs.

Found by "make distcheck".

14 years agoTeach run-cli-tests about build dirs.
Tommi Virtanen [Thu, 13 Jan 2011 20:59:11 +0000 (12:59 -0800)]
Teach run-cli-tests about build dirs.

An optional argument points can tell it where to put
generated files (in this case, virtualenv). Provide
the argument in Makefile.am.

Options are still passed to cram, so you can say
"./src/test/run-cli-tests -i".

14 years agoMDS: Use new C_Gather::get_num_remaining() in MDCache.
Greg Farnum [Sat, 15 Jan 2011 00:22:11 +0000 (16:22 -0800)]
MDS: Use new C_Gather::get_num_remaining() in MDCache.

It was using get_num(), which now reports the number created.
This probably wouldn't have worked previously except that
~C_Gather::C_GatherSub was inappropriately calling rm_sub().

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoC_Gather: Set debug #ifdefs to remove set.
Greg Farnum [Sat, 15 Jan 2011 00:12:32 +0000 (16:12 -0800)]
C_Gather: Set debug #ifdefs to remove set.

This way when we're confident it works right, we can
remove the set<Context*> and just rely on ref counting.

Further optimizations would include using a spinlock
rather than a mutex, or possibly even just switching
sub_[created|existing]_count to be atomics.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoC_Gather: Rewrite for thread safety.
Greg Farnum [Sat, 15 Jan 2011 00:11:01 +0000 (16:11 -0800)]
C_Gather: Rewrite for thread safety.

Previously, C_Gather wasn't thread safe at all,
and there was an issue with creating subs while some
subs were being finished.
These issues are now fixed.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoRename variable in run-cli-tests.
Tommi Virtanen [Thu, 13 Jan 2011 20:52:26 +0000 (12:52 -0800)]
Rename variable in run-cli-tests.

Emphasize the fact that the path is the source dir, not the build dir.

14 years agorun-cli-tests is in srcdir not in build dir.
Tommi Virtanen [Thu, 13 Jan 2011 20:50:29 +0000 (12:50 -0800)]
run-cli-tests is in srcdir not in build dir.

Found by "make distcheck".

14 years agoInclude run-cli-tests in release tarball.
Tommi Virtanen [Thu, 13 Jan 2011 20:49:55 +0000 (12:49 -0800)]
Include run-cli-tests in release tarball.

Found by "make distcheck".

14 years agoMerge branch 'tests-broken' into unstable
Tommi Virtanen [Fri, 14 Jan 2011 23:22:01 +0000 (15:22 -0800)]
Merge branch 'tests-broken' into unstable

14 years agoFix clitests for cconf usage change.
Tommi Virtanen [Fri, 14 Jan 2011 23:21:46 +0000 (15:21 -0800)]
Fix clitests for cconf usage change.

14 years agomds: call MonClient::shutdown when doing a journal dump.
Greg Farnum [Wed, 12 Jan 2011 22:46:30 +0000 (14:46 -0800)]
mds: call MonClient::shutdown when doing a journal dump.

Previously we got a failed assert since nothing was calling this.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoMerge branch 'tests-broken' into unstable
Tommi Virtanen [Fri, 14 Jan 2011 23:07:41 +0000 (15:07 -0800)]
Merge branch 'tests-broken' into unstable

14 years agoFix clitests for cauthtool usage change.
Tommi Virtanen [Fri, 14 Jan 2011 23:06:35 +0000 (15:06 -0800)]
Fix clitests for cauthtool usage change.

14 years agoMerge commit 'cfae10b8f8b0d91f37dc6eb72f3b3f8285bb15e7' into tests-broken-2
Tommi Virtanen [Fri, 14 Jan 2011 23:04:16 +0000 (15:04 -0800)]
Merge commit 'cfae10b8f8b0d91f37dc6eb72f3b3f8285bb15e7' into tests-broken-2

14 years agoPlaintext keyring format is supposed to be user-friendly, so test it.
Tommi Virtanen [Fri, 14 Jan 2011 23:01:11 +0000 (15:01 -0800)]
Plaintext keyring format is supposed to be user-friendly, so test it.

14 years agoNow that cauthtool has two kinds of keyrings, test them both.
Tommi Virtanen [Fri, 14 Jan 2011 23:00:47 +0000 (15:00 -0800)]
Now that cauthtool has two kinds of keyrings, test them both.

14 years agoFix a bug where "cauthtool --create-keyring" (no --bin) wrote garbage.
Tommi Virtanen [Fri, 14 Jan 2011 22:24:50 +0000 (14:24 -0800)]
Fix a bug where "cauthtool --create-keyring" (no --bin) wrote garbage.

This only triggered when running without --gen-key or --add-key.

14 years agoos: don't crash on no-journal case
Colin Patrick McCabe [Sun, 9 Jan 2011 21:34:40 +0000 (13:34 -0800)]
os: don't crash on no-journal case

JournalingObjectStore::commit_start should handle the case where journal is
null. This will occur if the user doesn't configure a journal.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: Add CEPH_CONF override
Colin Patrick McCabe [Fri, 14 Jan 2011 16:08:36 +0000 (08:08 -0800)]
common: Add CEPH_CONF override

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agounit tests: do standard ceph init before tests
Colin Patrick McCabe [Fri, 14 Jan 2011 13:57:36 +0000 (05:57 -0800)]
unit tests: do standard ceph init before tests

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoqa: Add tiobench test
Colin Patrick McCabe [Fri, 14 Jan 2011 12:38:13 +0000 (04:38 -0800)]
qa: Add tiobench test

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: Implement reweight-by-utilization
Colin Patrick McCabe [Wed, 15 Dec 2010 00:21:39 +0000 (16:21 -0800)]
mon: Implement reweight-by-utilization

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: some PGMap cleanups
Colin Patrick McCabe [Mon, 13 Dec 2010 13:50:00 +0000 (05:50 -0800)]
mon: some PGMap cleanups

Const cleanup. Don't do multiple lookups for the same item in a
container.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: adjust_osd_weights: small const cleanup
Colin Patrick McCabe [Thu, 9 Dec 2010 23:31:16 +0000 (15:31 -0800)]
osd: adjust_osd_weights: small const cleanup

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agovstart.sh: don't depend on /usr/bin/host
Colin Patrick McCabe [Fri, 14 Jan 2011 11:12:38 +0000 (03:12 -0800)]
vstart.sh: don't depend on /usr/bin/host

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomds: use common helper to journal a client session close
Sage Weil [Fri, 14 Jan 2011 06:08:56 +0000 (22:08 -0800)]
mds: use common helper to journal a client session close

We saw a bug where an ESession close was followed by an EMetaBlob on that
session (see 6d0dc4bf64b2792d6fc007268c5a42ae4e2e583c).  My best guess is
that a session timeout raced with a request waiting on locks (only the
explicit client close path was calling request_kill).  To avoid that,
introduce a helper to journal client close so that the common work (killing
any pending requests AND releasing prealloc inos) happen in all cases.

Fixes #708 (I hope!).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: tolerate (with warning) replayed op with bad prealloc_inos
Sage Weil [Fri, 14 Jan 2011 06:08:40 +0000 (22:08 -0800)]
mds: tolerate (with warning) replayed op with bad prealloc_inos

This comes up when an ESesssion close is followed by an EMetaBlob that
uses a prealloc_ino.  That isn't supposed to happen (it's probably a corner
case with session timeout vs a request waiting on locks that didn't
get killed/canceled?).  But tolerate it during replay just the same.

Works around #708.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: improve debug output on ESession journal replay
Sage Weil [Fri, 14 Jan 2011 05:51:05 +0000 (21:51 -0800)]
mds: improve debug output on ESession journal replay

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoOSD,ReplicatedPG: Do not run snap_trimmer while the pg is degraded
Samuel Just [Fri, 14 Jan 2011 00:18:40 +0000 (16:18 -0800)]
OSD,ReplicatedPG: Do not run snap_trimmer while the pg is degraded

snap_trimmer causes replica crashes if the replica is missing
objects.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agocconf: fix usage parsing, add --resolve search
Yehuda Sadeh [Fri, 14 Jan 2011 00:09:16 +0000 (16:09 -0800)]
cconf: fix usage parsing, add --resolve search

--resolve-search is used to resolve a search path result

14 years agokeyring: default keyring file name is 'keyring'
Yehuda Sadeh [Fri, 14 Jan 2011 00:10:27 +0000 (16:10 -0800)]
keyring: default keyring file name is 'keyring'

update accordingly the tools, scripts, man page

14 years agocauthtool: default keyring format is plaintext, add --bin
Yehuda Sadeh [Wed, 12 Jan 2011 22:51:12 +0000 (14:51 -0800)]
cauthtool: default keyring format is plaintext, add --bin

14 years agoconfig: keyring uses a search path again
Yehuda Sadeh [Fri, 14 Jan 2011 00:08:22 +0000 (16:08 -0800)]
config: keyring uses a search path again

14 years agofilejournal: rewrite completion handling, fix ordering on full->notfull
Sage Weil [Thu, 13 Jan 2011 21:14:24 +0000 (13:14 -0800)]
filejournal: rewrite completion handling, fix ordering on full->notfull

Rewriting the completion handling to be simpler, clearer, so that it is
easier to maintain a strict completion ordering invariant.

This also fixes an ordering bug: When restarting journal, we defer
initially until we get a committed_thru from the previous commit and then
do all those completions.  That same logic needs to also apply to new items
submitted during that commit interval.  This was broken before, but the
simpler structure fixes it.  Fixes #666.

Tested-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: activate should not enqueue snap_trimmer on a replica
Samuel Just [Thu, 13 Jan 2011 20:18:17 +0000 (12:18 -0800)]
PG: activate should not enqueue snap_trimmer on a replica

Previously, activate would queue_snap_trim() for replicas if snap_trimq
ended up non-empty, guaranteeing a crash for any replica starting up
while purged_snaps lagged behind pool->cached_removed_snaps.

This should fix #702.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agocommon: fix buffer::list::decode_base64
Colin Patrick McCabe [Thu, 13 Jan 2011 19:19:27 +0000 (11:19 -0800)]
common: fix buffer::list::decode_base64

buffer::list::decode_base64 needs to check for decode failures.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoqa: add xattr check
Sage Weil [Thu, 13 Jan 2011 23:47:30 +0000 (15:47 -0800)]
qa: add xattr check

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'testing' into unstable
Sage Weil [Thu, 13 Jan 2011 21:24:52 +0000 (13:24 -0800)]
Merge branch 'testing' into unstable

Conflicts:
configure.ac

14 years agoFix confusing comment about gtest automake hookup.
Tommi Virtanen [Thu, 13 Jan 2011 19:32:16 +0000 (11:32 -0800)]
Fix confusing comment about gtest automake hookup.

14 years agounit: add IncorrectBase64Encoding test
Colin Patrick McCabe [Thu, 13 Jan 2011 18:34:35 +0000 (10:34 -0800)]
unit: add IncorrectBase64Encoding test

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agounit: Add test/base64.cc
Colin Patrick McCabe [Thu, 13 Jan 2011 18:23:49 +0000 (10:23 -0800)]
unit: Add test/base64.cc

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoAdd a target to build but not run unittests.
Tommi Virtanen [Thu, 13 Jan 2011 17:50:46 +0000 (09:50 -0800)]
Add a target to build but not run unittests.

Use with "make -C src unittests".

14 years agoReplicatedPG: Fix oi.size bug in _rollback_to
Samuel Just [Wed, 12 Jan 2011 23:09:51 +0000 (15:09 -0800)]
ReplicatedPG: Fix oi.size bug in _rollback_to

_rollback_to calls _delete_head before cloning the clone into place.
_delete_head sets the object info size to 0.  _rollback_to now resets
the size to match the rolled back object.  Previously, this bug
manifested as a failed assert in scrub when checking the object sizes.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoReplicatedPG: register_object_context and register_snapset_context cleanup
Samuel Just [Wed, 12 Jan 2011 21:51:55 +0000 (13:51 -0800)]
ReplicatedPG: register_object_context and register_snapset_context cleanup

Previously, get_object_context and get_snapset_context did not register
the resulting objects.  In some cases, these objects would not get
registered and multiple copies would end up created.  This caused a bug
in find_object_context where get_snapset_context could return an object
distinct from the one referenced by the object returned from
get_object_context.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoFix src/test/run-cli-tests to work with any cwd.
Tommi Virtanen [Wed, 12 Jan 2011 21:28:11 +0000 (13:28 -0800)]
Fix src/test/run-cli-tests to work with any cwd.

14 years agoReplicatedPG: snap_trimmer work around
Samuel Just [Wed, 12 Jan 2011 20:07:44 +0000 (12:07 -0800)]
ReplicatedPG: snap_trimmer work around

Currently, an OSD bug is causing snap_trimq to contain some snaps
already in purged_snaps.  This work around should let kvmtest
come back up.  A real fix is still needed.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoMerge branch 'clitests-3' into unstable
Sage Weil [Wed, 12 Jan 2011 20:04:16 +0000 (12:04 -0800)]
Merge branch 'clitests-3' into unstable

14 years agoAdjust clitests after cauthtool changes.
Tommi Virtanen [Wed, 12 Jan 2011 19:10:24 +0000 (11:10 -0800)]
Adjust clitests after cauthtool changes.

14 years agoMerge commit '735eb400dc617c599f8cb42af91bab00931eeaff' into clitests-z
Tommi Virtanen [Wed, 12 Jan 2011 18:58:52 +0000 (10:58 -0800)]
Merge commit '735eb400dc617c599f8cb42af91bab00931eeaff' into clitests-z

14 years agoAdjust clitests after cauthtool changes.
Tommi Virtanen [Wed, 12 Jan 2011 18:52:46 +0000 (10:52 -0800)]
Adjust clitests after cauthtool changes.

14 years agoMerge commit 'e9a70f15029d397ebf0414e5f16fda321af5f55b' into clitests-4
Tommi Virtanen [Wed, 12 Jan 2011 18:49:27 +0000 (10:49 -0800)]
Merge commit 'e9a70f15029d397ebf0414e5f16fda321af5f55b' into clitests-4

14 years agoFix osdmaptool error reporting.
Tommi Virtanen [Wed, 12 Jan 2011 18:24:08 +0000 (10:24 -0800)]
Fix osdmaptool error reporting.

14 years agouclient: Switch how inodes link to dentries a bit.
Greg Farnum [Tue, 4 Jan 2011 21:32:47 +0000 (13:32 -0800)]
uclient: Switch how inodes link to dentries a bit.

Inodes now have a set of parent dentries, rather than a single
pointer. This allows the cache to accurately represent multiple
hard links.
Various minor adjustments were made so that this change in
format works and is error checked.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoauth: change the plaintext keyring format
Yehuda Sadeh [Tue, 11 Jan 2011 22:51:19 +0000 (14:51 -0800)]
auth: change the plaintext keyring format

14 years agoRevert "client: Remove the I_COMPLETE flag from the parent directory in relink_inode."
Greg Farnum [Tue, 4 Jan 2011 21:34:52 +0000 (13:34 -0800)]
Revert "client: Remove the I_COMPLETE flag from the parent directory in relink_inode."

This reverts commit c43455cee4b7b45de6bd04454a40bc7016f2d6d1. We don't
need this fix any more since we now handle hard links properly!

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agoconf: ConfFile can parse bufferlists
Yehuda Sadeh [Tue, 11 Jan 2011 22:06:33 +0000 (14:06 -0800)]
conf: ConfFile can parse bufferlists

14 years agoosd: avoid creating some temporary coll_t objects
Colin Patrick McCabe [Mon, 3 Jan 2011 05:11:07 +0000 (21:11 -0800)]
osd: avoid creating some temporary coll_t objects

PG::coll caches the value of coll_t(this->info.pgid). So use PG::coll
when appropriate rather than constructing a new object.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: de-globalize PG::oldest_update
Colin Patrick McCabe [Tue, 28 Dec 2010 23:55:24 +0000 (15:55 -0800)]
osd: de-globalize PG::oldest_update

Making oldest_update a class variable complicates log merging and wastes
space in the PG struct. Even though memory is big, cachelines are still
small. Just calculate it when we need it.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: clean up loop in proc_replica_log
Colin Patrick McCabe [Tue, 28 Dec 2010 23:48:53 +0000 (15:48 -0800)]
osd: clean up loop in proc_replica_log

We don't need to update lu on (almost) every iteration, only on the
final one. Use a const iterator.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: remove unused PG global
Colin Patrick McCabe [Tue, 28 Dec 2010 22:27:25 +0000 (14:27 -0800)]
osd: remove unused PG global

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>