Commit Graph

42909 Commits

Author SHA1 Message Date
Orit Wasserman
8bb76f2927 Merge pull request #5575 from ceph/wip-12370
rgw: don't preserve acls when copying object
2015-08-20 20:59:49 +02:00
Yehuda Sadeh
989820a908 Merge pull request #5577 from oritwas/wip-next-12363
rgw: we should not overide Swift sent content type

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-08-17 11:19:23 -07:00
Orit Wasserman
423cf136f1 rgw: we should not overide Swift sent content type
Fixes: #12363
backport: hammer

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
2015-08-13 20:50:53 +02:00
Yehuda Sadeh
fb02024744 rgw: don't preserve acls when copying object
Fixes: #12370

When copying an object we need to use the acls we calculated earlier,
and not the source acls.
This was broken at e41d97c8e3.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-08-13 11:08:56 -07:00
Yan, Zheng
4d4fe9dbc0 crypto: fix unbalanced ceph::crypto::init/ceph::crypto:shutdown
we may create a CephContext without calling common_init_finish(), then
delete the CephContext. In this case, ceph::crypto:init() is not called,
so CephContext::~CephContext() should not call ceph::crypto::shutdown().

Fixes: #12598
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
2015-08-13 10:46:03 -04:00
Josh Durgin
6a1dbf30cf Merge pull request #5544 from ceph/wip-12664-next
librbd: prevent race condition between resize requests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-08-12 16:22:46 -07:00
Jason Dillaman
6ec431bac1 librbd: prevent race condition between resize requests
It was possible that the same resize request could be sent twice
if a completed resize op started a newly created resize op while
it was also being concurrently started by another thread.

Fixes: #12664
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-08-11 09:26:33 -04:00
Josh Durgin
bda233c477 Merge pull request #5536 from ceph/wip-12662-next
WorkQueue: add/remove_work_queue methods now thread safe

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-08-10 16:23:10 -07:00
Jason Dillaman
3e18449b01 WorkQueue: add/remove_work_queue methods now thread safe
These methods were not acquiring the ThreadPool lock when
manipulating the work_queue collection.  This was causing
occasional crashes within librbd when opening and closing
images.

Fixes: #12662
Backport: hammer, firefly
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-08-10 19:10:19 -04:00
Josh Durgin
d8a157cf07 Merge pull request #5525 from ceph/wip-12611-next
bit_vector extent calculation incorrect for last page

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-08-10 15:58:16 -07:00
Jason Dillaman
3e145f714a tests: increase test coverage for partial encodes/decodes
Multiple combinations of offsets/lengths are now tested when
performing partial encodes/decodes of the bit vector.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-08-10 09:46:26 -04:00
Jason Dillaman
c6d9899269 common: bit_vector extent calculation incorrect for last page
It's highly probable that the last page in the bit vector will not
be a full page size.  As a result, the computed extents will extend
beyond the data portion of the bit vector, resulting in a end_of_buffer
exception.

Fixes: #12611
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-08-10 09:35:49 -04:00
Yan, Zheng
e35d27fc69 Merge pull request #5492 from ceph/wip-vxattr-setall
mds: fix setting whole layout in one vxattr
2015-08-07 10:04:32 +08:00
John Spray
278a6ae097 qa: add fs layout case for stripe_size decrease
The case fixed by commit:
 mds: fix setting whole layout in one vxattr

Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-06 14:59:36 +01:00
John Spray
880ffe9de5 mds: fix setting whole layout in one vxattr
Previously we were validating the layout
after setting each field, so even when
setting multiple fields in one go (to
something valid) the intermediate states
could be invalid and cause a bogus EINVAL.

For example try setting object_size and stripe_unit
both to 2M in one go.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-08-06 13:14:44 +01:00
Jason Dillaman
add30145a4 Revert "rbd: remove dependency on non-ABI controlled CephContext"
This reverts commit fa78739933.
Original approach broke krbd map/unmap functions and did not fully
address ABI issues.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-08-04 18:10:52 -07:00
Sage Weil
3cbec3521e Merge pull request #5397 from ceph/wip-12222
mon: reject over-large values of max_mds

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2015-08-03 15:15:51 -04:00
Josh Durgin
27fa210f40 Merge pull request #5425 from ceph/wip-12479-next
librbd: test crash during client upgrade suite

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-30 16:26:51 -07:00
Josh Durgin
04d8766264 Merge pull request #5426 from ceph/wip-12383-next
rbd: remove dependency on non-ABI controlled CephContext

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-30 14:08:32 -07:00
Jason Dillaman
af0cade029 lockdep: allow lockdep to be dynamically enabled/disabled
librbd test cases attempt to enable lockdep coverage via the librados
API.  Use a configuration observer to register/unregister lockdep
support.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-30 09:01:54 -04:00
Jason Dillaman
2c51aadb44 tests: librbd API test cannot use private md_config_t struct
Remove all depencencies on md_config_t and instead use librados API
methods to get/set configuration values.

