]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agov0.56 v0.56
Gary Lowell [Tue, 1 Jan 2013 01:10:11 +0000 (17:10 -0800)]
v0.56

12 years agoMerge remote-tracking branch 'gh/wip-rbd-unprotect' into next
Sage Weil [Sun, 30 Dec 2012 23:29:37 +0000 (15:29 -0800)]
Merge remote-tracking branch 'gh/wip-rbd-unprotect' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: fix rbd permissions for unprotect
Josh Durgin [Sun, 30 Dec 2012 07:57:01 +0000 (23:57 -0800)]
doc: fix rbd permissions for unprotect

Unprotect examines all pools, so use blanket x before 0.54. After
that, use class-read restricted by object_prefix to rbd_children.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: fix race between unprotect and clone
Josh Durgin [Sun, 30 Dec 2012 04:35:15 +0000 (20:35 -0800)]
librbd: fix race between unprotect and clone

Clone needs to actually re-read the header to make sure the image is
still protected before returning. Additionally, it needs to consider
the image protected *only* if the protection status is protected -
unprotecting does not count. I thought I'd already fixed this, but
can't find the commit.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: open (source) image as read-only
Josh Durgin [Sun, 30 Dec 2012 04:26:57 +0000 (20:26 -0800)]
rbd: open (source) image as read-only

This allows users without write access to copy, export and list
information about an image.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: open parent as read-only during clone
Josh Durgin [Sat, 29 Dec 2012 06:13:37 +0000 (22:13 -0800)]
librbd: open parent as read-only during clone

We never write to the parent, and don't need to watch it during this process.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: add {rbd_}open_read_only()
Josh Durgin [Sat, 29 Dec 2012 00:54:51 +0000 (16:54 -0800)]
librbd: add {rbd_}open_read_only()

Since 58890cfad5f7bee933baa599a68e6c65993379d4, regular {rbd_}open()
would fail with -EPERM if the user did not have write access to the
pool, since a watch on the header was requested.

For many uses of read-only access, establishing a watch is not
necessary, since changes to the header do not matter. For example,
getting metadata about an image via 'rbd info' does not care if a new
snapshot is created while it is in progress.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoOSD: remove RD flag from CALL ops
Josh Durgin [Sat, 29 Dec 2012 03:47:09 +0000 (19:47 -0800)]
OSD: remove RD flag from CALL ops

20496b8d2b2c3779a771695c6f778abbdb66d92a forgot to do this. Without
this change, all class methods required regular read permission in
addition to class-read or class-write.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agocls_rbd: get_children does not need write permission
Josh Durgin [Sat, 29 Dec 2012 03:44:36 +0000 (19:44 -0800)]
cls_rbd: get_children does not need write permission

This prevented a read-only user from being able to unprotect a
snapshot without write permission on all pools. This was masked before
by the CLS_METHOD_PUBLIC flag.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoinit-ceph: ok, 8K files
Sage Weil [Sat, 29 Dec 2012 01:12:06 +0000 (17:12 -0800)]
init-ceph: ok, 8K files

16K might be a bit many.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: remove broken cephs signing requirement check
Sage Weil [Fri, 28 Dec 2012 00:01:49 +0000 (16:01 -0800)]
msg/Pipe: remove broken cephs signing requirement check

Remove the special-case check, which does not inform the peer what
protocol features are missing.  It also enforces this requirement even
when we negotiate auth none.

Reported as part of bug #3657.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: include remote socket addr in debug output
Sage Weil [Sat, 29 Dec 2012 00:00:47 +0000 (16:00 -0800)]
msg/Pipe: include remote socket addr in debug output

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: allow RecoveryDone self-transition in RepNotRecovering
Sage Weil [Fri, 28 Dec 2012 19:34:47 +0000 (11:34 -0800)]
osd: allow RecoveryDone self-transition in RepNotRecovering

In a mixed cluster where some OSDs support the recovery reservations and
some don't, the replica may be new code in RepNotRecoverying and will
complete a backfill.  In that case, we want to just stayin
RepNotRecovering.

