Commit Graph

26852 Commits

Author SHA1 Message Date
Sage Weil
d941363d6e mon: no need to refresh from _active
The refresh is done explicitly by the monitor, independent of the more
fragile PaxosService callbacks.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-19 11:27:03 -07:00
Sage Weil
03014a4ecc mon: remove unnecessary update_from_paxos calls
The refresh() will do this when the state changes; no need to
opportunistically call this method all of the time.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-19 11:27:03 -07:00
Sage Weil
cc339c0731 mon: explicitly refresh_from_paxos() when leveldb state changes
Instead of opportunistically calling each service's update_from_paxos(),
instead explicitly refresh all in-memory state whenever we know the
paxos state may have changed.  This is simpler and less fragile.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-19 11:27:03 -07:00
Sage Weil
fd83bc3f5e client: fix warning
client/Client.cc: In member function 'int Client::_read_sync(Fh*, uint64_t, uint64_t, ceph::bufferlist*)':
warning: client/Client.cc:5831:13: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-19 10:50:49 -07:00
Sage Weil
1a3f0b3c5b Merge branch 'next' 2013-06-19 09:58:54 -07:00
Sage Weil
ded0a5f449 Revert "client: fix warning"
This reverts commit 4a3127f48d75121745f81d1aba723cb7f867f790.

Wrong branch.
2013-06-19 09:58:41 -07:00
Joao Eduardo Luis
5e6dc4ea21 mon: Monitor: make sure we backup a monmap during sync start
First of all, we must find a monmap to backup.  The newest version.

Secondly, we must make sure we back it up before clearing the store.

Finally, we must make sure that we don't remove said backup while
clearing the store; otherwise, we would be out of a backup monmap if the
sync happened to fail (and if the monitor happened to be killed before a
new sync had finished).

This patch makes sure these conditions are met.

Fixes: #5256 (partially)
Backport: cuttlefish

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 21:58:36 -07:00
Joao Eduardo Luis
6284fdce79 mon: Monitor: obtain latest monmap on sync store init
Always use the highest version amongst all the typically available
monmaps: whatever we have in memory, whatever we have under the
MonmapMonitor's store, and whatever we have backed up from a previous
sync.  This ensures we always use the newest version we came across
with.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 21:58:19 -07:00
Joao Eduardo Luis
af5a9861d7 mon: Monitor: don't remove 'mon_sync' when clearing the store during abort
Otherwise, we will end up losing the monmap we backed up when we started
the sync, and the monitor may be unable to start if it is killed or
crashes in-between the sync abort and finishing a new sync.

Fixes: #5256 (partially)
Backport: cuttlefish

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 21:56:53 -07:00
Samuel Just
baa1c86e45 Merge remote-tracking branch 'upstream/wip-log-rewrite-sam'
Fixes: #5232
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 20:55:18 -07:00
Dan Mick
257490335a AuthMonitor: auth export's status message to ss, not ds
This puts it on stderr, not stdout

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-18 15:44:32 -07:00
John Wilkins
75b6c82912 doc: Fixed OpenStack Keystone instruction.
fixes: #5178
2013-06-18 15:14:30 -07:00
Sage Weil
64ee0148a5 ceph.spec: create /var/run on package install
The %ghost %dir ... line will make this get cleaned up but won't install
it.

Reported-by: Derek Yarnell <derek@umiacs.umd.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-06-18 14:51:24 -07:00
John Wilkins
c819dcc26e Merge branch 'master' of https://github.com/ceph/ceph 2013-06-18 14:27:16 -07:00
John Wilkins
97f1322cdb doc: Updated deployment preflight.
fixes: #5266

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-06-18 14:26:30 -07:00
Dan Mick
bb799e6903 test_rados.py: add some tests for mon_command
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 14:23:05 -07:00
Dan Mick
64b4e4a6da rados.py: wrap target in c_char_p()
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 14:22:57 -07:00
Dan Mick
54f74325c7 rados.py: return error strings even if ret != 0
Key rados_free() off returned length, not ret

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 14:22:47 -07:00
Dan Mick
81e73c7a63 ceph.in: pass parsed conffile to Rados constructor
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 14:22:40 -07:00
Dan Mick
2fc8d86445 ceph.in: global var dontsplit should be capitalized
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 14:22:07 -07:00
Samuel Just
38a595bafb FileStore: optionally compact leveldb on mount
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-18 14:18:11 -07:00
Sage Weil
4a3127f48d client: fix warning
signed/unsigned comparison

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-18 14:09:18 -07:00
Samuel Just
efcf6265bc FileStore::lfn_open: don't call get_index under fdcache_lock
lfn_open() is called with indexes locked, so we cannot lock
and index under fdcache_lock.