Fixes: #12479
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-30 09:01:53 -04:00
Jason Dillaman
4d03c664f2 librados_test_stub: implement conf get/set API methods
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-30 09:01:36 -04:00
John Spray
cb51b17043 mon: reject over-large values of max_mds
Fixes: #12222
Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-30 07:12:50 +01:00
Samuel Just
c4872ddfac Log::reopen_log_file: take m_flush_mutex
Otherwise, _flush() might continue to write to m_fd after it's closed.
This might cause log data to go to a data object if the filestore then
reuses the fd during that time.

Fixes: #12465
Backport: firefly, hammer
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 8778ab3a1c)
2015-07-29 09:33:33 -04:00
Jason Dillaman
fa78739933 rbd: remove dependency on non-ABI controlled CephContext
The rbd CLI tool no longer attempts to initialize a CephContext
and pass said context to librados since it's possible that the
structure will not be ABI compatible between rbd and librados.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-28 15:44:49 -04:00
Jason Dillaman
9fa0112dd9 crypto: use NSS_InitContext/NSS_ShutdownContex to avoid memory leak
Switched to context-aware NSS init/shutdown functions to avoid conflicts
with parent application.  Use a reference counter to properly shutdown the
NSS crypto library when the last CephContext is destroyed.  This avoids
memory leaks with the NSS library from users of librados.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-07-28 13:16:50 -04:00
Sage Weil
e95787216b Merge pull request #5350 from ceph/wip-pgls-filter-enc
osdc: fix pgls_filter op encoding

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-28 09:12:32 -04:00
Josh Durgin
b2feeb7f32 Merge pull request #5352 from ceph/wip-rbd-help-specs
rbd: cli help and arg parsing fixes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-27 15:21:40 -07:00
Ilya Dryomov
17a3e4b969 rbd: rename --object-extents option to --whole-object
--object-extents is a bit confusing - extent is generally something of
a varying length and here the meaning is "diff whole objects".  Rename
it to --whole-object (the name of diff_iterate() parameter).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
afbf90d5b5 rbd: du command should take spec as an argument
Change du to take <image-spec> | <snap-spec> as an argument instead of
going through --image option.  The new synopsis is

    (du | disk-usage) [<image-spec> | <snap-spec>]

This is to make it look more like the rest of the commands: the only
other command that takes pool as an argument is ls and it can't really
serve as a prototype for du, because the latter has to work on images
and snapshots as well.

Examples:

    # stats for pool rbd
    $ rbd du
    $ rbd -p rbd du

    # stats for pool foo
    $ rbd -p foo du

    # stats for snapshot mysnap of image baz in pool rbd
    $ rbd du baz@mysnap

    # stats for image bar in pool foo
    $ rbd du foo/bar

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
7d65bd9bd1 rbd: assorted cli arg parsing fixes
- import-diff needs image-spec, yet OPT_IMPORT_DIFF was in the list of
  commands that don't need imgname

- check for lock id after imgname, so that if imgname isn't specified
  we fail with imgname rather than lock id error message

- error out if locker isn't specified

- move feature-name validity check after imgname checks so that if
  imgname is malformed we fail with imgname rather than feature error
  message

- error out if image-meta key or value isn't specified

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
b60e144ceb rbd: error out if dest_snapname is specified
No command uses it as of now, but only clone command fails; cp, mv and
import simply ignore it.  Check if it's set and exit with a generic
error message.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
bbc5c71284 rbd: import doesn't require image-spec arg, ditto for export and path
Mark those as such in help and clarify what image-spec defaults to.

Related, all command args in our man page are enclosed into brackets.
I suppose the reason is that they are optional in the sense that you
can have commands like

    $ rbd clone --pool a --image b --snap -c --dest-pool d --dest e

with no args.  Given that we are trying to push people towards

    $ rbd clone a/b@c d/e

