Commit Graph

70729 Commits

Author SHA1 Message Date
Patrick Donnelly
0b420be7e9
mds: add export_pin feature
This allows the client/admin to pin a directory tree to a particular rank,
preventing its export by the dynamic balancer.

Fixes: http://tracker.ceph.com/issues/17834

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-19 18:21:19 -04:00
Patrick Donnelly
082e86c58f
mds: unify export_targets handling for all exports
This commit moves the MDSMap export_targets updates/handling to MDSRank.  It is
necessary to wait for export_targets to be updated prior to doing any exports
as clients must have sessions open with targets of exports before any export
can be performed. Before this commit, this handling was only done for
migrations initiated by the balancer and not for manual migrations done by the
admin socket.

This fix and refactoring does the following:

o MDSRank now manages export_targets via a map of ranks with DecayCounters.
  MDSRank::hit_export_target enables the Migrator/MDBalancer to hit a rank to
  indicate migration is either desired or in progress. Importantly, updating
  export_targets is now no longer tied to the previous MDBalancer cycle.

o mds_bal_target_removal_min and mds_bal_target_removal_max are removed in
  favor of a DecayRate, via mds_bal_target_decay, which is independent of the
  tick rate.

o Certain balancing state has been pulled out of the MDBalancer into a stack
  variable type (balance_state_t). This is to avoid unnecessary persistence
  of my_targets, imported, and exported maps which made the code confusing.

o try_rebalance is no longer called on MDSMap updates. This was done before
  export target checking was part of the balancer, in 3e36d3202.

o The Migrator now hits a rank in export_targets via MDSRank::hit_export_target
  proportional to how much is being exported and periodically during the
  course of the export. In my testing, one "default" hit (-1) will at least
  keep the target in the export map for about 2 minutes.

o The Migrator will wait until a target is in the export_targets before
  it actually does the export, or abort the export if the target is not
  added in a timely manner.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-18 16:50:00 -04:00
Patrick Donnelly
89e990b608
common: assoc. DecayRate with DecayCounter
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:58:22 -04:00
Patrick Donnelly
3cfd46f0af
mds: dispatch export request
Funnel dispatch through MDCache::dispatch_request so we have only one call site
for Migrator::dispatch_export_dir.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:57:50 -04:00
Patrick Donnelly
26a08f31f7
mds: check projected parent to avoid unsafe access
An anonymous inode may not have a stable parent so immediate migration would
cause a segfault when checking for strays.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:57:46 -04:00
Patrick Donnelly
b2f53b85c3
common/DecayCounter: add delta to value for ::get
This resolves a bug where getting the DecayCounter value before one second has
elapsed will result in 0 always being returned. This is because ::hit will add
to the delta, not the value. The delta is added to the value only in the decay
function which only processes changes after 1 second has elapsed since the last
decay.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:57:34 -04:00
Patrick Donnelly
5f49379afb
common/DecayCounter: remove redundant qualifiers
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:56:55 -04:00
Patrick Donnelly
efb11c6c92
mds: use uint64_t for sum of exported inodes
An int is too likely to overflow.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:56:51 -04:00
Patrick Donnelly
615f342069
mds: organize headers
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:56:46 -04:00
Patrick Donnelly
4bc458cf20
messages: add missing header to MMDSLoadTargets
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-17 22:56:41 -04:00
Patrick Donnelly
9285b029a8
mds: add comment for subtrees MDCache member
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-12 23:17:49 -04:00
Patrick Donnelly
2d2b387372
mds: simplify loops to range-for
No functional change.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-12 23:17:31 -04:00
Patrick Donnelly
36f3bc067f
mds: organize Migrator headers
This follows the coding style guidelines:

https://google.github.io/styleguide/cppguide.html#Declaration_Order

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-11 16:01:36 -04:00
Patrick Donnelly
a10cd1fa45
mds: remove unimplemented function
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-11 16:01:36 -04:00
Patrick Donnelly
c3e0aba808
mds: order MDBalancer header
This follows the coding style guidelines:

https://google.github.io/styleguide/cppguide.html#Declaration_Order

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-04-11 16:01:36 -04:00
Josh Durgin
000629f743 Merge pull request #14461 from dmick/master
stop.sh: boilerplate error (don't stop mon when stopping mgr)

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-04-11 12:35:48 -07:00
Dan Mick
54e6680c8b stop.sh: boilerplate error (don't stop mon when stopping mgr)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2017-04-11 10:42:56 -07:00
Orit Wasserman
8c25738f4b Merge pull request #14376 from cbodley/wip-rgw-forward-canned-acl
rgw: fix for EINVAL errors on forwarded bucket put_acl requests
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2017-04-11 20:30:33 +03:00
Jason Dillaman
d084f68b1c Merge pull request #13105 from rjfd/wip-18481
librbd: deferred image deletion

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-04-11 11:24:21 -04:00
Casey Bodley
179cb5262c Merge pull request #14355 from cbodley/wip-19505
rgw: allow larger payload for period commit

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-04-11 11:13:04 -04:00
Casey Bodley
2dc5789019 Merge pull request #14319 from cbodley/wip-19488
rgw: multisite: fixes for zonegroup redirect

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-04-11 11:12:44 -04:00
Casey Bodley
cde6359659 Merge pull request #14343 from Liuchang0812/wip-rgw-read-user-buckets
rgw: update is_truncated in function rgw_read_user_buckets

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-04-11 11:11:41 -04:00
Kefu Chai
5a00a450b7 Merge pull request #14438 from theanalyst/fix/build-doc
script: build-doc/serve-doc fixes

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-11 22:10:37 +08:00
Sage Weil
b8dc3783c7 Merge pull request #14455 from optimistyzy/411_1
os/bluestore/NVMEDevice: fix the compilation issue for collect_metadata

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-04-11 08:47:40 -05:00
John Spray
93f1b90403 Merge pull request #13698 from ukernel/wip-multimds-misc
mds: miscellaneous multimds fixes

Reviewed-by: John Spray <john.spray@redhat.com>
2017-04-11 14:06:19 +01:00
Jason Dillaman
ca1a132d5a Merge pull request #14453 from trociny/wip-test_mock_InstanceWatcher
test/rbd_mirror: race in TestMockInstanceWatcher on destroy

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-04-11 08:10:20 -04:00
Ricardo Dias
6b54288793
pybind: librbd: added trash API to python RBD binding
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
b844f58481
qa/workunits/rbd: cli testing of rbd trash commands
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
3138bdfba3
rbd: added image-id optional to Info command
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
cad8952bed
rbd: Added image-id optional to Snap commands
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
dba8eb7e3c
rbd: added image_id param to Utils::init_and_open_image
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
46de06ebb2
rbd: added group image remove by id to CLI
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
9438ee9353
librbd: added group image remove by id to API
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
0a25ea0036
rbd: added CLI support for trash operations
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
b70dbccb67
librbd: added trash methods to API
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
cde8a9a3eb
librbd: open image gets name from directory or trash
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
d5e947946b
librbd: added open an image by id to API
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
c7003e0546
cls_rbd: methods to manipulate the rbd_trash object
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ziye Yang
3a3d020d33 bluestore/NVMEDevice: fix the compilation issue for collect_metadata
Signed-off-by: optimistyzy <optimistyzy@gmail.com>
2017-04-11 18:36:09 +08:00
Mykola Golub
abc04e022a test/rbd_mirror: race in TestMockInstanceWatcher on destroy
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-11 11:55:59 +02:00
Loic Dachary
55491d2f8a Merge pull request #14295 from theanalyst/release/10.2.7/notes
doc: release notes for v10.2.7 Jewel

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-11 11:44:29 +02:00
Loic Dachary
a8a71c1d27 Merge pull request #14441 from theanalyst/doc/changelog/v10.2.7
doc: add changelog for v10.2.7

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2017-04-11 11:43:15 +02:00
Kefu Chai
1efff5297f Merge pull request #14426 from tchaikov/wip-13562-kefu
misc: SCA fixes

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-11 17:41:56 +08:00
Haomai Wang
5da652e1d9 Merge pull request #13940 from Adirl/out
msg/async/rdma: Update fix broken compilation

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-04-11 09:13:03 +08:00
Haomai Wang
1a9ab802e8 Merge pull request #14409 from Adirl/conn_info
msg/async/rdma: RDMA-CM, Pass specific ConnMgr info in constructor

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-04-11 09:11:39 +08:00
Haomai Wang
fd1e65fe21 Merge pull request #14410 from Adirl/get_device
msg/async/rdma: RDMA-CM, get_device() by ibv_context

Reviewed-by: Haomai Wang <haomai@xsky.com>
2017-04-11 09:10:26 +08:00
Sage Weil
7e547a10b1 Merge pull request #13073 from chardan/jfw-wip-15475-admin_heap_command
osd: add "heap *" admin command

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-04-10 16:24:14 -05:00
Sage Weil
a320d62cf6 Merge pull request #14235 from nvedant07/bug_fix_3
rados: more info added to pool deletion error

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-10 16:23:18 -05:00
Sage Weil
95d7a531e2 Merge pull request #14022 from batrick/admin-socket-close-error
common: do not print error when asok is closed

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-10 16:22:59 -05:00
Sage Weil
5adc257715 Merge pull request #14292 from joscollin/wip-radosacl-warning
tools: warning, ‘%.16x’ directive output truncated writing 16 bytes into a region of size 9.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-10 16:22:37 -05:00