Commit Graph

24840 Commits

Author SHA1 Message Date
Joao Eduardo Luis
45843f7501 Makefile.am: fix misspelt header name
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-19 16:31:48 +00:00
Sage Weil
1674519122 Merge branch 'next' 2013-03-18 22:54:25 -07:00
Sage Weil
d47759429a ceph-disk-prepare: 'mkfs -t' instead of 'mkfs --type='
Older mkfs (el6) doesn't like --type=.

Fixes: #4495
Reported-by: Alexandre Maragone <alexandre.maragone@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-18 21:13:34 -07:00
Sam Lang
9029b0915b mds: Handle ENODATA returned from getxattr
The osds might return ENODATA if we request an
xattr that doesn't exist.  In this case, we're
requesting the 'parent' xattr so that we can
remove all the forwarding pointers, but the xattr
may not have been written (which only happens on
log segment trim), so we don't assert here.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-18 21:07:51 -07:00
Sage Weil
7aec13f749 mon/PaxosService: fix proposal waiter handling
- Cancel the propsal waiters with EAGAIN on election, etc.
- Drop the wakeup helper and open-code the one caller.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-18 21:00:06 -07:00
Sage Weil
6774290ea0 Makefile: fix header name
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-18 16:18:46 -07:00
Sage Weil
7e7a19ba18 Merge pull request #115 from ceph/wip-4199
Resolves #4199

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-18 15:53:56 -07:00
Joao Eduardo Luis
cecfe411bb mon: Monitor: take advantage of the new HealthMonitor class.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-18 22:43:55 +00:00
Joao Eduardo Luis
b781400f1f mon: HealthMonitor: Keep track of monitor cluster's health
The HealthMonitor builds upon the QuorumService interface, and should be
used to keep track of all and any relevant information about the monitor
cluster (maybe even about all the cluster if need be).

This patch also introduces the HealthService interface, used to define
a HealthMonitor service, responsible for dispatching 'MMonHealth' messages
(the QuorumService interface dispatches generic 'Message').

Based on the HealthService interface, we introduce the DataHealthService
class, a service that will track disk space consumption by the monitors,
warn when a given threshold is crossed, and gracefully shutdown the monitor
if disk space usage hits critical levels that might affect the correct
monitor behavior.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-18 22:43:55 +00:00
Joao Eduardo Luis
a3751d1f42 mon: QuorumService: Allow for services quorum-bound to be easily created
As the monitor grows in features, we have been dumping them in the Monitor
class as they don't really fit anywhere else.

Most of those latest features have been, and some of the future changes
will also be, quorum-bounded.  By that we mean that these features tend
to require a quorum to be present in order to work.

Although we already have the PaxosService interface, it really isn't
adequate for this kind of features, as they don't really require Paxos,
nor do they access the store.  Furthermore, they don't really need to
tick at the same rate as the monitor, and can be fairly independent.

Therefore we now introduce the concept of a QuorumService, a class to be
built upon, managing the tick and dispatch for any kind of service
basically requiring a quorum to function.

Among the already existing monitor features that could take advantage of
this new class we can find the Timecheck infrastructure, as it is by
nature quorum bounded.  The monitor store sync could also take advantage
of this service, although it doesn't really require a quorum to work,
and even the PaxosService-related classes could use this.

