Commit Graph

24872 Commits

Author SHA1 Message Date
Sage Weil
05dac04ba0 mon: 'ceph osd crush add ...' to add a second link to an item
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:36 -07:00
Sage Weil
4e2557a038 crush: allow an item to be inserted twice
Modify insert_item() to let you add an existing item to a new position
in the map.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-21 09:57:19 -07:00
Sage Weil
14f26745cf crush: use const string& args
Compiler will convert const char * to a std::string implicitly.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-21 09:57:19 -07:00
Gary Lowell
d67eee1d11 Merge branch 'next' 2013-03-21 00:40:16 -07:00
Sage Weil
17d4a7c457 doc/release-notes: v0.59
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-20 22:11:15 -07:00
Sage Weil
f21411423b Merge pull request #126 from alram/master
Update Chef deployment documentation

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-20 17:07:11 -07:00
Alexandre Marangone
e485471765 Update Chef deployment documentation
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
2013-03-20 16:49:49 -07:00
Sage Weil
131dce6e8e Merge pull request #124 from ceph/wip-4509
mon: DataHealthService: shutdown mon if failed to obtain disk stats

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-20 16:17:51 -07:00
Joao Eduardo Luis
97fd7b610d mon: DataHealthService: log to derr instead if we're about to shutdown
Otherwise the message would -- or could -- be lost.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-20 20:51:06 +00:00
Joao Eduardo Luis
51d62d325c mon: DataHealthService: shutdown mon if failed to obtain disk stats
Being unable to run a ::statfs() may be a symptom of something bigger.

We want to cleanly shutdown the monitor ASAP if such thing happens.

Fixes: #4509

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-20 20:49:20 +00:00
Sage Weil
06ae519672 Merge pull request #123 from dalgaaf/wip-da-sca-misc-1
Some smaller misc fixes

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-20 10:12:06 -07:00
Danny Al-Gaaf
5bf0331a97 client/Client.cc: handle error if _lookup() fails
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 17:08:42 +01:00
Danny Al-Gaaf
fc41684e99 qa/workunits/direct_io/test_sync_io.c: add proper error handling
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 16:56:03 +01:00
Danny Al-Gaaf
a8a5683e6d test_short_dio_read.c: add proper error handling
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 16:37:37 +01:00
Danny Al-Gaaf
f9c108c798 mds/Locker.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 16:15:06 +01:00
Danny Al-Gaaf
4151630c58 mount/mount.ceph.c: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 16:15:00 +01:00
Sage Weil
45d5544c3f Merge pull request #121 from ceph/wip-4448
mon: Monitor: clearer output on error during attempt to convert store

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-20 06:33:18 -07:00
Joao Eduardo Luis
c29812cdaf mon: Monitor: clearer output on error during attempt to convert store
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-20 13:31:14 +00:00
Gary Lowell
cbae6a435c v0.59 2013-03-19 22:27:13 -07:00
Sage Weil
7e7783971e Merge pull request #106 from ceph/wip-crush
crush: update weights properly for DAG (not tree) maps 

Reviewed-by: caleb miles <caleb.miles@inktank.com>
2013-03-19 14:53:23 -07:00
Sage Weil
b7e2a0d464 Merge pull request #118 from dalgaaf/wip-da-enum
QuorumService.h: use enum instead of static const int

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-19 13:36:12 -07:00
Danny Al-Gaaf
dfb1fbe7eb QuorumService.h: use enum instead of static const int
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-19 21:33:18 +01:00
David Zafman
6a3aa2a2cc Missed adding rados_types.hpp to package
Caused by 3bd48cbbad
feature 4207 implementation

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
(cherry picked from commit e1e2d5d217)
2013-03-19 13:02:00 -07:00
Josh Durgin
2900bf4a05 PendingReleaseNotes: fix typo
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-19 11:42:32 -07:00
Josh Durgin
1597b3e3a1 librbd: optionally wait for a flush before enabling writeback
Older guests may not send flushes properly (i.e. never), so if this is
enabled, rbd_cache=true is safe for them transparently.

Disable by default, since it will unnecessarily slow down newer guest
boot, and prevent writeback caching for things that don't need to send
flushes, like the command line tool.

Refs: #3817
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-19 11:42:27 -07:00
Sage Weil
47f1a94547 Makefile: missing header
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-19 10:39:50 -07:00
Sage Weil
020d1b1610 mon: use enum instead of static const int
This way it compiles.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-19 10:21:52 -07:00
Sage Weil
efc4b1268e mon/Paxos: set state to RECOVERING during restart
This ensures that the paxos state is not active when the PaxosService
restart() methods run right afterwards, and that EAGAIN waiters will get
requeued appropriately.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-19 10:15:41 -07:00
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
bee5046333 mon/PaxosService: handle non-zero return values
If 7aec13f749 we started passing non-zero
return values to these completions; now we have to deal with them
accordingly.

RetryMessage behaves just like the Monitor variant.

Propose and Committed update state but otherwise ignore non-zero
return values.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-18 23:09:51 -07: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