It may also be possible to make it infer what the primary is doing even
thought it is not sending recovery reservation messages, but this is much
more complicated and doesn't accomplish much.

Fixes: #3689
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: less noise about inefficient tmap updates
Sage Weil [Fri, 28 Dec 2012 20:34:15 +0000 (12:34 -0800)]
osd: less noise about inefficient tmap updates

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoinit-ceph: default to 16K max_open_files
Sage Weil [Fri, 28 Dec 2012 20:11:55 +0000 (12:11 -0800)]
init-ceph: default to 16K max_open_files

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: disable ops and usage logging by default
Sage Weil [Thu, 27 Dec 2012 21:27:46 +0000 (13:27 -0800)]
rgw: disable ops and usage logging by default

Most users don't need this, and having it on will just fill their clusters
with objects that will need to be cleaned up later.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agojava: remove deprecated libcephfs
Noah Watkins [Thu, 27 Dec 2012 20:06:02 +0000 (12:06 -0800)]
java: remove deprecated libcephfs

Removes ceph_set_default_*

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoinit-ceph: fix status version check across machines
Sage Weil [Fri, 28 Dec 2012 00:06:24 +0000 (16:06 -0800)]
init-ceph: fix status version check across machines

The local state isn't propagated into the backtick shell, resulting in
'unknown' for all remote daemons.  Avoid backticks altogether.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: fix recovery assert for pg repair case
Sage Weil [Wed, 26 Dec 2012 23:27:07 +0000 (15:27 -0800)]
osd: fix recovery assert for pg repair case

In the case of PG repair, this assert is not valid.  Disable it for now.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodropping xfs test 186 due to bug: 3685
tamil [Thu, 27 Dec 2012 19:27:31 +0000 (11:27 -0800)]
dropping xfs test 186 due to bug: 3685

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoosd: drop 'osd recovery max active' back to previous default (5)
Sage Weil [Thu, 27 Dec 2012 19:12:33 +0000 (11:12 -0800)]
osd: drop 'osd recovery max active' back to previous default (5)

Having this too large means that queues get too deep on the OSDs during
backfill and latency is very high.  In my tests, it also meant we generated
a lot of slow recovery messages just from the recovery ops themselves (no
client io).

Keeping this at the old default means we are no worse in this respect than
argonaut, which is a safe position to start from.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agojournal: reduce journal max queue size
Sage Weil [Thu, 27 Dec 2012 19:11:08 +0000 (11:11 -0800)]
journal: reduce journal max queue size

Keep the journal queue size smaller than the filestore queue size.

Keeping this small also means that we can lower the latency for new
high priority ops that come into the op queue.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: fix dup failure cancellations
Sage Weil [Sun, 23 Dec 2012 23:17:12 +0000 (15:17 -0800)]
osd: fix dup failure cancellations

If we had a pending failure report, and send a cancellation, take it
out of our pending list so that we don't keep resending cancellations.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: make MOSDFailure output more sensible
Sage Weil [Sun, 23 Dec 2012 23:16:06 +0000 (15:16 -0800)]
osd: make MOSDFailure output more sensible

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: make osd failure report log msgs sensible
Sage Weil [Sun, 23 Dec 2012 23:11:39 +0000 (15:11 -0800)]
mon: make osd failure report log msgs sensible

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-scrub' into next
Sage Weil [Sun, 23 Dec 2012 22:42:51 +0000 (14:42 -0800)]
Merge branch 'wip-scrub' into next

Reviewed-by: Sage Weil <sage@inktank.com>
Conflicts:
src/osd/PG.cc

12 years agomonclient: fix get_monmap_privately retry interval
Sage Weil [Sun, 23 Dec 2012 21:29:08 +0000 (13:29 -0800)]
monclient: fix get_monmap_privately retry interval

