Gary Lowell [Sat, 16 Feb 2013 01:58:48 +0000 (17:58 -0800)]
Build: Change build to always use system leveldb
Dynamically link to the leveldb installed on the system rather than
statically linking ceph copy. Remove the --with-system-leveldb config
option, and add a requirement for leveldb libraries for rpm and debian
packages. Bug 3945.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Josh Durgin [Tue, 26 Feb 2013 21:20:08 +0000 (13:20 -0800)]
librbd: fix rollback size
The duplicate calls to get_image_size() and get_snap_size() replaced
by 5806226cf0743bb44eaf7bc815897c6846d43233 uncovered this. The first
call was using the currently set snap_id instead of the snapshot being
rolled back to.
Fixes: #4272 Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 26 Feb 2013 21:12:08 +0000 (13:12 -0800)]
mon: fix other debug dumps
These should only kick in at high debug levels. Moving any "work" between
the dout() and dendl lines puts them inside the magical hidden if block
that makes this code a no-op at low debug.
Danny Al-Gaaf [Tue, 26 Feb 2013 10:25:49 +0000 (11:25 +0100)]
KeyValueDBMemory.cc: use empty() instead of size() == 0
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Tue, 26 Feb 2013 10:19:25 +0000 (11:19 +0100)]
ReplicatedPG.cc: use empty() instead of size() == 0
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Tue, 26 Feb 2013 10:16:56 +0000 (11:16 +0100)]
FileStore.cc: use if(!empty()) instead of if(size())
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Tue, 26 Feb 2013 10:15:35 +0000 (11:15 +0100)]
mon_store_converter.cc: use empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Tue, 26 Feb 2013 10:13:45 +0000 (11:13 +0100)]
Paxos.cc: use empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 25 Feb 2013 16:08:14 +0000 (17:08 +0100)]
Monitor.h: use empty() instead of !size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 25 Feb 2013 16:06:36 +0000 (17:06 +0100)]
Monitor.cc: use empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Gary Lowell [Mon, 11 Feb 2013 06:21:52 +0000 (22:21 -0800)]
configure.ac: Add test for c++ compiler.
The AC_PROG_CXX macro sets a flag if a C++ compiler is found
but does not fail if one is not found, it left to application
to test the flags as needed. This fix will issue an error
when a c++ compiler is not found. Bug 3955.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
it's not installed, this fix adds an error message for a
Dan Mick [Mon, 26 Nov 2012 21:43:13 +0000 (13:43 -0800)]
test_lock_fence.sh, rbdrw.py: rbd lock/fence test
qa/workunits/rbd/test_lock_fence.sh runs using test/rbdrw.py
rbdrw.py creates an image, locks it, and runs an I/O loop;
test_lock_fence.sh runs it, waits, and then blacklists that client,
which causes rbdrw.py to get ESHUTDOWN on operations thereafter.
Currently doesn't work with rbd caching enabled.
rbd.py gets new exception type for ESHUTDOWN
Fixes: #3190 Signed-off-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Sage Weil [Sat, 23 Feb 2013 17:01:07 +0000 (09:01 -0800)]
mon: PaxosService: remove lingering uses of paxos getters and wait methods
We should use the PaxosServices getters, setters, and wait methods when and
wherever possible. These must have fallen through the cracks during the
merge.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Josh Durgin [Mon, 25 Feb 2013 22:55:34 +0000 (14:55 -0800)]
systest: fix race with pool deletion
The second test have pool deletion and object listing wait on the same
semaphore to connect and start. This led to errors sometimes when the
pool was deleted before it could be opened by the listing process. Add
another semaphore so the pool deletion happens only after the listing
has begun.
Josh Durgin [Mon, 25 Feb 2013 23:55:36 +0000 (15:55 -0800)]
test_rbd: close image before removing it
This error was masked before by watch notify not differentiating
between watches from the same client with different cookies.
Reopen the image at the end of this test so teardown works.
Josh Durgin [Mon, 25 Feb 2013 22:55:34 +0000 (14:55 -0800)]
systest: fix race with pool deletion
The second test have pool deletion and object listing wait on the same
semaphore to connect and start. This led to errors sometimes when the
pool was deleted before it could be opened by the listing process. Add
another semaphore so the pool deletion happens only after the listing
has begun.
Josh Durgin [Mon, 25 Feb 2013 19:33:48 +0000 (11:33 -0800)]
librbd: drop snap_lock before invalidating cache
Writeback will take the snap_lock, so read everything we need under it
before invalidating the cache. This avoids a recursive lock when writeback
uses snap_lock while snap_rollback() was holding it.
Remove a not-very-useful debugging message that depended on snap_lock being held.