Commit Graph

20878 Commits

Author SHA1 Message Date
Yehuda Sadeh
3809e34448 rgw: ETag is unquoted in multipart upload complete
Fixes #2877.
Removing quotes from ETag before comparing it to what we
have when completing a multipart upload.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-08-08 15:34:02 -07:00
John Wilkins
52f03dcc70 doc: Added debug and logging reference.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-08-08 15:06:57 -07:00
Sage Weil
d78dfe5d14 mkcephfs: use default osd_data, _journal values
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-08 14:07:16 -07:00
Sage Weil
3c90ff4e96 mkcephfs: use new default keyring locations
The ceph-conf command only parses the conf; it does not apply default
config values.  This breaks mkcephfs if values are not specified in the
config.

Let ceph-osd create its own key, fix copying, and fix creation/copying for
the mds.

Fixes: #2845
Reported-by: Florian Haas <florian@hastexo.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-08 14:07:13 -07:00
Sage Weil
1839105977 Merge remote-tracking branch 'gh/next' 2012-08-08 13:05:12 -07:00
Sage Weil
c03f744ef0 keyring: make from_ceph_context() a member
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
ece78c8673 doc: some basic cephx documentation
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
69130d7cc5 monclient: move keyring requirement where it belongs
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
35e79f233e keyring: simplify from_ceph_context()
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
ac9d429dd0 keyring: simplify from_ceph_context() arguments
Allocate the KeyRing in the caller, and just pass a pointer.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
5e13fd6756 keyring: check client requirement list too when loading keyring
Check client requirements when loading a keyring from the cct.  This is
only used to succeed when no keyring is found and cephx isn't enabled.

We probably want to kill this eventually...

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
e536889139 monclient: differentiate clients vs daemons
If we are a daemon, require 'auth cluster required'.  Otherwise, use the
client requirement.

As always, fall back to 'auth supported' if blank.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
e4e4882d67 mon: differentiate cluster and client auth requirements
- require 'cluster required' of osds, mdss, and other mons
- require 'service required' of clients

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:15:28 -07:00
Sage Weil
d5704bd762 buffer: make release() private
This should only be called by ~ptr or when we are replacing the current
target with something new.  It is not suitable for external consumption
Because it doesn't reset length and offset.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-08 08:09:59 -07:00
Sage Weil
bf4c5e7ea8 mds, osd: require auth_service_required, if defined
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-07 19:33:35 -07:00
Josh Durgin
4fd393f3ce librbd: fix bounds of memcpy in info()
Caught by valgrind.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:49:48 -07:00
Josh Durgin
d48d1ffb35 test_librbd_fsx: add cloning
5% of the time a clone op is chosen, create a snapshot, save the
current contents to a file, and continue operating on a clone.

At the end of the test, verify that all parents match their saved
data.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:49:44 -07:00
Josh Durgin
745783c174 librbd: expose feature bits through librbd.h
Move them to a separate header so we don't expose
rbd_types.h to the librbd user.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Josh Durgin
12e2070919 librbd: close parent after shutting down cache
Requests that haven't been flushed yet might need the parent still.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Josh Durgin
9bf3d4866b librbd: move flush on new snap outside of snap_lock
snap_lock needs to be taken during writeback.
This is still protected by md_lock. The altered snapc doesn't
affect in-flight ops, so it's safe to update it before flushing.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Josh Durgin
53947ed894 librbd: check new snapc for validity, not the old one
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Josh Durgin
965271dbec test_librbd: add a simple io to clone test
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Josh Durgin
12c9a7d5df test_rbd.py: refactor cloning tests
Move into a separate class that requires layering to be enabled,
so the common step of creating and deleting a clone doesn't
need to be repeated in each test.

Move flatten tests into a subclass so they can be run separately
more easily.

Move the checks for the layering feature into a generic decorator
that skips tests if the specified feature is not being used.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Josh Durgin
beccac9345 librbd: don't open parent again during get_parent_info
The parent was already opened when the original ImageCtx
was initialized. We just need to lookup the pool and image
name for it.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Josh Durgin
90dc565022 librbd: implement read/write from parent images
Put the completion handling logic into new subclases of
librbd::AioRequest, so the caching/non-caching paths can share
logic. These AioRequests replace AioBlockCompletion as representing
the I/O to a single object in an RBD image.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 18:48:53 -07:00
Evan Felix
43291951fa rados.py: add binding for rados_trunc
Fixes: #2909
Signed-off-by: Evan Felix <evan.felix@pnnl.gov>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-03 17:59:05 -07:00
Tommi Virtanen
3671a37e5d doc: Explicitly state mount.ceph two first arguments are fixed.
I've hurt myself too many times with this.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 16:03:19 -07:00
Tommi Virtanen
17ad4e18d0 doc: mount.ceph is also needed for cephx.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 16:03:09 -07:00
Tommi Virtanen
c961a20eca doc: Fix toctree structure for man obsync(1).
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 15:56:57 -07:00
caleb miles
5db3a9e71c rgw_admin.cc: Disallow addition of S3 keys with subuser creation
Fixes: #1855
It is no longer possible to create a subuser and new S3 key associated
with that user through the radosgw-admin utility. In reference to Bug 1855
http://tracker.newdream.net/issues/1855.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-08-02 13:31:35 -07:00
Tommi Virtanen
4e40a78494 ceph-authtool: Fix usage, it's --print-key not --print.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 13:02:04 -07:00
Samuel Just
25de5e59d5 Revert "osd: peering: detect when log source osd goes down"
This reverts commit 0d3d75ec0d.