Use mon_client_hunt_interval (default 3) instead of hardcoding 1 second.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: fix 'base' rule
Sage Weil [Sun, 23 Dec 2012 04:56:45 +0000 (20:56 -0800)]
Makefile: fix 'base' rule

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoinit-ceph,mkcephfs: default inode64 for mounting xfs
Sage Weil [Sun, 23 Dec 2012 19:18:45 +0000 (11:18 -0800)]
init-ceph,mkcephfs: default inode64 for mounting xfs

According to hch this is now the default or new kernels.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoinit-ceph: default osd_data path
Sage Weil [Sat, 22 Dec 2012 19:10:03 +0000 (11:10 -0800)]
init-ceph: default osd_data path

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoOSD: always do a deep scrub when repairing
Samuel Just [Sat, 22 Dec 2012 01:21:59 +0000 (17:21 -0800)]
OSD: always do a deep scrub when repairing

Otherwise, errors turned up in a deep-scrub will be
swept under the rug without being repaired.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: don't use a self-transition for WaitRemoteRecoveryReserved
Samuel Just [Sat, 22 Dec 2012 00:51:40 +0000 (16:51 -0800)]
PG: don't use a self-transition for WaitRemoteRecoveryReserved

Previously, using the state on active worked, but now we might
go back through WaitRemoteRecoveryReserved without resetting
Active.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: Handle repair once in scrub_finish
Samuel Just [Fri, 21 Dec 2012 23:39:50 +0000 (15:39 -0800)]
PG: Handle repair once in scrub_finish

We don't want to change missing sets during a chunky
scrub since it would cause !is_clean() and derail
the rest of the scrub.  Instead, move the missing,
inconsistent, and authoritative sets into scrubber
and add to during scrub_compare_maps().  Then,
handle repairing objects all at once in scrub_finish().

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoimport_export.sh: sparse import export
Dan Mick [Fri, 21 Dec 2012 03:53:07 +0000 (19:53 -0800)]
import_export.sh: sparse import export

Add tests for:
   - sparse import makes expected sparse images
   - sparse export makes expected sparse files
   - sparse import from stdin also creates sparse images
   - import from partially-sparse file leads to partially-sparse image
   - import from stdin with zeros leads to sparse
   - export from zeros-image to file leads to sparse file

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: harder-working sparse import from stdin
Dan Mick [Sat, 8 Dec 2012 06:57:06 +0000 (22:57 -0800)]
rbd: harder-working sparse import from stdin

Try to accumulate image-sized blocks when importing from stdin, even if
each read is shorter than requested; if we get a full block, and it's
all zeroes, we can seek and make a sparse output file

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorbd: check for all-zero buf in export, seek output if so
Dan Mick [Thu, 20 Dec 2012 22:00:12 +0000 (14:00 -0800)]
rbd: check for all-zero buf in export, seek output if so

Use buf_is_zero in common/util.cc

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: move buf_is_zero() to new common/util.cc and include/util.h
Dan Mick [Thu, 20 Dec 2012 21:58:55 +0000 (13:58 -0800)]
librbd: move buf_is_zero() to new common/util.cc and include/util.h

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoosd: fix pg stat msgs vs timeout
Sage Weil [Sat, 22 Dec 2012 00:47:50 +0000 (16:47 -0800)]
osd: fix pg stat msgs vs timeout

We can get a pattern like so:

- new mon session
- after say 120 seconds, we decide to send a stats msg
- outstanding_pg_stats is finally true, we immediately time out (30 second
  grace), and reconnect to a new mon
-> repeat

The problem is that we don't reset the last_sent timestamp when we send.
Or that we do this check after sending instead of before.  Fix both.

This should resolve the issue #3661 where osds that don't have pgs
updating are not stats messags to the mon to check in, and are eventually
getting marked down as a result.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoPG::scrub_compare_maps increment scrubber.fixed for missing repairs
Samuel Just [Fri, 21 Dec 2012 23:20:22 +0000 (15:20 -0800)]
PG::scrub_compare_maps increment scrubber.fixed for missing repairs

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG::_compare_scrubmaps: increment scrubber.errors on missing object
Samuel Just [Fri, 21 Dec 2012 23:16:19 +0000 (15:16 -0800)]
PG::_compare_scrubmaps: increment scrubber.errors on missing object

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agomkcephfs: error out if 'devs' defined but 'osd fs type' not defined
Sage Weil [Fri, 21 Dec 2012 22:23:14 +0000 (14:23 -0800)]
mkcephfs: error out if 'devs' defined but 'osd fs type' not defined

