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>
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>
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>