Accidental double push.
2012-08-02 11:00:42 -07:00
Tommi Virtanen
203dffadb7 doc: cd to repository before running git status.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 08:35:14 -07:00
Tommi Virtanen
48de9b5b87 doc: Say what to do if submodules are out of date.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 08:35:14 -07:00
Tommi Virtanen
93cbab7370 doc: Simplify submodules explanation.
``git clone --recursive`` does ``init`` & ``update`` for us. Also
avoids incorrect language; there never were submodules called ``init``
and ``update``.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 08:35:14 -07:00
Wido den Hollander
6af560def9 doc: Correct Git URL for clone
Using git@github.com would mean SSHing in, and your average open
source consumer probably won't have a Github account.

Using HTTPS offers the best combination of resisting man-in-the-middle
attacks and passing through corporate firewalls.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-02 08:33:44 -07:00
Sage Weil
0d3d75ec0d osd: peering: detect when log source osd goes down
The Peering state has a generic check based on the prior set osds that
will restart peering if one of them goes down (or one of the interesting
down ones comes up).  The GetLog state, however, can pull the log from
a peer that is not in the prior set if it got a notify from them (e.g., an
osd in an old interval that was down when the prior set was calculated).
If that osd goes down, we don't detect it and will block forward.

Fix by adding a simple check in GetLog for the newest_update_osd going
down.

(BTW GetMissing does not suffer from this problem because
peer_missing_requested is a subset of the prior set, so the Peering check
is sufficient.)

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-01 17:17:29 -07:00
Sage Weil
ca2c381380 osd: peering: detect when log source osd goes down
The Peering state has a generic check based on the prior set osds that
will restart peering if one of them goes down (or one of the interesting
down ones comes up).  The GetLog state, however, can pull the log from
a peer that is not in the prior set if it got a notify from them (e.g., an
osd in an old interval that was down when the prior set was calculated).
If that osd goes down, we don't detect it and will block forward.

Fix by adding a simple check in GetLog for the newest_update_osd going
down.

(BTW GetMissing does not suffer from this problem because
peer_missing_requested is a subset of the prior set, so the Peering check
is sufficient.)

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-01 09:55:45 -07:00
Yehuda Sadeh
bb6e0d0e58 wireshark: update patch
Update to latest source tree (svn 43768).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-31 15:49:25 -07:00
Samuel Just
deec81b4e9 ReplicatedPG: clear waiting_for_ack when we send the commit
Otherwise, we might send the ack anyway later, after a subsequent
commit is sent resulting in an out-of-order op.

This resulted in a a crash when the client encountered out of
order ops.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-31 14:26:19 -07:00
Samuel Just
e0e72d78b7 Merge remote-tracking branch 'upstream/wip-leveldb-iterators' 2012-07-31 13:51:49 -07:00
Sylvain Munaut
f22b95da27 rbd: fix off-by-one error in key name
Fixes: #2846
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-07-31 11:48:31 -07:00
Sylvain Munaut
e775ce52ab secret: return error on empty secret
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-07-31 11:48:29 -07:00
Samuel Just
cda5e8e0c3 PG,ReplicatedPG: clarify scrub state clearing
scrub_clear_state takes care of clearing the SCRUB and REPAIR
flags.  Thus, PG::scrub() needn't clear them again since
any change that would have caused that if block to occur
would have triggered ReplicatedPG::on_change(), which also
clears the scrub reservations.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-30 13:43:51 -07:00
Samuel Just
6d464a21fc PG::mark_clean(): queue_snap_trim if snap_trimq is not empty
Currently, we won't queue for snap trim until the next map
update.

Noticed while reviewing another patch, this would result in
snaps not being trimmed until the next map update.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-30 13:39:00 -07:00
Samuel Just
1041b92ca5 ReplicatedPG::snap_trimmer: requeue if scrub_block_writes
Otherwise, we do not continue snap_trimming once scrub is
complete.

Noticed while revewing another patch.  This would result
in snaps not being trimmed again until the next map
update.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-30 13:38:25 -07:00
Josh Durgin
c6bc3e1030 librbd: refactor synchronous I/O
Write in terms of the asynchronous functions, so all the logic
is not duplicated. Now there's only a single point where each
operation needs to change for layering.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-30 11:19:53 -07:00
Josh Durgin
ff2a96c7c7 rbd: fix copy-pasted snap remove error message
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-30 11:19:53 -07:00
Josh Durgin
ea75d1ff62 librbd: check for new snapshots in snap_set
This allows callers to create a snapshot and then read from
it immediately. No one uses this other than the tests,
fortunately.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-30 11:19:53 -07:00
Josh Durgin
bd119908f4 librbd: add method to get the size of an image
To go with the other individual properties instead of stat,
add a method that only gets the size.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-30 11:19:53 -07:00