We can infer btrfs if they use btrfs devs, but if they use devs there is
no default fs.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-scrub' into next
Sage Weil [Fri, 21 Dec 2012 21:56:16 +0000 (13:56 -0800)]
Merge remote-tracking branch 'gh/wip-scrub' into next

12 years agoMerge remote-tracking branch 'gh/wip-3643' into next
Sage Weil [Fri, 21 Dec 2012 21:45:39 +0000 (13:45 -0800)]
Merge remote-tracking branch 'gh/wip-3643' into next

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomonc: only warn about missing keyring if we fail to authenticate
Sage Weil [Fri, 21 Dec 2012 21:44:19 +0000 (13:44 -0800)]
monc: only warn about missing keyring if we fail to authenticate

This avoids the situation where a librados or other user with the default
of 'cephx,none' and no keyring is authenticating against a cluster with
required of 'none' and an annoying warning is generated every time.  Now
we only print a helpful message if we actually failed.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: clear CLEAN on exit from Clean state
Sage Weil [Fri, 21 Dec 2012 19:44:35 +0000 (11:44 -0800)]
osd: clear CLEAN on exit from Clean state

This means we can drop the scrub repair state_clear() call.  We probably
can drop others, but lets leave that for another day.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoauth: use none auth if keyring not found
Yehuda Sadeh [Fri, 21 Dec 2012 20:14:40 +0000 (12:14 -0800)]
auth: use none auth if keyring not found

If both cephx and none are accepted auth methods, and
cephx keyring cannot be found then resort to using
none, instead of failing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoPG::sched_scrub: only set PG_STATE_DEEP_SCRUB once reserved
Samuel Just [Fri, 21 Dec 2012 19:36:04 +0000 (11:36 -0800)]
PG::sched_scrub: only set PG_STATE_DEEP_SCRUB once reserved

Otherwise we would have +DEEP before we have +SCRUB.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG::sched_scrub: return true if scrub newly kicked off
Samuel Just [Fri, 21 Dec 2012 19:33:45 +0000 (11:33 -0800)]
PG::sched_scrub: return true if scrub newly kicked off

The previous return value wasn't really what OSD::sched_scrub
wanted to know.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: allow transition from Clean -> WaitLocalRecoveryReserved for repair
Sage Weil [Fri, 21 Dec 2012 19:37:48 +0000 (11:37 -0800)]
osd: allow transition from Clean -> WaitLocalRecoveryReserved for repair

If we do a scrub repair, we need to go from clean to recovery again to
copy objects around.

This fixes a simple repair of a missing object, either on the primary or
replica.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPG: in sched_scrub() set PG_STATE_DEEP_SCRUB not scrubber.deep
Samuel Just [Fri, 21 Dec 2012 19:17:23 +0000 (11:17 -0800)]
PG: in sched_scrub() set PG_STATE_DEEP_SCRUB not scrubber.deep

scrubber.deep gets reset in scrub() to match
state_test(PG_STATE_DEEP_SCRUB).

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: clear scrub state if queued scrub doesn't start
Sage Weil [Fri, 21 Dec 2012 06:01:34 +0000 (22:01 -0800)]
osd: clear scrub state if queued scrub doesn't start

We set SCRUBBING when we queue a pg for scrub.  If we dequeue and
call scrub() but abort for some reason (!active, degraded, etc.), clear
that state bit.

Bug is easily reproduced with 'ceph osd scrub N' during cluster startup
when PGs are peering; some PGs can get left in the scrubbing state.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: only dec_scrubs_active if we were active
Sage Weil [Fri, 21 Dec 2012 05:45:09 +0000 (21:45 -0800)]
osd: only dec_scrubs_active if we were active