undo that so that real optional arguments can be marked optional.
While at it, add synopsis for each command and use backticks for
denoting commands more consistently.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
76989cc4ae doc: use spec syntax in rbd docs
Use spec syntax instead of --pool, --image and --snap to hopefully push
people towards the former.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Vikhyat Umrao
9909388171 rbd: use image-spec and snap-spec in rbd help
This patch changes image-name instances to image-spec and snap-name
instances to snap-spec to try to clarify usage for some commands and
disambiguate the term {image,snap}-name, which has been used to denote
both simple names and compound names (specs).

<image-spec> is [<pool-name>]/<image-name>
<snap-spec> is [<pool-name>]/<image-name>@<snap-name>

This patch also removes duplicate checks for image-name and snap-name.

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
[idryomov@gmail.com: some commands take either image-spec or snap-spec,
other fixes, formatting, changelog]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
John Spray
2fe6bd3d49 osdc: fix pgls_filter op encoding
This was broken with respect to the OSD's expected order
of decoding.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-27 09:21:17 +01:00
John Spray
f753c109fc Merge pull request #5323 from ceph/wip-12426
mon: fix checks on mds add_data_pool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-23 19:43:53 +01:00
John Spray
329741ec23 mon: fix checks on mds add_data_pool
Use same _check_pool helper as during fs creation.

Fixes: #12426

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-23 14:08:33 +01:00
John Spray
29ea23c3ff Merge pull request #5324 from ceph/wip-12355
mds: fix crash while stopping rank

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-23 14:04:20 +01:00
John Spray
c8bdf1b761 mds: fix crash while stopping rank
trim() was broken in:
8a91daae mds: fix mds crash when mds_max_log_events smaller

When doing a final trim in shutdown we need to trim everything,
not just all but the last segment.  The previous change's intent
was to prevent badness when mds_log_max_events was too small: accomplish
the same thing here by clamping the value to something sane.

Fixes: #12355

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-23 10:48:18 +01:00
Sage Weil
2746f59da4 Merge remote-tracking branch 'gh/next' 2015-07-16 12:03:58 -04:00
Joao Eduardo Luis
c2d6e3d666 Merge branch 'wip-mon-scrub'
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:46:32 +01:00
Joao Eduardo Luis
f735a9905c Merge branch 'wip-11786'
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:44:22 +01:00
Joao Eduardo Luis
0ea794c96a Merge branch 'wip-11470'
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:21:18 +01:00
Joao Eduardo Luis
1551ebb632 mon: PaxosService: call post_refresh() instead of post_paxos_update()
Whenever the monitor finishes committing a proposal, we call
Monitor::refresh_from_paxos() to nudge the services to refresh.  Once
all services have refreshed, we would then call each services
post_paxos_update().

However, due to an unfortunate, non-critical bug, some services (mainly
the LogMonitor) could have messages pending in their
'waiting_for_finished_proposal' callback queue [1], and we need to nudge
those callbacks.

This patch adds a new step during the refresh phase: instead of calling
directly the service's post_paxos_update(), we introduce a
PaxosService::post_refresh() which will call the services
post_paxos_update() function first and then nudge those callbacks when
appropriate.

[1] - Given the monitor will send MLog messages to itself, and given the
service is not readable before its initial state is proposed and
committed, some of the initial MLog's would be stuck waiting for the
proposal to finish.  However, by design, we only nudge those message's
callbacks when an election finishes or, if the leader, when the proposal
finishes.  On peons, however, we would only nudge those callbacks if an
election happened to be triggered, hence the need for an alternate path
to retry any message waiting for the initial proposal to finish.

Fixes: #11470

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 16:20:41 +01:00
Joao Eduardo Luis
b207d87ebf Merge branch 'wip-11545'
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 16:07:11 +01:00
Sage Weil
5d299612e5 Merge pull request #5251 from ceph/wip-12021-next
OSDMonitor: allow addition of cache pool with non-empty snaps with co…

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 11:05:04 -04:00
Sage Weil
edd68e3ade Merge pull request #5188 from athanatos/wip-11687
PG::find_best_info: ignore info.les for incomplete peer

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 11:03:18 -04:00
Joao Eduardo Luis
038452e70f mon: Monitor: use 'ceph mon metadata' instead of 'ceph mon_metadata'
'ceph mon_metadata' was added still during this dev cycle, so there is
no need to deprecate it first.

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 15:54:03 +01:00
Kefu Chai
6fac064a02 Merge pull request #5238 from tweenk/out-of-tree-build-fix
Makefile: fix out-of-tree build.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 22:03:52 +08:00