Fixes: #5389
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-18 13:20:37 -07:00
Sage Weil
ce7b5ea7d5 common/Preforker: fix warning
common/Preforker.h: In member function ‘int Preforker::signal_exit(int)’:
warning: common/Preforker.h:82:45: ignoring return value of ‘ssize_t safe_write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]

This is harder than it should be to fix.  :(
  http://stackoverflow.com/questions/3614691/casting-to-void-doesnt-remove-warn-unused-result-error

Whatever, I guess we can do something useful with this return value.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-06-18 10:03:03 -07:00
Sage Weil
8bd936f077 client: fix warning
client/Client.cc: In member function 'virtual void Client::ms_handle_remote_reset(Connection*)':
warning: client/Client.cc:7892:9: enumeration value 'STATE_NEW' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_OPEN' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_CLOSED' not handled in switch [-Wswitch]

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-06-18 10:02:45 -07:00
Samuel Just
6b52acc850 config.h: ensure U64 option defaults are computed as 64 bits
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-06-18 09:37:10 -07:00
Sage Weil
5e9a0a140a Merge branch 'next' 2013-06-17 19:55:55 -07:00
Sage Weil
df8a3e5591 client: handle reset during initial mds session open
If we get a reset during our attempt to open an MDS session, close out the
Connection* and retry to open the session, moving the waiters over.

Fixes: #5379
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-06-17 19:54:51 -07:00
Sage Weil
92997a49bf mon: fix 'osd dump <epoch>'
The optional epoch argument was missing from the command spec.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-06-17 16:39:30 -07:00
Sage Weil
910af074fc Merge branch 'wip-5194' into next
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-06-17 15:46:47 -07:00
Sage Weil
8c6b24e903 ceph-disk: add some notes on wth we are up to
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-17 15:43:40 -07:00
Samuel Just
29eb333bce test/osd/TestPGLog: %s/dirty()/is_dirty()
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
f164a325e5 PGLog: check for dirty_to != eversion_t() and dirty_from != eversion_t::max()
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
c6dd60db8c PGLog: rename dirty() to is_dirty()
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
2ad319be78 PGLog: only iterate over dirty portions of the log
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
962b64a830 PGLog,PG: use normal log dirtying and writing for append and trim
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
9b6cb63931 PGLog: add debug check on written keys, verify on write
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
abac4eab50 test/osd/TestPGLog: fix pglog unittests for dirty_log and ondisklog
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
6dd95c8619 PG,PGLog: remove dirty_log arguments
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
b16fdf23e5 PGLog: replace dirty_log with mark_dirty_*
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
f35bc02591 PG: move instances of log dirtying in PG into PGLog
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:53 -07:00
Samuel Just
d77c4ffa53 PGLog: track dirty_to and dirty_from for log
This allows the log to only write out/clear the keys
which have actually changed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Samuel Just
fb88873cd5 osd_types: move code for pg_log_entry_t::get_key_name into eversion_t
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Samuel Just
b73aa30e47 PGLog: remove OndiskLog
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Samuel Just
ca1637ff87 PGLog: remove other ondisklog references
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Samuel Just
a9a41bc0db PGLog: pass only divergent_priors, not ondisklog
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Samuel Just
7bc43055a6 PG: remove ondisklog usages from PG
ondisklog is now only relevant for the divergent priors mapping.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Sage Weil
53e1fda0c7 FileStore: add rmkeyrange
Handling it in DBObjectMap really only has efficiency
advantages if the object is a clone.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Samuel Just
39245319ef PGLog: clear missing on backfill reset
When backfill is reset, the missing set should be cleared
since all objects are >last_backfill.

Fixes: #5320
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-17 14:50:52 -07:00
Samuel Just
47ce702ce6 *: always include rados.h using types.h
types.h redefines __le* to ceph_le* to ensure endian
safety.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-06-17 14:20:53 -07:00