This fixes a bug that puts scrubs_active negative.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: reintroduce inc_scrubs_active helper
Sage Weil [Fri, 21 Dec 2012 05:44:34 +0000 (21:44 -0800)]
osd: reintroduce inc_scrubs_active helper

This mostly generates nice debug output.  It also slightly simplifies
code and makes things symmetric.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'upstream/wip_notify' into next
Samuel Just [Fri, 21 Dec 2012 00:23:23 +0000 (16:23 -0800)]
Merge remote-tracking branch 'upstream/wip_notify' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agocephtool: mention ceph osd ls, fix ceph osd tell N bench
Dan Mick [Thu, 20 Dec 2012 23:31:21 +0000 (15:31 -0800)]
cephtool: mention ceph osd ls, fix ceph osd tell N bench

Add ceph osd ls to help; make help for ceph osd tell N bench look
more like injectargs, which says <osd-id or *> to make it clear you
can benchmark all osds simultaneously

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agorgw: remove noisy log message
Yehuda Sadeh [Thu, 20 Dec 2012 23:32:59 +0000 (15:32 -0800)]
rgw: remove noisy log message

No need for that log message.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix daemonize initialization
Yehuda Sadeh [Thu, 20 Dec 2012 23:21:48 +0000 (15:21 -0800)]
rgw: fix daemonize initialization

Just call the common daemonize function. Otherwise we end up
not initializng stdout / stderr correctly.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agolog: fix flush/signal race
Sage Weil [Thu, 20 Dec 2012 21:48:06 +0000 (13:48 -0800)]
log: fix flush/signal race

We need to signal the cond in the same interval where we hold the lock
*and* modify the queue.  Otherwise, we can have a race like:

 queue has 1 item, max is 1.
 A: enter submit_entry, signal cond, wait on condition
 B: enter submit_entry, signal cond, wait on condition
 C: flush wakes up, flushes 1 previous item
 A: retakes lock, enqueues something, exits
 B: retakes lock, condition fails, waits
  -> C is never woken up as there are 2 items waiting

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoReplicatedPG::remove_notify : don't leak the notify object
Samuel Just [Thu, 20 Dec 2012 21:29:09 +0000 (13:29 -0800)]
ReplicatedPG::remove_notify : don't leak the notify object

Following remove_notify, there are no other references to
notif, delete it.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD,ReplicatedPG: do not track notifies on the session
Samuel Just [Thu, 20 Dec 2012 21:23:27 +0000 (13:23 -0800)]
OSD,ReplicatedPG: do not track notifies on the session

handle_notify_timeout and remove_notify currently do not clean up this
state leaving dangling Notification*.  Further, we only use this mapping
in unwatch in order to determine which notifies to update. We can
accomplish the same thing by iterating through the obc->notifs mapping
since all notifications relevant for a given watch would have been for
the same obc as the watch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-cephtool' into next
Sage Weil [Thu, 20 Dec 2012 19:04:29 +0000 (11:04 -0800)]
Merge remote-tracking branch 'gh/wip-cephtool' into next

12 years agoMerge branch 'wip-build-fixes' into next
Sage Weil [Thu, 20 Dec 2012 18:49:34 +0000 (10:49 -0800)]
Merge branch 'wip-build-fixes' into next

12 years agorgw: configurable exit timeout
Yehuda Sadeh [Tue, 18 Dec 2012 21:53:09 +0000 (13:53 -0800)]
rgw: configurable exit timeout

Fixes: #3638
rgw exit timeout secs : number of seconds to wait for process
to exit cleanly before forcing exit. If set to 0, it'l wait
indefinitely.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: don't try to assign content type if not found
Yehuda Sadeh [Wed, 19 Dec 2012 18:21:57 +0000 (10:21 -0800)]
rgw: don't try to assign content type if not found

