Commit Graph

20081 Commits

Author SHA1 Message Date
Dan Mick
6ad5961043 rbd, librbd: add tests for cloning
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-07-10 13:59:34 -07:00
Dan Mick
64949d429d librbd, rbd, rbd.py: Add parent info reporting
split out new parent info into separate retrieval methods;
structure packing on rbd_image_info_t was becoming a problem.
Deprecate old parent fields in favor of new ones.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-07-10 13:59:34 -07:00
Dan Mick
a94fc8c81f rbd, librbd, rbd.py: cloning (copy-on-write child image of snapshot)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-07-10 13:59:33 -07:00
Dan Mick
8cc434277f librbd: open_image snapshot handling
Allow opening with no snap, but check for error for nonexistent snap

Backport: argonaut
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-07-10 13:59:33 -07:00
Josh Durgin
96a517b47f librados: Add mapping from pool id to pool name and ioctx to rados client
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-10 13:59:33 -07:00
Dan Mick
95f85df7ca librados: add new constructor to form a Rados object from IoCtx
This creates a separate reference to an existing connection, for
use when a client holding IoCtx needs to consult another (say,
for rbd cloning)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-10 13:59:11 -07:00
Dan Mick
ec87a1ea43 cls_rbd: add logging for failed set_parent steps
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-07-09 13:58:02 -07:00
Josh Durgin
d82a502680 qa: add rbd remove tests
These check that removing an image still works if an rbd rm
command was interrupted partway through.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00
Josh Durgin
d04b2fb713 cls_rbd_client: check return code of operate
This lets us get a more useful error, like -ENOENT, instead
of a failure to decode the empty output buffer.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00
Josh Durgin
1c096a8062 qa: run rbd tests against old and new formats
Now it's not the caller's responsibility to specify the format,
and we can eliminate a job from the qa suite.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00
Josh Durgin
aa3255b844 qa: add tests for rbd ls with old and new formats
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00
Josh Durgin
288bde3f9e qa: restructure rbd cli tests
Move tests into functions and remove all images at the end of each.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00
Josh Durgin
0ad14c95c0 qa: add rbd command rename tests
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00
Josh Durgin
6f096b6cdc librbd: use new class methods to access rbd_directory
Since we only use the new interface with new format images,
old clients won't be able to list them.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-02 14:18:21 -07:00
Dan Mick
f2d37c529d librbd: handle NULL old_format pointer in detect_format()'s logging
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-07-02 14:18:21 -07:00
Josh Durgin
76c657e3b6 cls_rbd: add methods for dealing with rbd_directory objects
These hide the structure of the directory from clients, and provide
mappings from id to name and name to id. These mappings aren't needed
for old format images, but with layering, they're useful to show
the user e.g. the name of an image's parent instead of its id.

This also makes the directory more efficient for new-style images, since
it uses omap instead of tmap.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-28 12:34:09 -07:00
Josh Durgin
de62c4c489 objclass: add create method
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-28 12:33:20 -07:00
Josh Durgin
4110707894 cls_rbd: use already defined local var instead of constant
This occurrence was meant to be replaced in the original commit.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-28 12:33:20 -07:00
Josh Durgin
a1d477b918 librbd: add indirection between name and header object
This adds a new rbd_id.$name object that contains the id of an image.
Rename the header in new-format images to  rbd_header.$id, so that
it doesn't need to change when an image is renamed - the rbd_id.$name
object is copied to a new object instead.

With layering, this becomes more important because many child images
could be depending on the header object of a parent image.

This is another change to the new format, but since no one uses it yet,
we don't need to worry about backwards compatibility.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-28 12:33:20 -07:00
Josh Durgin
5ae6e71fcb cls_rbd: add {get,set}_id methods
These will be used on a new rbd id object to provide a level of
indirection so that header objects don't need to move when
an image is renamed.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-28 12:33:20 -07:00
Josh Durgin
6a5c155544 objclass: remove unused variable from cls_cxx_map_get_vals
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-28 00:18:40 -07:00
Josh Durgin
f969b59a23 cls_rbd: fix signed-ness warning
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-28 00:18:40 -07:00
Yehuda Sadeh
04e1c30127 rest-bench: mark request as complete later
We marked a request as complete in the callback, however
it might be that we're still inside S3_runall_request_context()
which means that request is not really complete yet.
Possibly fixes bug #2652.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-27 15:59:22 -07:00
Yehuda Sadeh
c5d19b6df0 rgw-admin: use correct modifier with strptime
Bug #2658: used %I (12h) instead of %H (24h)

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-27 13:48:15 -07:00
John Wilkins
e34dfc3b6a doc: removing old 'todo' configuration reference.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-26 12:30:01 -07:00
John Wilkins
efb74a90f2 doc: converted daemon references from nasty tables to lines.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-26 12:24:23 -07:00
John Wilkins
4142ac44b3 doc: a few minor tweaks to radosgw to cleanup navigation.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-26 08:28:10 -07:00
John Wilkins
0be2611158 doc: Published RADOS GW docs and install as is for now. Needs more work.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-06-26 08:21:05 -07:00
caleb miles
9342573496 CrushTester.cc: removed last broken bits of obsolete method
Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-06-26 00:05:27 -07:00
caleb miles
6d551c17b8 CrushTester.cc: removed obsolete method for collapsing a CRUSH map
Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-06-26 00:02:24 -07:00
caleb miles
df7729e535 CrushTester: eliminated compiler warning
Signed-off-by: caleb miles <caselim@gmail.com>
2012-06-25 23:58:52 -07:00
caleb miles
d82357df9b Merge branch 'master' of github.com:ceph/ceph 2012-06-25 23:14:09 -07:00
Yehuda Sadeh
07029a4f05 rgw: send both swift x-storage-token and x-auth-token
older clients need x-storage-token, newer x-auth-token

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-25 20:45:41 -07:00
Yehuda Sadeh
80a939a99d rgw: radosgw-admin date params now also accept time
The date format now is "YYYY-MM-DD[ hh:mm:ss]". Got rid of
the --time param for the old ops log stuff.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-25 20:45:38 -07:00
Yehuda Sadeh
c87c83f318 rgw-admin: fix usage help
s/show/trim

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-25 20:45:34 -07:00
Tommi Virtanen
77fcf06425 upstart: fix regex
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-25 15:14:33 -07:00
Sage Weil
0cd21ea136 Merge branch 'next' 2012-06-25 14:45:21 -07:00
Greg Farnum
840ae24449 mon: don't tick the PaxosServices if we are currently slurping.
They aren't prepared to deal with the on-disk state being inconsistent.

