Commit Graph

20162 Commits

Author SHA1 Message Date
Sage Weil
87cadffd7c cls_rbd: rename parent size -> overlap
The use of 'size' to describe the amount that we overlap with the parent
was confusing; overlap is more intuitive (to me, at least!).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 15:08:18 -07:00
Sage Weil
3948e0690e cls_rbd: handle parent overlap
Two things:

 * when we set a parent, the overlap is the min of our size and the
   parent's size.
 * when we resize, our overlap may shrink.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 15:08:18 -07:00
Sage Weil
e8b36ed97e cls_rbd: make snapshots inherit the head's parent
When you take a snapshot, the snap gets the current parent of the head, if
any.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 15:08:17 -07:00
Sage Weil
f87c441f68 cls_rbd: check for LAYERING feature for parent methods
You need to set the feature on the image before you can use these methods.
We *could* allow get_parent, but that just means they'll get ENOENT instead
of ENOEXEC, and the latter is more informative.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 15:08:17 -07:00
Sage Weil
2f75b466c9 cls_rbd: implement get_parent, set_parent, remove_parent
Implement methods to get/set/remove the parent pointer on child images.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 15:08:17 -07:00
Sage Weil
c7f91e6c3d cls_rbd_client: use snapid_t type
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 14:35:44 -07:00
Sage Weil
c70c09f63a Merge remote-tracking branch 'gh/next'
Conflicts:
	src/osd/PG.cc
2012-06-19 14:29:43 -07:00
Yehuda Sadeh
145d1c146b rgw: set s->header_ended before flushing formatter
otherwise we don't account the formatter in s->bytes_sent.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-19 13:26:02 -07:00
Yehuda Sadeh
8a4e2a116b rgw: log user and not bucket owner for service operations
For operations that are done on the service (e.g., list buckets)
we need to log the user that did the operation, and not the bucket
owner.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-19 13:26:00 -07:00
Yehuda Sadeh
282e2260f9 rgw: initalize s->enable_usage_log
Missing initialization, we ended up not logging every operation.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-19 13:25:58 -07:00
Sage Weil
f3f144adf1 osd: use derr (instead of cerr) for convertfs
This will appear in the log *and* stderr (if we're running in the
foreground).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 10:12:40 -07:00
Sage Weil
74658dfa2f osd: close stderr on daemonize
This spams stderr in an ugly way.  Users should look at the logs.

In particular, filestore upgrades spam the console, which is unpleasant.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 10:11:01 -07:00
Samuel Just
4ec9633653 PG: improve find_best_info
07f853db39 is actually too conservative,
it suffices to find any info with a last_update of at least the least
last_update from the last period to go active.  An info from a previous
interval is acceptable if the last interval never reported a commited
operation and thus still has the same last_update.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-06-19 10:49:48 -07:00
Sage Weil
5435a4de6f osdcap: make grammar build on spirit 2.2/boost 1.42
This is a stupid workaround, but it makes the compilation error go away.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-19 09:39:01 -07:00
John Wilkins
992faa42e1 doc: Added a snapshot page with outline. Needs additional info.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-19 10:15:35 -07:00
John Wilkins
2be02918ca doc: Added prerequisite of running Ceph cluster.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-19 10:10:51 -07:00
Samuel Just
0d8970fc81 PG: reg_last_pg_scrub on pg resurrection
This may solve the unreg_last_pg_scrub assert.

see #2453.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-18 14:33:50 -07:00
Samuel Just
b0e66b70cb ceph_osd: move auto-upgrade to after fork
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-18 14:33:33 -07:00
John Wilkins
6c88ff599d Merge branch 'master' of github.com:ceph/ceph 2012-06-18 14:29:27 -07:00
Sage Weil
6feeff9555 librbd: simplify refresh sequence checks
- incremental seq each request
- set last to the last completed seq
- drop the now-redundant bool

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-06-18 14:30:28 -07:00
John Wilkins
b101f4cea0 doc: first cut of OpenStack/RBD w/out cephx. Authentication coming soon.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-18 14:29:04 -07:00
Sage Weil
37e56e0123 filestore: make disk format upgrade warning less scary, more informative
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2012-06-18 14:07:20 -07:00
Sage Weil
030a2e3bf4 mon: include quorum in ceph status
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-18 14:02:29 -07:00
Sage Weil
2fc2cf03b3 mon: gracefully handle slow 'ceph -w' clients
If we are sending log updates to a client (ceph -w), and they are far
enough behind to drop behind first_committed, include a friendly message
in their stream but continue.

Drop useless return value from _create_sub_incremental().  Assert that we
can read the state file.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-18 14:00:06 -07:00
John Wilkins
8b96b9c7e6 doc: Added libvirt installation.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-18 13:22:18 -07:00
Samuel Just
51fcef2465 PG: best_info must have a last_epoch_started as high as any other info
We disregard incomplete infos during find_best_info, but we can't an
info with a last_epoch_started less that of the incomplete info.