Fixes: #3648
Cannot assign a NULL pointer into stl string. This is only
relevant to swift, when uploading an object without specifying
content type, and when the suffix cannot be determined.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-crushtool' into next
Sage Weil [Thu, 20 Dec 2012 16:53:19 +0000 (08:53 -0800)]
Merge remote-tracking branch 'gh/wip-crushtool' into next

Reviewed-by: Caleb Miles <caleb.miles@inktank.com>
12 years agorgw: don't initialize keystone if not set up
Yehuda Sadeh [Thu, 20 Dec 2012 00:59:43 +0000 (16:59 -0800)]
rgw: don't initialize keystone if not set up

Fixes: #3653
No need to initialize keystone, including the keystone
revocation thread which was verbose if key stone was
not set up. This removes some unuseful errors from the
log.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: remove useless configurable, fix swift auth error handling
Yehuda Sadeh [Wed, 19 Dec 2012 22:34:53 +0000 (14:34 -0800)]
rgw: remove useless configurable, fix swift auth error handling

Fixes: #3649
No need to have an extra configurable to use keystone. Use keystone
whenever keystone url has been specified. Also, fix a bad error
handling that turned a failure to authenticate into successfully
authenticating a bad user.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge remote-tracking branch 'upstream/wip_pg_temp' into next
Samuel Just [Thu, 20 Dec 2012 00:50:11 +0000 (16:50 -0800)]
Merge remote-tracking branch 'upstream/wip_pg_temp' into next

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
12 years agoOSDMonitor: remove temp pg mappings with no up pgs
Samuel Just [Wed, 19 Dec 2012 18:33:40 +0000 (10:33 -0800)]
OSDMonitor: remove temp pg mappings with no up pgs

Otherwise, the pg won't be validly mapped until one of the temp
pgs comes back up.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSDMap: make apply_incremental take a const argument
Samuel Just [Wed, 19 Dec 2012 18:32:52 +0000 (10:32 -0800)]
OSDMap: make apply_incremental take a const argument

This requires us to copy bufferlists in two cases since bufferlist
does not have a const interator at this time.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agocephtool: add qa workunit
Sage Weil [Wed, 19 Dec 2012 16:37:42 +0000 (08:37 -0800)]
cephtool: add qa workunit

A few basic sanity checks, including a tell on a down osd.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph.spec.in: Improve finding location of jni.h for sles11.
Gary Lowell [Wed, 19 Dec 2012 05:00:15 +0000 (21:00 -0800)]
ceph.spec.in:  Improve finding location of jni.h for sles11.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoosd: implement 'version' tell command
Sage Weil [Wed, 19 Dec 2012 04:08:42 +0000 (20:08 -0800)]
osd: implement 'version' tell command

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph.spec.in: Add packages for libcephfs-jni and libcephfs-java
Gary Lowell [Wed, 19 Dec 2012 03:40:32 +0000 (19:40 -0800)]
ceph.spec.in:  Add packages for libcephfs-jni and libcephfs-java

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoceph: report error string to stderr, not stdout
Sage Weil [Wed, 19 Dec 2012 03:21:24 +0000 (19:21 -0800)]
ceph: report error string to stderr, not stdout

If we return an error, send the message to stderr.  This makes things
more easily scriptable because error messages won't take the place of
expected output.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph: fix error reporting when tell target is invalid or down
Sage Weil [Wed, 19 Dec 2012 03:20:06 +0000 (19:20 -0800)]
ceph: fix error reporting when tell target is invalid or down

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: 'ceph osd ls'
Sage Weil [Wed, 19 Dec 2012 03:11:49 +0000 (19:11 -0800)]
mon: 'ceph osd ls'

List osd ids that exist.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoOSDMap::dump: tag pg_temp mappings with pgid
Samuel Just [Wed, 19 Dec 2012 00:50:24 +0000 (16:50 -0800)]
OSDMap::dump: tag pg_temp mappings with pgid

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agocrushtool: nicer error message on extra args
Sage Weil [Mon, 17 Dec 2012 22:44:35 +0000 (14:44 -0800)]
crushtool: nicer error message on extra args

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocrushtool: only dump usage on -h|--help
Sage Weil [Mon, 17 Dec 2012 19:21:55 +0000 (11:21 -0800)]
crushtool: only dump usage on -h|--help