This patch also introduces the MMonQuorumService base class, to be used
by any message that should want to.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-18 22:43:55 +00:00
Sage Weil
a2ac9358a3 qa: add 16MB direct-io write test
See bug #2657.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-18 14:13:29 -07:00
Sage Weil
9010b10c54 Merge pull request #113 from dalgaaf/wip-da-performance-3
Iterator related fixes

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-18 13:53:16 -07:00
Sage Weil
717d221cc4 Merge pull request #112 from dalgaaf/wip-da-performance-2-v2
prefer prefix ++/--operator for e.g. iterators for performance reasons

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-18 13:51:57 -07:00
Sage Weil
53c1c4827e signal_handler: add func to queue an async signal
For example, queue a SIGINT without actually sending the signal via the
OS.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-18 13:10:36 -07:00
Sam Lang
a13ae372c0 client: Remove unecessary set_inode() in _rmdir()
With the recent changes in fc80c1dc6e,
we only allow setting the inode once on a MetaRequest.  This triggered
a bug in _rmdir(), where the parent dir inode passed in and being set
on the MetaRequest, and then also setting the dir inode on the MetaRequest.
Removing the set_inode() using the parent dir inode resolves this issue.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-18 12:51:28 -07:00
Danny Al-Gaaf
5e5e1cd45b mon/Session.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 15:00:41 +01:00
Danny Al-Gaaf
ffaf286625 test/filestore/workload_generator.cc: prefer prefix ++operator for iterators
Prefer prefix ++operator for iterator. Move the iterator declaration into
the for-loop header since the iterator isn't used outside the loop.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:39:09 +01:00
Danny Al-Gaaf
37fd66e009 test/filestore/test_idempotent.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:38:49 +01:00
Danny Al-Gaaf
72580516bb test/filestore/test_idempotent.cc: fix ~TestFileStoreState()
Fix interator handling in ~TestFileStoreState(). After std::map::erase()
the used iterator is invalid. Use a while-loop and erase the object with
post-incremented iterator instead.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:34:37 +01:00
Danny Al-Gaaf
80615f6bfe test/test_snap_mapper.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:34:15 +01:00
Danny Al-Gaaf
ed159c4a13 test/osd/RadosModel.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:33:32 +01:00
Danny Al-Gaaf
0535e1f024 test/filestore/TestFileStoreState.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:33:06 +01:00
Danny Al-Gaaf
2a04a9b22a test/xattr_bench.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:32:41 +01:00
Danny Al-Gaaf
28354c0af1 test/osd/Object.cc: prefer prefix --/++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:31:23 +01:00
Danny Al-Gaaf
ed4a0faaac test/encoding/ceph_dencoder.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:30:51 +01:00
Danny Al-Gaaf
a8f6b76095 test/bench/bencher.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:30:23 +01:00
Danny Al-Gaaf
e94cbeee4d ObjectMap/test_object_map.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:29:38 +01:00
Danny Al-Gaaf
f56d4847a2 tools/rest_bench.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:29:00 +01:00
Danny Al-Gaaf
58d07add09 tools/common.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:28:31 +01:00
Danny Al-Gaaf
6ba964f24e ceph-filestore-dump.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:28:07 +01:00
Danny Al-Gaaf
12a44bc2b9 rgw/rgw_user.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:27:43 +01:00
Danny Al-Gaaf
424bce9af5 rgw/rgw_rest_swift.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:26:51 +01:00
Danny Al-Gaaf
360191f973 osd/OSDMap.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:26:19 +01:00
Danny Al-Gaaf
5fe46a3c65 mds/MDCache.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:25:55 +01:00
Danny Al-Gaaf
51a2d78620 mds/CInode.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:25:29 +01:00
Danny Al-Gaaf
d0a1632d50 client/Client.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:24:27 +01:00
Danny Al-Gaaf
c091dcc0d7 auth/AuthMethodList.cc: fix remove_supported_auth()
Make sure the iterator isn't incremented twice if a element gets erased.
Move increment out of the for-loop header and add it to a new else block.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 14:08:22 +01:00
Danny Al-Gaaf
a96a1cc5f1 mds/mdstypes.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 13:03:30 +01:00
Danny Al-Gaaf
3967ce4e39 rgw/rgw_rados.cc: make sure range_iter != ranges.end()
Make sure range_iter is valid, set range_iter = next_iter instead of
++range_iter, since next_iter is already checked against ranges.end() and
is the same as ++range_iter.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:45:15 +01:00
Danny Al-Gaaf
5b8a505906 rados.cc: prefer prefix ++operator for iterators
Prefer prefix ++operator for iterators, move some iterator declaration into
the for-loop header, since the iterator is only used within the loop.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:38 +01:00
Danny Al-Gaaf
006a70db3b rgw/rgw_rados.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:38 +01:00
Danny Al-Gaaf
272ebf3ec1 rgw/rgw_admin.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:38 +01:00
Danny Al-Gaaf
c4cc2e80fc rgw/rgw_acl_s3.cc: prefer prefix ++operator for iterators
Prefer prefix ++operator for iterators, move some iterator declaration into
the for-loop header, since the iterator is only used within the loops.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:38 +01:00
Danny Al-Gaaf
a740eef0fc osdmaptool.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:38 +01:00
Danny Al-Gaaf
d5f607304e osdc/Striper.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:37 +01:00
Danny Al-Gaaf
4d46efa90e osdc/Objecter.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:37 +01:00
Danny Al-Gaaf
f0ed8c4f4e osdc/ObjectCacher.cc: prefer prefix ++/--operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:37 +01:00
Danny Al-Gaaf
da438aa92b osdc/ObjectCacher.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:37 +01:00
Danny Al-Gaaf
d0df3da85a osdc/Objecter.h: prefer prefix ++operator for iterators
Prefer prefix ++operator for iterators, move one iterator declaration into
the for-loop header, since the iterator is only used within the loop.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:37 +01:00
Danny Al-Gaaf
060d2d57db osdc/Filer.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:35:37 +01:00