This should avoid cases like #2462.  In that case, it appears that
a peer with empty info/log was chosen as authoritative even though
there was a non-empty incomplete peer.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-18 11:18:30 -07:00
Tommi Virtanen
2b92c73bbb doc: btrfs and parted chef recipes are not needed.
They were removed in ceph-cookbooks.git commit
a77b418b95df8f2b6f56d9a90e47dc62100cdf4d.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-06-18 10:36:37 -07:00
Sage Weil
10c57b5ad2 Merge branch 'next' 2012-06-17 14:00:02 -07:00
Laszlo Boszormenyi (GCS)
95ac5baed4 debian: fix python-ceph depends
Signed-off-by: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
2012-06-17 13:21:24 -07:00
Laszlo Boszormenyi (GCS)
d7fe0e3fe4 debian: update homepage url
Signed-off-by: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
2012-06-17 13:21:19 -07:00
Sage Weil
82cb3d61ff filestore: fix 'omap' collection skipping
The if/else if/... structure was skipping this test if the file system
didn't support d_type.

Fixes: #2598
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-17 13:20:59 -07:00
Sage Weil
343cc792e8 run-cli-test: use new pip incantation
http://www.pip-installer.org/en/latest/news.html#id1

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-17 12:00:53 -07:00
Sage Weil
e3b6957dd0 run-cli-test: use new pip incantation
http://www.pip-installer.org/en/latest/news.html#id1

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-17 11:15:32 -07:00
Sage Weil
3d4ba4319c cls_rbd: do not pass snapid_t to vargs
On squeeze,

warning: cls_rbd.cc:534: cannot pass objects of non-POD type ‘struct snapid_t’ through ‘...’; call will abort at runtime

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-17 09:07:41 -07:00
Sage Weil
5efaa8d779 msg: fix buffer overflow in ipv6 addr parsing
Noticed because of failing i386 unit tests for long addrs; x86_64 passed
fine.  Sigh.  FTR, the failing address was

	2001:0db8:85a3:0000:0000:8a2e:0370:7334

Sadly the full length addrs don't turn it up on x86_64, still, nor does
valgrind notice.  But, this fixes it on i386.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-16 20:09:04 -07:00
Sage Weil
d9e902f9c5 ceph.newdream.net -> ceph.com
wiki url -> docs url
2012-06-16 14:50:29 -07:00
Sage Weil
150e1fc5c3 Merge branch 'next'
Conflicts:
	src/cls_rbd.cc
2012-06-16 07:42:17 -07:00
Sage Weil
f8a196fb7d cls_rbd: drop useless snapshot metadata helpers
Now that cls_rbd_snap is encodable, we don't need these helpers; get_key()
will suffice.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-16 07:34:00 -07:00
Sage Weil
b08d7ba972 cls_rbd: use encode macros for on-disk snap metadata
This will let us version this encoding later when we add new information
and features, like a per-snap parent.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-16 07:33:43 -07:00
Greg Farnum
dac9f22359 Merge branch 'wip-rbd-locking'
Conflicts:
	src/cls_rbd.cc

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-15 17:39:48 -07:00
Samuel Just
07f853db39 PG: best_info must have a last_epoch_started as high as any other info
We disregard incomplete infos during find_best_info, but we can't an
info with a last_epoch_started less that of the incomplete info.

This should avoid cases like #2462.  In that case, it appears that
a peer with empty info/log was chosen as authoritative even though
there was a non-empty incomplete peer.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-15 17:30:14 -07:00
Greg Farnum
5b1b02b60a librbd: remove the set-r-and-return idiom from some functions.
Josh hates this, and I have to admit it seems silly.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-15 17:27:10 -07:00
Greg Farnum
b018befd72 librbd: add cooperative image locking to the C and C++ interfaces
While we're at it, increment the version number.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-15 17:27:10 -07:00
Greg Farnum
668aa7866a librbd: include the image lockers in the ImageCtx mutable metadata
Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-15 17:27:10 -07:00
Greg Farnum
48d2376e0a test: add rbd image locking tests to test_cls_rbd
Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-15 17:27:10 -07:00
Greg Farnum
71c7ed3f49 cls_rbd_client: expose locking operations
Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-15 17:27:10 -07:00
Greg Farnum
71e1b1fd18 cls_rbd: add failure logging to all callers of read_key.
Previously, read_key was printing out error messages when it failed.
But because some callers are fine with it failing on ENOENT, and they
all have more context anyway, it no longer does so and they need
their own logging output. Now they have it.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-15 17:27:10 -07:00
Greg Farnum
c88a4550ae cls_rbd: add locking functions.
Users can now place shared or exclusive locks, can remove their own
locks, can break the locks of others, and can list locks. All these
functions are considered PUBLIC_EXEC to match the other rbd methods.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-15 17:27:10 -07:00
Sage Weil
1e899d08e6 filejournal: make less noise about open failures
The callers report errors and pass up errors, so do not spam stderr with
this.  Fixes the confusion that sparked #2595.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-15 14:48:22 -07:00
Yehuda Sadeh
b415fd219e rgw: obj copy respects -metadata-directive
Fixes #2542. The old behavior just merged src object attrs
and provided attributes. The new (and correct) behavior looks
at the x-[amz|rgw|...]-metadata-directive and either copies
the source attrs, or replaces them with the provided attrs.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-15 13:44:09 -07:00