Instead, output a useful error message.

Fix error code to be a success.

Add test for the output usage.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/testing' into next
Sage Weil [Tue, 18 Dec 2012 00:51:20 +0000 (16:51 -0800)]
Merge remote-tracking branch 'gh/testing' into next

12 years agoceph.spec.in: Update pre-reqs for ceph-fuse pacakge.
Gary Lowell [Tue, 18 Dec 2012 00:38:19 +0000 (16:38 -0800)]
ceph.spec.in:  Update pre-reqs for ceph-fuse pacakge.

12 years agoRevert "objecter: don't use new tid when retrying notifies"
Sage Weil [Tue, 18 Dec 2012 00:29:19 +0000 (16:29 -0800)]
Revert "objecter: don't use new tid when retrying notifies"

This reverts commit c3107009f66bc06b5e14c465142e14120f9a4412.

This appears to be causing problems in the objecter by corrupting
the stack.  Until that is resolved, let's revert.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: OSDMonitor: add option 'mon_max_pool_pg_num' and limit 'pg_num' accordingly
Joao Eduardo Luis [Mon, 17 Dec 2012 18:58:16 +0000 (18:58 +0000)]
mon: OSDMonitor: add option 'mon_max_pool_pg_num' and limit 'pg_num' accordingly

Instead of having a hardcoded default, use a configurable one. It is
limited to 65536 until future testing guarantees there is no side-effects
of increasing it past this value, but by being adjustable the user still
has the freedom to specify whatever maximum value he wants.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agocrushtool: add --set-chooseleaf-descend-once to help
Sage Weil [Mon, 17 Dec 2012 19:14:44 +0000 (11:14 -0800)]
crushtool: add --set-chooseleaf-descend-once to help

We forgot to update this in 88f218181a9e6d2292e2697fc93797d0f6d6e5dc.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefiles: Two new packages needed in the debian build depdencies.
Gary Lowell [Sun, 16 Dec 2012 06:38:58 +0000 (22:38 -0800)]
Makefiles:  Two new packages needed in the debian build depdencies.

The ceph test programs that are now being built by default require the junit
and libboost-program-options packages.  These have been added to the build
dependecies in the debian control file.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoRefactor rule file to separate arch/indep builds.
James Page [Wed, 12 Dec 2012 22:06:16 +0000 (22:06 +0000)]
Refactor rule file to separate arch/indep builds.

Prior to the ceph fs java bindings, all packages where
architecture depdendent so the packaging rules file
worked OK; this fixes up the binary-indep/arch targets
to split the builds of architecture dependent and
independent files.

Signed-off-by: James Page <james.page@ubuntu.com>
12 years agoosdc/Objecter: prevent pool dne check from invalidating scan_requests iterator
Sage Weil [Sun, 16 Dec 2012 01:45:25 +0000 (17:45 -0800)]
osdc/Objecter: prevent pool dne check from invalidating scan_requests iterator

We iterate over ops and, if the pool dne and other conditions are true,
we will immediately return ENOENT and cancel an op.  Increment the
iterator at the top of the loop to avoid invalidating it.

We also need to switch to a map<>, because hash_map<> mutations may
invalidate any/all iterators.

Fixes: #3613
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoqa: add a workunit for fsync-tester
Greg Farnum [Fri, 14 Dec 2012 22:34:35 +0000 (14:34 -0800)]
qa: add a workunit for fsync-tester

