Commit Graph

43507 Commits

Author SHA1 Message Date
John Spray
8d4932e721 osd/OSDMap: handle incrementals that modify+del pool
Because new_pools was processed after old_pools, if something
was modified and then deleted in the same incremental
map, then the resulting state would be a pool in the map
that had no entry in pool_name.

Fixes: #12429
Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-30 14:23:42 +01: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
Kefu Chai
258cb348d6 rbd: add "--keyring" option to help message
Refs: #12458
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-30 11:56:29 +08:00
Kefu Chai
7fbf013d44 Merge pull request #5401 from ceph/wip-12450
tools/rados: change the default max_ops to 16

Reviewed-by: David Zafman <dzafman@redhat.com>
2015-07-30 11:36:37 +08:00
shawn
5c395ff856 doc: add bucket object version description.
bucket object version has been supported, but do not have description in the docs,
so add this part.

Signed-off-by: shawn chen <cxwshawn@gmail.com>
2015-07-30 10:09:16 +08:00
Guang G Yang
6ab9efe799 osd: copy the RecoveryCtx::handle when creating a new RecoveryCtx instance from another one
Fixes: 12523

Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
2015-07-29 21:47:17 +00:00
Samuel Just
1320e29dfa OSDMonitor::preprocess_get_osdmap: send the last map as well
Fixes: #12410
Backport: hammer
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-07-29 13:22:36 -07:00
Ilya Dryomov
f217865cf7 test_librbd_fsx: invalidate before discard in krbd mode
Commit bd050240ce ("test_librbd_fsx: flush before discard in krbd
mode") added an fsync() before BLKDISCARD.  Don't know what I was
thinking at the time, but I missed the invalidate part, for which we
need to use the BLKFLSBUF ioctl.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-29 21:01:08 +03: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
Sage Weil
338ead0f49 Merge pull request #5348 from athanatos/wip-12465
log: take mutex when reopening log fd

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-29 09:30:37 -04:00
Kefu Chai
0559fd38b8 tools/rados: change the first op id to 0
the first op id was 16 by default, which is okay, but a non-zero
magic number could lead to questions. max_op was mixed up with
max_ops, and changed to 16 in 51e402e3 by mistake.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-29 19:52:53 +08:00
Kefu Chai
ee25b4276d tools/rados: change the default max_ops to 16
otherwise the load-gen will not emit any ops by default.

Fixes: #12450
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-29 19:44:58 +08:00
Kefu Chai
b97988dde9 tools/rados: update the help message
Fixes: #12451
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-29 19:11:31 +08:00
Kefu Chai
08210d6a85 common/syncfs: fall back to sync(2) if syncfs(2) not available
Fixes: #12512
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-29 16:42:55 +08: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
Yehuda Sadeh
1113eb6b98 Merge pull request #5139 from jmunhoz/wip-7817-ms
rgw: add minimum support for copy multipart part

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-07-28 14:21:25 -04:00
Yehuda Sadeh
5afcabd375 Merge pull request #5313 from guce/rgw_access_invalid_argument
rgw: check subuser illegal access parameter.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-07-28 13:55:39 -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
Josh Durgin
d7440555c0 Merge pull request #5364 from xdonghai/master
doc:modified librados-intro.rst an error of document representation

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-07-28 09:20:55 -07:00
Loic Dachary
552b57088b Merge pull request #5191 from theanalyst/v9.0.2/mailmap
doc: mailmap for v9.0.2 release

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-07-28 16:32:04 +02:00
Kefu Chai
72e589595f Merge pull request #5130 from tchaikov/wip-12167
ceph-detect-init: do not require "argparse" on py2.6

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-07-28 21:38:38 +08:00
Kefu Chai
72d18594ef Merge pull request #5338 from hjwsm1989/wip-12459
common/WorkQueue: fix the FTBFS with GCC 4.4.7

* add nested-name-specifier ThreadPool before WorkQueueVal

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-28 21:18:18 +08:00
John Spray
34cb85e784 tools/cephfs: respect mds_root_ino_[gid|uid]
...while injecting inodes.  So that if you're a cephfs
admin but not uid=0 on the client, you can get things
injected as your choice of uid/gid.

Definitely useful for dev/test, potentially useful
elsewhere too.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 14:15:00 +01:00
John Spray
4e42414021 mds: configurable uid/gid on new root inos
This is to deal with the slightly perverse situation
where a user might have all the permissions they need
to create a filesystem and mount it with fuse, but then
be unable to do anything inside the mount because
we default to creating a root-owned "/" inode.

This is immediatley useful for dev/test environments without
root, but also potentially in production environments
where the filesystem configuration/mounting is done by
someone less privileged than root.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 14:14:58 +01: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
Sage Weil
9d80d447f0 Merge pull request #5355 from ceph/wip-anotate-s-files
Anotate all the .s files

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-28 09:10:49 -04:00
Sage Weil
14542e7f7a Merge pull request #5116 from yuyuyu101/wip-compressor
Wip compressor

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-28 09:05:04 -04:00
x11507
d8395cfc76 modified librados-intro.rst
Signed-off-by: x11507 <xu.donghai@h3c.com>
2015-07-28 20:19:46 +08:00
Kefu Chai
11e313e5cc Merge pull request #5254 from vuhuong/wip-xio
@vuhuong sorry for the latency, could you please rebase & repush , to poke the built bot again?

once the build completes, will get it merged.

thanks,
2015-07-28 18:49:49 +08:00
Kefu Chai
91ecba186f osd/ReplicatedPG: claim the read buffer instead of copying it
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-28 17:54:08 +08:00
Haomai Wang
ef824a3da0 Merge pull request #5349 from yuyuyu101/wip-async-fix-21
AsyncConnection: Exit process loop if entering fault
2015-07-28 17:20:44 +08:00
John Spray
61643c14f2 mds: reinstate conditional destruction
Still got xlist not empty asserts on deletion of MDSRank,
so reinstate the condition that we only delete on
is_stopped().

Additionally, allow deletion in the case that we never had
a rank to begin with.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:09 +01:00
John Spray
37370c7f56 mds: fix standby handling in map
I broke this by taking the state from
the old mdsmap instead of the new one.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:09 +01:00
John Spray
4fd6c3ba03 squashme: move peer failure handling up in handle_mds_map
squash into: mds: big MDS refactor stage 2: encapsulation
2015-07-28 09:05:09 +01:00
John Spray
1cc3cd5d46 squashme: initialize max_purge_ops
squash into mds/StrayManager: don't acces OSDMap during construction
2015-07-28 09:05:09 +01:00
John Spray
d563fffaa8 mds: make SnapServer handle old osd maps
(i.e. those missing pools mentioned in the mdsmap)

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
7337db501f mds: handle data pools missing from osdmap
This case happens on rank acquisition because we
see the MDSMap before the OSDMap, as the continuous
watch on OSDMaps doesn't happen when we're in standby.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
3348413794 mds: make Server::mds private
Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
ede621dad0 mds: s/MDS/MDSDaemon/ for clarity
It's now a bit confusing to have a class just called "MDS" --
rename it to MDSDaemon to make the distinction clear between
this and MDSRank.

It's easy because there are hardly any references to it now!  This
patch also clears up a few stray references that were no longer
needed in OSDMap and Messenger.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
e280f72993 mds: remove unneeded MDS.h includes
Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
e065dd7449 mds: make whoami and incarnation private
get_nodeid was used many places but not everywhere.

These can also be const now that MDSRank isn't constructed
until a rank is assigned.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
49d0f71258 mds: separate most of MDSRank from dispatcher-like parts
This is the separation between the parts of MDSRank
that are exposed downwards to subsystems, and
the parts that are exposed upwards to the daemon.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
e21c699e2f mds: pass MonClient ref into snapserver & mdbalancer
Thereby avoid having to expose methods on MDSRank
for them to send mon messages.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
7c0b869a75 mds: reinstate legacy 'tell'
Commented it out during refactor, now split
out the MDSRank-ish part.  We can ditch
this at some point but there's no compelling
reason to do it now.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
a4cfd5384b mds: don't construct MDSRank until we have a rank
Now, an MDS in standby doesn't carry around inactive
instances of all the subsystems.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
7e2e3bb505 mds: big MDS refactor stage 2: encapsulation
Encapsulate MDSRank in MDS instead of inheriting from
it.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00
John Spray
794d13c9ff mon/MDSMonitor: reject illegal want_states from MDS
Previously, if a buggy MDS sent a want_state=standby
beacon while it was in a rank-holding state, the MDSMonitor
would end up creating an inconsistent MDSMap.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-28 09:05:08 +01:00