Commit Graph

25854 Commits

Author SHA1 Message Date
Joao Eduardo Luis
ba05b16ee2 mon: Monitor: tolerate GV duplicates during conversion
Fixes: #4974

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-05-13 11:37:36 -07:00
Sage Weil
82211f2197 qa: rsync test: exclude /usr/local
Some plana have non-world-readable crap in /usr/local/samba.  Avoid
/usr/local entirely for that and any similar landmines.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-11 17:36:13 -07:00
Samuel Just
fd90105683 Merge branch 'wip_4955' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2013-05-09 22:37:37 -07:00
Samuel Just
7a8d6fd4a0 PG,OSD: delay ops for map prior to queueing in the OpWQ
Previously, we simply queued ops in the OpWQ without checking.  The PG
would then check in do_request whether the message should wait for a new
map.  Unfortunately, this has the side effect that any op requeued for
any reason must also requeue the waiting_for_map queue.

Now, we will check before queueing the op whether it must wait on a map.
To avoid contention, there is now a map_lock which must be held along
with the PG lock in order to update the osdmap_ref.  The map_lock also
protects the waiting_for_map list and queueing PG ops at the back of
the OpWQ.  A few details:
1) It is no longer necessary to requeue waiting_for_map in on_change()
since the other ops are queued at the front.
2) Once waiting_for_map is non-empty, all ops are delayed to simplify
ordering.
3) waiting_for_map may now be non-empty during split, so we must split
waiting_for_map along with waiting_for_active.  This must be done
under the map_lock.

The bug which uncovered this involved an out of order op as follows:

client.4208.0:2378 (e252) arrives, object is degraded
client.4208.0:2379 (e253) arrives, waits for map
client.4208.0:2378 (e252) is requeued after recovery
client.4208.0:2379 (e253) is requeued on map arrival
client.4208.0:2379 is processed
client.4208.0:2378 is processed

Fixes: #4955
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-05-09 17:30:42 -07:00
Samuel Just
e5b2ca88ac PG: rename must_delay_request to op_must_wait_for_map, make static
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-05-08 19:47:32 -07:00
Samuel Just
6c1e479178 mon: dump MonitorDBStore transactions to file
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 797089ef08)
2013-05-08 16:55:06 -07:00
Sage Weil
5a631b852d osd: optionally enable leveldb logging
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 0b4c5c1a33)
2013-05-08 16:55:04 -07:00
Sage Weil
bb4f65ae9c mon: allow leveldb logging
'mon leveldb log = filename'

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c1d5f81554)
2013-05-08 16:55:02 -07:00
Sage Weil
a284c9ece8 common/Preforker: fix warnings
Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-08 16:42:24 -07:00
Gary Lowell
3ebddf17cb debian/control: squeeze requres cryptsetup package
Squeeze requires the cryptsetup package which has been renamed
cryptsetup-bin in later versions.  Allow either package to
satisfy the dependency.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
(cherry picked from commit 83bbae415d)
2013-05-08 16:36:42 -07:00
Samuel Just
52666dc5e6 PG: reassert_lock_with_map_lock_held() is dead
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-05-08 15:47:03 -07:00
Samuel Just
17705d7295 OSD,PG: lock_with_map_lock_held() is the same as lock()
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-05-08 15:46:41 -07:00
Sage Weil
e2528ae42c ceph-create-keys: gracefully handle no data from admin socket
Old ceph-mon (prior to 393c9372f8) would
return an empty string and success if the command was not registered yet.
Gracefully handle that case by retrying.

If we still fail to parse, exit entirely with EINVAL.

Fixes: #4952
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@intank.com>
2013-05-08 14:54:33 -07:00
Sage Weil
f2a54cc9c9 init-ceph: fix osd_data location when checking df utilization
Do not assume default osd data location.

Fixes: #4951
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowelll <gary.lowell@inktank.com>
2013-05-08 14:35:54 -07:00
Samuel Just
61354b21d3 Merge branch 'wip_split_upgrade' into next
Fixes: #4927
2013-05-08 11:14:11 -07:00
Samuel Just
8e89db89cb OSD: handle stray snap collections from upgrade bug
Previously, we failed to clear snap_collections, which causes split to
spawn a bunch of snap collections.  In load_pgs, we now clear any such
snap collections and then snap_collections field on the PG itself.