It turns out that our suites don't exercise fsync, at least not very much
(I couldn't find it in all the places I looked for it). This tester
was written by Ted T'so and updated by Chris Mason; I just made it
work on a smaller dataset (256MB) because 8GB against a small cluster takes
more time than we want to wait.

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agotest: remove underscores from cephfs test names
Noah Watkins [Wed, 28 Nov 2012 19:49:53 +0000 (11:49 -0800)]
test: remove underscores from cephfs test names

Google Test documentation strongly suggests avoiding underscores from
unit test names to avoid accidental conflicts with their macro naming
scheme.

http://code.google.com/p/googletest/wiki/FAQ#Why_should_not_test_case_names_and_test_names_contain_underscore

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'wip_watch' into next
Sage Weil [Fri, 14 Dec 2012 22:32:44 +0000 (14:32 -0800)]
Merge branch 'wip_watch' into next

12 years agolockdep: Decrease lockdep backtrace skip by 1
Sam Lang [Fri, 14 Dec 2012 03:22:37 +0000 (17:22 -1000)]
lockdep:  Decrease lockdep backtrace skip by 1

Skipping the top 4 (it starts at 0) calls in the
backtrace actually skips the call that does the lock.
Skip 3 instead.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomkcephfs: fix == -> =
Sage Weil [Fri, 14 Dec 2012 22:16:31 +0000 (14:16 -0800)]
mkcephfs: fix == -> =

Another bashism.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomap-unmap.sh: use udevadm settle for synchronization
Alex Elder [Fri, 14 Dec 2012 21:58:39 +0000 (15:58 -0600)]
map-unmap.sh: use udevadm settle for synchronization

This script was heuristically using short sleep commands in order to
give udev activity time to complete.

There's a command "udevadm settle" which actually looks at the udev
queue and waits until its processing is done.  Much, much better.

This rearranges the get_id function a bit too, breaking it into one
function that gets the id and another that loops back and tries
again after a short delay in the event the get_id fails.

Signed-off-by: Alex Elder <elder@inktank.com>
12 years agoMerge branch 'wip-upstart' into next
Sage Weil [Fri, 14 Dec 2012 21:51:19 +0000 (13:51 -0800)]
Merge branch 'wip-upstart' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoceph-disk-activate: mark dir as upstart-managed
Sage Weil [Fri, 14 Dec 2012 21:49:14 +0000 (13:49 -0800)]
ceph-disk-activate: mark dir as upstart-managed

Mark the directory so that upstart will manage the daemon.  Eventually,
this should be generalized to allow ceph-disk-* usage with other init
systems.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: make starter jobs consistent
Sage Weil [Fri, 14 Dec 2012 21:40:58 +0000 (13:40 -0800)]
upstart: make starter jobs consistent

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart: only start when 'upstart' file exists in daemon dir
Sage Weil [Fri, 14 Dec 2012 21:40:25 +0000 (13:40 -0800)]
upstart: only start when 'upstart' file exists in daemon dir

We need to distinguish between daemons managed by upstart and sysvinit
(and, eventually, systemd).  Only start daemons when 'upstart' is present.

Note that sysvinit will only start daemons when the 'host = ...' line is
in ceph.conf, so there is a similar "opt-in".

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoReplicatedPG: use default priority for Backfill messages
Samuel Just [Fri, 14 Dec 2012 20:46:43 +0000 (12:46 -0800)]
ReplicatedPG: use default priority for Backfill messages

Backfill messages modify the stats on the replica and therefore
must be sent with the same priority as sub_op_modify to ensure
ordering.  Using recovery_op_priority caused the following
sequence:

1) Primary(1) sends MOSDPGBackfill FINISH with updated stats (v1)
2) Primary(1) sends SubOp modify for new client op with stats (v2)
3) Replica(2) receives SubOp with stats (v2)
4) Replica(2) receives MOSDPGBackfill FINISH with stats (v1)
5) Replica(2) responds and Primary(1) resets pgtemp making
    Replica(2) Primary(2)
6) PG stats on Primary(2) several ops old.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoReplicatedPG: do not use priority from client op
Samuel Just [Fri, 14 Dec 2012 20:43:08 +0000 (12:43 -0800)]
ReplicatedPG: do not use priority from client op

There are internal ordering requirements which may be sensitive
to assigned priority.  We don't want a mix of priorities from
old clients with priorities from new clients causing trouble.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>