Signed-off-by: Greg Farnum <greg@inktank.com>
2012-06-25 14:45:06 -07:00
Sage Weil
ef6beec992 objecter: do not feed session to op_submit()
The linger_send() method was doing this, but it is problematic because the
new Op doesn't get its pgid or acting vector set correctly.  The result is
that the request goes to the right OSD, but has the wrong pgid, and makes
the OSD complain about misdirected requests and drop it on the floor.  It
didn't affect the test results because we weren't testing whether the
watch was working in that case.

Instead, we'll just recalculate and get the same value the parent linger
op did.  Which is fine, and goes through all the usual code paths so
nothing is missed.

Also, increment num_homeless_ops before we recalc_op_target(), so that we
don't (harmlessly, but confusingly) underflow.

Fixes: #2022
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-25 14:44:30 -07:00
Samuel Just
4e45d60f6e ObjectStore::Transaction: initialize pool_override in all constructors
use_pool_override and pool_override weren't initialized in these two
constructors.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-24 13:33:36 -07:00
Sage Weil
ff67210ec2 objecter: do not feed session to op_submit()
The linger_send() method was doing this, but it is problematic because the
new Op doesn't get its pgid or acting vector set correctly.  The result is
that the request goes to the right OSD, but has the wrong pgid, and makes
the OSD complain about misdirected requests and drop it on the floor.  It
didn't affect the test results because we weren't testing whether the
watch was working in that case.

Instead, we'll just recalculate and get the same value the parent linger
op did.  Which is fine, and goes through all the usual code paths so
nothing is missed.

Also, increment num_homeless_ops before we recalc_op_target(), so that we
don't (harmlessly, but confusingly) underflow.

Fixes: #2022
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-23 10:34:56 -07:00
Samuel Just
9fcc3dee9a osd_types.cc: remove hobject_t decode asserts
These asserts were useful for ensuring that pool is passed
in in the correct places, but they prevent the encoder
testing from working.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-21 17:10:30 -07:00
Sage Weil
80649d08b9 mon: note that monmap may be reencoded later
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-21 17:10:30 -07:00
Sage Weil
77d836c5b8 mon: encoding new monmap using quorum feature set
It is probably unlikely that someone will expand the mon cluster with a
mixed feature set, but we know the quorum features here, so we should use
them.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-21 17:10:30 -07:00
Sage Weil
de5b323659 mon: conditionally encode mon features for remote mon
The only time we encode these is when forwarding messages.  Encoding using
the destination's feature set.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-21 17:10:30 -07:00
Sage Weil
c399d903dd mon: conditionally encode PGMap[::Incremental] with quorum features
This allows a mon cluster to transition to the new encoding during a
rolling upgrade.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-21 17:10:30 -07:00
Sage Weil
0aaf7334a9 mon: conditionally encode auth incremental with quorum feature bits
If the quorum does not yet all have the MONENC feature, stick to the old
encoding.

It might be more polite to require a super-quorum before switching over,
and take note so that thereafter we can stick to the new encoding, but
that has more moving parts and I'm not sure it's worth the complexity.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-21 17:10:29 -07:00
Sage Weil
06288a9d10 mon: track intersection of quorum member features
When we form a quorum, also note the intersection of the quorum members'
feature bits.  This will inform decisions about what encodings we use.

This is an imperfect strategy because the quorum may change, and we may
have a mon with old code join in and not understand what is going on.
However, it does ensure that a majority of the members run new code, so in
the absence of other failures we can make progress.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-21 17:10:29 -07:00
Sage Weil
2355b233ea mon: conditionally encode old monmap when peer lacks feature
This allows a rolling upgrade from 0.47.2 to 0.48.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-21 17:10:29 -07:00
Samuel Just
2fe9816305 OSD,PG,ObjectStore: handle messages with old hobject_t encoding
Messages that embed an hobject_t need to have the pool field fixed
on messages from old peers.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-06-21 17:10:29 -07:00