]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoos: fix minor typo in function defs
Colin Patrick McCabe [Mon, 24 Jan 2011 17:45:54 +0000 (09:45 -0800)]
os: fix minor typo in function defs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoos: fix some obvious error handling problems
Colin Patrick McCabe [Mon, 24 Jan 2011 17:24:50 +0000 (09:24 -0800)]
os: fix some obvious error handling problems

Fix some errors like checking errno when it may not have been set, doing
other operations which may change the value of errno and then checking
it

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMakefile: use new Spirit headers where available
Colin Patrick McCabe [Mon, 24 Jan 2011 00:09:14 +0000 (16:09 -0800)]
Makefile: use new Spirit headers where available

Use new boost::spirit header files where available, to eliminate the
annoying compiler warning on newer systems.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMakefile: remove unecessary header check
Colin Patrick McCabe [Sun, 23 Jan 2011 23:52:41 +0000 (15:52 -0800)]
Makefile: remove unecessary header check

We already check for libcrypto++ using PKG_CHECK_MODULES; we don't need
to fish for header files.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMakefile: use CXXFLAGS more consistently
Colin Patrick McCabe [Sun, 23 Jan 2011 23:42:39 +0000 (15:42 -0800)]
Makefile: use CXXFLAGS more consistently

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest: Add test_rw
Colin Patrick McCabe [Mon, 24 Jan 2011 15:34:40 +0000 (07:34 -0800)]
test: Add test_rw

Test reading and writing lots of objects from the object store.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomsgr: don't need to reinstall signals after daemon
Colin Patrick McCabe [Fri, 21 Jan 2011 15:03:01 +0000 (07:03 -0800)]
msgr: don't need to reinstall signals after daemon

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: respawn must unblock signals before exec
Colin Patrick McCabe [Fri, 21 Jan 2011 14:45:40 +0000 (06:45 -0800)]
mds: respawn must unblock signals before exec

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: move signal blocking into signal.cc
Colin Patrick McCabe [Fri, 21 Jan 2011 14:27:55 +0000 (06:27 -0800)]
common: move signal blocking into signal.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: add signal_mask_to_str
Colin Patrick McCabe [Fri, 21 Jan 2011 13:45:01 +0000 (05:45 -0800)]
common: add signal_mask_to_str

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agounits: RandomRoundTrips: fix endptr for buffer
Colin Patrick McCabe [Fri, 21 Jan 2011 12:18:27 +0000 (04:18 -0800)]
units: RandomRoundTrips: fix endptr for buffer

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoworkunits: direct_io_test: fix error message
Colin Patrick McCabe [Fri, 21 Jan 2011 10:51:59 +0000 (02:51 -0800)]
workunits: direct_io_test: fix error message

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoworkunits: direct_io_test: add cmdline options
Colin Patrick McCabe [Thu, 20 Jan 2011 19:18:22 +0000 (11:18 -0800)]
workunits: direct_io_test: add cmdline options

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoworkunits: direct_io_test: test more iterations
Colin Patrick McCabe [Thu, 20 Jan 2011 19:07:37 +0000 (11:07 -0800)]
workunits: direct_io_test: test more iterations

Test seeking around in an O_DIRECT file to see if we read what we
should.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoworkunits: add direct_io_test
Colin Patrick McCabe [Thu, 20 Jan 2011 18:46:55 +0000 (10:46 -0800)]
workunits: add direct_io_test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: pthread_cond_signal: don't need lock
Colin Patrick McCabe [Thu, 20 Jan 2011 13:43:22 +0000 (05:43 -0800)]
common: pthread_cond_signal: don't need lock

from the man page:

The pthread_cond_broadcast() or pthread_cond_signal() functions may be
called by a thread whether or not it currently owns the mutex that
threads calling pthread_cond_wait() or pthread_cond_timedwait() have
associated with the condition variable during their waits.

The man page goes on to suggest that sometimes you might want to hold
the lock when signalling. This would be the case if you had some
other variable that could only change when the lock was held, and you
wanted to ensure that that variable did not change prior to the waiter
being woken. That is not the case here, so it's irrelevant.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoinit-ceph: more verbose status
Colin Patrick McCabe [Thu, 20 Jan 2011 20:38:16 +0000 (12:38 -0800)]
init-ceph: more verbose status

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agosignals: signal.cc: trim includes
Colin Patrick McCabe [Thu, 20 Jan 2011 11:34:09 +0000 (03:34 -0800)]
signals: signal.cc: trim includes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: store migrator lock set over course of export
Sage Weil [Wed, 19 Jan 2011 22:54:56 +0000 (14:54 -0800)]
mds: store migrator lock set over course of export

We were recalculating the migrator locks at the beginning and end of
export, but we were getting inconsistent sets at the end point, causing us
to unlock the wrong set of bounds.  Instead, calculate the set when we
first start and again once we're frozen and things are set in stone.  When
we're done, unlock that same set.  Cleanup up the set as needed.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon: re-install sighandlers after daemon()
Colin Patrick McCabe [Wed, 19 Jan 2011 17:24:53 +0000 (09:24 -0800)]
common: re-install sighandlers after daemon()

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: move signal handler stuff into signal.cc
Colin Patrick McCabe [Wed, 19 Jan 2011 17:15:02 +0000 (09:15 -0800)]
common: move signal handler stuff into signal.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocephtool: handle init failures correctly
Colin Patrick McCabe [Wed, 19 Jan 2011 12:16:47 +0000 (04:16 -0800)]
cephtool: handle init failures correctly

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocephtool: fix usage a bit
Colin Patrick McCabe [Wed, 19 Jan 2011 11:53:22 +0000 (03:53 -0800)]
cephtool: fix usage a bit

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: fix common_usage a bit
Colin Patrick McCabe [Wed, 19 Jan 2011 11:53:11 +0000 (03:53 -0800)]
common: fix common_usage a bit

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
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".