Commit Graph

12568 Commits

Author SHA1 Message Date
Colin Patrick McCabe
42709d1bff 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>
2011-01-20 11:07:37 -08:00
Colin Patrick McCabe
f1d7af97f3 workunits: add direct_io_test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-20 10:46:55 -08:00
Colin Patrick McCabe
6c85b10bad 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>
2011-01-20 05:53:05 -08:00
Colin Patrick McCabe
715bbcabd9 init-ceph: more verbose status
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2011-01-20 12:38:45 -08:00
Colin Patrick McCabe
ba57520a59 signals: signal.cc: trim includes
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-20 03:34:09 -08:00
Sage Weil
f33a33e947 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>
2011-01-20 10:07:58 -08:00
Colin Patrick McCabe
820c54fedc common: re-install sighandlers after daemon()
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-19 09:25:57 -08:00
Colin Patrick McCabe
2f72156e05 common: move signal handler stuff into signal.cc
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-19 09:22:06 -08:00
Colin Patrick McCabe
047ed152a3 cephtool: handle init failures correctly
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-19 04:16:47 -08:00
Colin Patrick McCabe
b13efe2c9d cephtool: fix usage a bit
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-19 04:08:53 -08:00
Colin Patrick McCabe
1b46b0d830 common: fix common_usage a bit
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-19 04:08:50 -08:00
Greg Farnum
8e77b3563c test: add new unit test "gather" for C_Gather.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-01-19 10:46:05 -08:00
Colin Patrick McCabe
d69e5f515a units: base64 should test more round-trips
Test 1000 round trips.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-18 10:22:19 -08:00
Colin Patrick McCabe
88530e1359 units: better names for the base64 test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-18 10:10:02 -08:00
Colin Patrick McCabe
219a1c1fc9 units: don't need -lcrypto
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-18 09:39:39 -08:00
Colin Patrick McCabe
08110f10cc 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>
2011-01-18 07:57:53 -08:00
Colin Patrick McCabe
e5b786952f 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>
2011-01-18 07:56:24 -08:00
Colin Patrick McCabe
93a729f294 mds: add comment explaining MDSMap::max_mds
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-18 07:56:07 -08:00
Colin Patrick McCabe
9077fa5aea automake: check for libedit
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-18 02:51:59 -08:00
Sage Weil
c8d1029d86 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>
2011-01-17 20:07:35 -08:00
Sage Weil
546d65f16e osd: make misdirected request warnings specify osdmap epoch
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-17 15:47:47 -08:00
Sage Weil
b9b8d7c8ac 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>
2011-01-17 15:47:30 -08:00
Sage Weil
0a3eec1fff osd: disallow pgp_num > pg_num on osdmap creation
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-17 15:46:48 -08:00
Sage Weil
fcab5e81cf Revert "objecter: use raw_pg_to_pg when needed"
This reverts commit cfd87ceefb.

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>
2011-01-17 15:44:44 -08:00
Sage Weil
7e3d2ae003 mon: make 'pg map <pgid>' output more explicit
Show effective pgid in parens.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-17 15:36:51 -08:00
Sage Weil
6f946c869c Merge branch 'testing' into unstable
Conflicts:
	src/mds/journal.cc
2011-01-17 13:38:06 -08:00
Sage Weil
afefd737ca osd: rebind heartbeat_messenger (with cluster one) when wrongly marked down
This keeps things clean.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-17 13:23:02 -08:00
Sage Weil
d27a0aaf60 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>
2011-01-17 13:22:56 -08:00
Sage Weil
818fa33a66 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>
2011-01-17 13:18:32 -08:00
Sage Weil
8aa4a95768 Merge remote branch 'origin/overload2' into unstable 2011-01-15 15:52:36 -08:00
Tommi Virtanen
ace8ef90f4 Make non-runnable source files not have execute bit set. 2011-01-14 17:36:50 -08:00
Tommi Virtanen
3c656ad59b Make run-cli-tests not abort on first failure. 2011-01-14 17:27:59 -08:00
Tommi Virtanen
fa7e469c7e Make clitests avoid existing ceph.conf files. 2011-01-14 17:27:59 -08:00
Tommi Virtanen
ba4de2e1ff Add TODO note for cauthtool -c conflict.
This triggered in unrelated ways while testing CEPH_CONF
support.
2011-01-14 17:27:59 -08:00
Tommi Virtanen
886c7d35c0 Command line -c should still override CEPH_CONF from env. 2011-01-14 17:27:59 -08:00
Tommi Virtanen
5a0bc6b78f Sanitize environment before running clitests.
This avoids CEPH_KEYRING etc from slipping in.
2011-01-14 17:27:59 -08:00
Yehuda Sadeh
0c6fb520dc cfuse: fix crash when bad address provided 2011-01-14 16:57:33 -08:00
Yehuda Sadeh
7d7af85c3a 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.
2011-01-14 16:34:45 -08:00
Tommi Virtanen
ae47f3c32f Merge remote branch 'newdream/unstable' into unstable 2011-01-14 16:33:00 -08:00
Tommi Virtanen
a90329aef4 Revert "unit tests: do standard ceph init before tests"
This reverts commit 77f90978dc.

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".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
0259e57b7a Make git ignore *.t.err files generated by clitests. 2011-01-14 16:27:24 -08:00
Tommi Virtanen
bdc1e26019 Make git ignore more generated files in src/gtest. 2011-01-14 16:27:24 -08:00
Tommi Virtanen
dab99b048d 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".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
95d7d6e2b6 Clean up test virtualenv on "make clean".
Found by "make distcheck".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
a549955ec9 Include the cli tests in a dist tarball.
Found by "make distcheck".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
58f6d09eac Also distribute pre-downloaded tarballs.
Found by "make distcheck".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
5045695cd8 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".
2011-01-14 16:27:16 -08:00
Greg Farnum
4385aa567d 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>
2011-01-14 16:22:11 -08:00
Greg Farnum
a93b970ab1 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>
2011-01-14 16:12:32 -08:00
Greg Farnum
55cf6bad2f 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>
2011-01-14 16:11:01 -08:00