Commit Graph

25074 Commits

Author SHA1 Message Date
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
Danny Al-Gaaf
3575feb7d2 ceph-disk: fix adjust_symlink() replace 'journal' with 'target'
Replace 'journal' variable with 'target' since journal doesn't
exist in this function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 14:02:28 +01:00
Danny Al-Gaaf
a27cb85b21 ceph-disk: fix adjust_symlink() replace 'canonical' with 'path'
Replace 'canonical' variable with 'path' since canonical doesn't
exist in this function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 14:01:02 +01:00
Danny Al-Gaaf
6d3247b5c0 ceph-disk: there is no os.path.lstat use os.lstat
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 13:56:23 +01:00
Danny Al-Gaaf
97b4f8d66b ceph-disk: remove unused variable key from prepare_journal_dev()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 13:30:21 +01:00
Danny Al-Gaaf
9daf6cfce2 ceph-disk: fix except to catch OSError
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 13:27:27 +01:00
Danny Al-Gaaf
0ada43f79d ceph-disk: add missing space after >> operator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 13:15:36 +01:00
Danny Al-Gaaf
d3c60dc8ca fix: Redefining name 'uuid' from outer scope (line 14)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 12:33:09 +01:00
Danny Al-Gaaf
6a8120d4b0 ceph-disk: remove unused variables from list_partitions()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 12:17:45 +01:00
Danny Al-Gaaf
3af7a1ac5b ceph-disk: fix /dev/dm-[0-9] handling list_all_partitions()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-20 12:10:22 +01: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
c3404c6236 Merge pull request #119 from dalgaaf/wip-da-ceph-disk
Cleanup and fixes for wip-ceph-disk
2013-03-19 14:17:01 -07:00
Danny Al-Gaaf
9bcf5b64f4 ceph-disk: rename local variable shadowing builtin
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-19 22:07:36 +01:00
Danny Al-Gaaf
4adf088107 ceph-disk: remove twice defined identical function unmount
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-19 22:05:23 +01:00
Danny Al-Gaaf
ea26ea0d81 ceph-disk: remove twice defined function mount
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-19 22:02:49 +01:00
Danny Al-Gaaf
c57daa3c6e ceph-disk: remove double defined function get_conf
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-19 22:00:41 +01:00
Danny Al-Gaaf
57dde5c8b1 ceph-disk: rename local variable shadowing builtin
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-19 21:51:54 +01: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
Sage Weil
c2602d7490 ceph-disk: install and package
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-19 12:52:23 -07:00
Sage Weil
f287c6f90a ceph-disk: simplify command dispatch
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-19 12:52:23 -07:00
Sage Weil
a019753bd3 ceph-disk: consolidate exceptions
Use a single exception type, and catch it at the top level.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-19 12:52:23 -07:00
Sage Weil
20e4ba5ceb ceph-disk: consolidate ceph-disk-* into a single binary
ceph-disk prepare ...
 ceph-disk activate ...
 ceph-disk ...

This let's us share code (we were already duplicating a bunch of stuff!)
and to add new commands easily.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-19 12:52:23 -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