Related: #4927
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-05-08 11:12:20 -07:00
Samuel Just
252d71a81e PG: clear snap_collections on upgrade
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-05-08 11:12:07 -07:00
Samuel Just
438d9aa152 OSD: snap collections can be ignored on split
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-05-08 11:11:51 -07:00
Sage Weil
393c9372f8 ceph: return error code when failing to get result from admin socket
Make sure we return a non-zero result code when we fail to read something
from the admin socket.

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-08 11:05:29 -07:00
Gary Lowell
e5b25bd36b Merge branch 'next' 2013-05-06 19:51:47 -07:00
Sage Weil
9d85d67e77 os/ObjectStore: add missing break in dump()
CID 751331 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: This case (value 35) is not terminated by a 'break' statement.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-06 17:15:14 -07:00
John Wilkins
298ebdb0f5 doc: Deleted redundant "so that" phrase.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 16:41:08 -07:00
John Wilkins
277f2de93d doc: Corrected typo.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 16:38:41 -07:00
John Wilkins
359bd6df07 doc: Corrected typo. 2013-05-06 16:38:21 -07:00
John Wilkins
2d4b5bd872 Removed comment out of header, and added "coming soon." 2013-05-06 16:37:50 -07:00
John Wilkins
1cfc6e3bd5 doc: Updated usage for push | pull.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 16:37:12 -07:00
Sage Weil
bd36e78f72 osd: make class load errors louder
Fixes: #4639
Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-06 14:34:37 -07:00
Gary Lowell
237f3f1e8d v0.61 2013-05-06 13:18:56 -07:00
Samuel Just
eb69c7df19 os/: default to dio for non-block journals
Workaround: #4910
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-05-06 13:05:01 -07:00
Sage Weil
60603d01e5 ceph-disk: use separate lock files for prepare, activate
Use a separate lock file for prepare and activate to avoid deadlock.  This
didn't seem to trigger on all machines, but in many cases, the prepare
process would take the file lock and later trigger a udev event and the
activate would then block on the same lock, either when we explicitly call
'udevadm settle --timeout=10' or when partprobe does it on our behalf
(without a timeout!).   Avoid this by using separate locks for prepare
and activate.  We only care if multiple activates race; it is
okay for a prepare to be in progress and for an activate to be kicked
off.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-06 12:12:04 -07:00
Danny Al-Gaaf
e662b6140b ceph-test.install: add ceph-monstore-tool and ceph-osdomap-tool
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-06 11:30:37 -07:00
Danny Al-Gaaf
eae02fd34c ceph.spec.in: remove twice listed ceph-coverage
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-06 11:30:18 -07:00
Danny Al-Gaaf
71cef0867b ceph.spec: add some files to ceph
Add installed, but not packaged files to ceph-test (ceph-monstore-tool,
ceph-osdomap-tool) rpm file section.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-06 11:30:02 -07:00
John Wilkins
c5d4302489 doc: Update the usage to reflect optional directory name.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 11:19:33 -07:00
John Wilkins
35acb152ef doc: Rearranged to show zapping multiple disks and creating multiple OSDs.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 11:19:09 -07:00
John Wilkins
8add78cade doc: Moved install to the second step, from the first step.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 10:50:24 -07:00
Gary Lowell
c3ba53d255 Merge pull request #256 from dalgaaf/wip-da-spec-update
Fix ceph.spec.in
2013-05-06 10:28:22 -07:00
Gary Lowell
0200c90352 Merge pull request #257 from dalgaaf/wip-da-fix-debian
ceph-test.install: add ceph-monstore-tool and ceph-osdomap-tool
2013-05-06 10:28:04 -07:00
John Wilkins
6abbe68010 doc: Autonumbering syntax correction.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 10:08:38 -07:00
John Wilkins
efa460c337 doc: Added troubleshooting PGs to the index.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 10:04:29 -07:00
John Wilkins
cddf3b53b8 doc: Commented out osd list for now.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 09:44:31 -07:00
John Wilkins
0c0fc03ec6 doc: Commented out remove a mds for now.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 09:44:13 -07:00
John Wilkins
41eecf4f81 doc: Forwarding link. FAQ migrated to new Ceph wiki.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-05-06 09:43:41 -07:00
Danny Al-Gaaf
3540d90587 ceph-test.install: add ceph-monstore-tool and ceph-osdomap-tool
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-06 15:42:57 +02:00
Danny Al-Gaaf
6f33885111 ceph.spec.in: remove twice listed ceph-coverage
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-06 15:21:56 +02:00
Danny Al-Gaaf
acb60e58e4 ceph.spec: add some files to ceph
Add installed, but not packaged files to ceph-test (ceph-monstore-tool,
ceph-osdomap-tool) rpm file section.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-06 15:09:32 +02:00
Sage Weil
1a67f7b3ac mon: fix init sequence when not daemonizing
We made the common_init_finish and chdir conditional on daemonize in commit
2e0dd5ae6c, breaking init (asok at least)
when -f is specified (as with upstart).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-05-03 16:20:26 -07:00
Sage Weil
3f0b8ec2d4 mon: avoid null deref in Monitor::_mon_status()
mikedawson reports:

*** Caught signal (Segmentation fault) **
 in thread 7f40ce270700

 ceph version 0.60-801-g7ec0151 (7ec0151397)
 1: /usr/bin/ceph-mon() [0x59d550]
 2: (()+0xfbd0) [0x7f40d3e38bd0]
 3: (operator<<(std::ostream&, entity_name_t const&)+0x16) [0x4d7c46]
 4: (operator<<(std::ostream&, entity_inst_t const&)+0x1b) [0x4d837b]
 5: (Monitor::_mon_status(std::ostream&)+0x2ce) [0x4d284e]
 6: (Monitor::do_admin_command(std::string, std::string, std::ostream&)+0x4f) [0x4d652f]
 7: (AdminHook::call(std::string, std::string, ceph::buffer::list&)+0x68) [0x4efa38]
 8: (AdminSocket::do_accept()+0x451) [0x64ab81]
 9: (AdminSocket::entry()+0x398) [0x64c528]
 10: (()+0x7f8e) [0x7f40d3e30f8e]
 11: (clone()+0x6d) [0x7f40d237ae1d]

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-05-03 16:04:31 -07:00
Sage Weil
b2501e91bb ceph.spec: require xfsprogs
This is needed when creating new OSDs (via ceph-disk).  At least for most
people.  Eventually we'll want to include btrfs here.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-03 13:28:24 -07:00
Sage Weil
378eb32801 Merge branch 'next' 2013-05-03 11:36:42 -07:00