]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
8 years agorbd: recognize lock_on_read option 11313/head
Ilya Dryomov [Mon, 3 Oct 2016 12:09:11 +0000 (14:09 +0200)]
rbd: recognize lock_on_read option

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 years agoMerge pull request #11218 from ceph/wip-getuid
Gregory Farnum [Tue, 4 Oct 2016 05:30:55 +0000 (22:30 -0700)]
Merge pull request #11218 from ceph/wip-getuid

Client: pass "UserPerm" struct everywhere for security checks

Reviewed-by: Jeff Layton <jlayton@redhat.com>
8 years agoMerge pull request #11300 from liewegas/wip-bluestore-onode-add
Sage Weil [Mon, 3 Oct 2016 22:11:57 +0000 (17:11 -0500)]
Merge pull request #11300 from liewegas/wip-bluestore-onode-add

os/bluestore: fix onode cache addition race

8 years agoos/bluestore: fix onode cache addition race 11300/head
Sage Weil [Mon, 3 Oct 2016 21:36:50 +0000 (17:36 -0400)]
os/bluestore: fix onode cache addition race

Two threads may try to add the same onode to the cache.
This is rare, but allowed (in the case of the meta
collection).  If that happens, one of them will just
back off and use the winning onode ref.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11298 from liewegas/wip-mgr-fix
Gregory Farnum [Mon, 3 Oct 2016 18:13:12 +0000 (11:13 -0700)]
Merge pull request #11298 from liewegas/wip-mgr-fix

mgr/MgrClient: fix ms_handle_reset
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
8 years agomgr/MgrClient: fix ms_handle_reset 11298/head
Sage Weil [Mon, 3 Oct 2016 17:59:51 +0000 (13:59 -0400)]
mgr/MgrClient: fix ms_handle_reset

Return false because we don't handle the reset.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11292 from rzarzynski/yj-wip-swift-build_token-cleanup
Radoslaw Zarzynski [Mon, 3 Oct 2016 15:53:19 +0000 (17:53 +0200)]
Merge pull request #11292 from rzarzynski/yj-wip-swift-build_token-cleanup

rgw/swift: remove redundant assignment operation

Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
8 years agoMerge pull request #11019 from liewegas/wip-autotools-must-die
Kefu Chai [Mon, 3 Oct 2016 15:52:38 +0000 (23:52 +0800)]
Merge pull request #11019 from liewegas/wip-autotools-must-die

autotools: remove a few other remaining traces

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11294 from trociny/fixup-qa-rbd_mirror-metadata_set
Jason Dillaman [Mon, 3 Oct 2016 15:50:04 +0000 (11:50 -0400)]
Merge pull request #11294 from trociny/fixup-qa-rbd_mirror-metadata_set

qa/workunits/rbd: set image-meta on primary image and wait it is replicated

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11288 from stiopaa1/osd_replicatedpg_moveCOSDOnAppliedClass
Sage Weil [Mon, 3 Oct 2016 14:26:03 +0000 (09:26 -0500)]
Merge pull request #11288 from stiopaa1/osd_replicatedpg_moveCOSDOnAppliedClass

osd/ReplicatedPG:move C_OSD_OnApplied class to cc

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11289 from stiopaa1/mds_sessionmap_moveStatementUnderAssertPushPv
Sage Weil [Mon, 3 Oct 2016 14:25:36 +0000 (09:25 -0500)]
Merge pull request #11289 from stiopaa1/mds_sessionmap_moveStatementUnderAssertPushPv

mds/SessionMap.h: change statement to assertion

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
8 years agoqa/workunits/rbd: set image-meta on primary image and wait it is replicated 11294/head
Mykola Golub [Mon, 3 Oct 2016 14:02:59 +0000 (17:02 +0300)]
qa/workunits/rbd: set image-meta on primary image and wait it is replicated

After recently added image metadata replication it is not possible any
more to update it on non-primary image.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
8 years agorun-make-check.sh: use cmake exclusively 11019/head
Sage Weil [Thu, 29 Sep 2016 16:33:16 +0000 (12:33 -0400)]
run-make-check.sh: use cmake exclusively

..and drop the separate cmake script

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agomake-debs.sh: use make-dist
Sage Weil [Thu, 8 Sep 2016 15:04:13 +0000 (11:04 -0400)]
make-debs.sh: use make-dist

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agorgw/swift: remove redundant assignment operation 11292/head
Yan Jun [Sat, 23 Jul 2016 07:09:51 +0000 (15:09 +0800)]
rgw/swift: remove redundant assignment operation

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
8 years agoMerge pull request #11086 from bassamtabbara/wip-ec-simd-runtime-detection
Loic Dachary [Mon, 3 Oct 2016 09:43:29 +0000 (11:43 +0200)]
Merge pull request #11086 from bassamtabbara/wip-ec-simd-runtime-detection

erasure-code: Runtime detection of SIMD for jerasure and shec

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
8 years agomds/SessionMap.h: change statement to assertion 11289/head
Michal Jarzabek [Sun, 2 Oct 2016 09:30:20 +0000 (10:30 +0100)]
mds/SessionMap.h: change statement to assertion

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
8 years agoosd/ReplicatedPG:move C_OSD_OnApplied class to cc 11288/head
Michal Jarzabek [Sat, 1 Oct 2016 16:49:34 +0000 (17:49 +0100)]
osd/ReplicatedPG:move C_OSD_OnApplied class to cc

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
8 years agoMerge pull request #11285 from liewegas/wip-mgr-rpm
Dan Mick [Fri, 30 Sep 2016 22:40:35 +0000 (15:40 -0700)]
Merge pull request #11285 from liewegas/wip-mgr-rpm

ceph.spec: fix ceph-mgr version requirement

Reviewed-by: Dan Mick <dmick@redhat.com>
8 years agoclient: in UserPerm, correctly use delete[] and don't leak gids on copy 11218/head
Greg Farnum [Wed, 28 Sep 2016 06:45:56 +0000 (23:45 -0700)]
client: in UserPerm, correctly use delete[] and don't leak gids on copy

gids is an array. We also need to clean it up when deep_copy()ing, which
requires initializing our member fields in the copy-constructor.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
8 years agoceph.spec: fix ceph-mgr version requirement 11285/head
Sage Weil [Fri, 30 Sep 2016 22:13:33 +0000 (18:13 -0400)]
ceph.spec: fix ceph-mgr version requirement

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11282 from liewegas/wip-bluestore-gc-fix
Sage Weil [Fri, 30 Sep 2016 21:17:57 +0000 (16:17 -0500)]
Merge pull request #11282 from liewegas/wip-bluestore-gc-fix

os/bluestore: fix gc when blob extends past eof

8 years agoos/bluestore: fix gc when blob extends past eof 11282/head
Sage Weil [Fri, 30 Sep 2016 21:06:47 +0000 (17:06 -0400)]
os/bluestore: fix gc when blob extends past eof

This can happen if we aren't referencing the bob.  Don't try to
read what isn't logically referenced.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11279 from liewegas/wip-bluestore-gc
Sage Weil [Fri, 30 Sep 2016 18:50:08 +0000 (13:50 -0500)]
Merge pull request #11279 from liewegas/wip-bluestore-gc

os/bluestore: compaction fixes

8 years agoos/bluestore: fix compaction left-side length 11279/head
Sage Weil [Fri, 30 Sep 2016 18:49:35 +0000 (14:49 -0400)]
os/bluestore: fix compaction left-side length

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore: more concise SharedBlob print
Sage Weil [Fri, 30 Sep 2016 18:32:31 +0000 (14:32 -0400)]
os/bluestore: more concise SharedBlob print

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore: cosmetic gc cleanups
Sage Weil [Fri, 30 Sep 2016 18:23:32 +0000 (14:23 -0400)]
os/bluestore: cosmetic gc cleanups

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11271 from stiopaa1/osd_repicatedpg_addOverride
Sage Weil [Fri, 30 Sep 2016 17:57:02 +0000 (12:57 -0500)]
Merge pull request #11271 from stiopaa1/osd_repicatedpg_addOverride

osd/ReplicatedPG.h: add override to virtual funct

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11239 from liewegas/wip-bluestore-max-blob
Sage Weil [Fri, 30 Sep 2016 17:47:58 +0000 (12:47 -0500)]
Merge pull request #11239 from liewegas/wip-bluestore-max-blob

os/bluestore: add max blob size; fix compressed min blob size logic

Reviewed-by: Somnath Roy <somnath.roy@sandisk.com>
8 years agoos/bluestore: set min compressed blob size floor at 2x min_alloc_size 11239/head
Sage Weil [Tue, 27 Sep 2016 17:59:29 +0000 (13:59 -0400)]
os/bluestore: set min compressed blob size floor at 2x min_alloc_size

Otherwise there's not point in compressing--we won't be able to
allocation a smaller space to store it.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore: introduce bluestore_max_blob_size
Sage Weil [Tue, 27 Sep 2016 16:26:13 +0000 (12:26 -0400)]
os/bluestore: introduce bluestore_max_blob_size

This is enforced for compressed and non-compressed blobs alike.
We keep the separate compressoin min and max tunables since these
may be adjusted on a per-pool basis as well.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore: adjust compression blob sizes down
Sage Weil [Tue, 27 Sep 2016 16:20:44 +0000 (12:20 -0400)]
os/bluestore: adjust compression blob sizes down

These were way too big.  64KB is enough to get good compression,
and 4MB is way too big.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore: fix blob depth encoding
Sage Weil [Fri, 30 Sep 2016 17:45:36 +0000 (13:45 -0400)]
os/bluestore: fix blob depth encoding

1) Fix the flag constnat
2) Redefine the meaning to be more intuitive.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11232 from Roushan81/wip-bluestore-blob-gc
Sage Weil [Fri, 30 Sep 2016 14:43:33 +0000 (09:43 -0500)]
Merge pull request #11232 from Roushan81/wip-bluestore-blob-gc

os/bluestore: garbage collect partially overlapped blobs

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11263 from liewegas/wip-bluestore-reshard-slop
Sage Weil [Fri, 30 Sep 2016 14:41:46 +0000 (09:41 -0500)]
Merge pull request #11263 from liewegas/wip-bluestore-reshard-slop

os/bluestore: sloppy reshard boundaries to avoid spanning blobs

Reviewed-by: Somnath Roy <somnath.roy@sandisk.com>
8 years agoMerge pull request #11275 from xiexingguo/xxg-wip-make-audit-buffer-option
Sage Weil [Fri, 30 Sep 2016 14:21:37 +0000 (09:21 -0500)]
Merge pull request #11275 from xiexingguo/xxg-wip-make-audit-buffer-option

os/bluestore: drop redundant call of get_blob

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore: drop redundant call of get_blob 11275/head
xie xingguo [Fri, 30 Sep 2016 09:08:51 +0000 (17:08 +0800)]
os/bluestore: drop redundant call of get_blob

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
8 years agoMerge pull request #11268 from liewegas/wip-bluefs-aio-leak
Sage Weil [Fri, 30 Sep 2016 13:51:39 +0000 (08:51 -0500)]
Merge pull request #11268 from liewegas/wip-bluefs-aio-leak

os/bluestore/BlueFS: release completed aios

8 years agoMerge pull request #11005 from jazeltq/add-sparse-read
Jason Dillaman [Fri, 30 Sep 2016 13:39:58 +0000 (09:39 -0400)]
Merge pull request #11005 from jazeltq/add-sparse-read

rbd-mirror: Add sparse read for sync image

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11168 from trociny/wip-16212
Jason Dillaman [Fri, 30 Sep 2016 13:37:50 +0000 (09:37 -0400)]
Merge pull request #11168 from trociny/wip-16212

rbd-mirror: replicate image metadata settings

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11274 from xiexingguo/xxg-wip-bluestore-0930
Sage Weil [Fri, 30 Sep 2016 13:31:35 +0000 (08:31 -0500)]
Merge pull request #11274 from xiexingguo/xxg-wip-bluestore-0930

os/bluestore: still more cleanups

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11136 from jcsp/wip-16016
John Spray [Fri, 30 Sep 2016 11:41:37 +0000 (12:41 +0100)]
Merge pull request #11136 from jcsp/wip-16016

mds: populate DamageTable from scrub and log more quietly

Reviewed-by: Douglas Fuller <dfuller@redhat.com>
8 years agoMerge pull request #11270 from ceph/wip-17443
Orit Wasserman [Fri, 30 Sep 2016 08:41:25 +0000 (10:41 +0200)]
Merge pull request #11270 from ceph/wip-17443

rgw: set correct instance on the object
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #10328 from jcsp/wip-ceph-mgr
Kefu Chai [Fri, 30 Sep 2016 07:34:04 +0000 (15:34 +0800)]
Merge pull request #10328 from jcsp/wip-ceph-mgr

Create ceph-mgr

Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoos/bluestore: avoid comparing object key and name twice 11274/head
xie xingguo [Fri, 30 Sep 2016 06:53:28 +0000 (14:53 +0800)]
os/bluestore: avoid comparing object key and name twice

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
8 years agoos/bluestore: use id of shard_id_t for encoding
xie xingguo [Fri, 30 Sep 2016 06:28:02 +0000 (14:28 +0800)]
os/bluestore: use id of shard_id_t for encoding

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
8 years agoos/bluestore: kill struct DeferredCsum
xie xingguo [Fri, 30 Sep 2016 05:58:15 +0000 (13:58 +0800)]
os/bluestore: kill struct DeferredCsum

Which is dead, and kill some other dead lines too.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
8 years agoosd/ReplicatedPG.h: add override to virtual funct 11271/head
Michal Jarzabek [Thu, 29 Sep 2016 20:29:35 +0000 (21:29 +0100)]
osd/ReplicatedPG.h: add override to virtual funct

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
8 years agoos/bluestore: add garbage collection 11232/head
Roushan Ali [Tue, 20 Sep 2016 09:55:55 +0000 (02:55 -0700)]
os/bluestore: add garbage collection

Signed-off-by: Roushan Ali <roushan.ali@sandisk.com>
8 years agoMerge pull request #11267 from liewegas/wip-bluestore-ref-map
Sage Weil [Fri, 30 Sep 2016 02:22:04 +0000 (21:22 -0500)]
Merge pull request #11267 from liewegas/wip-bluestore-ref-map

os/bluestore/bluestore_types: uint64_t for ref_map

8 years agorgw: set correct instance on the object 11270/head
Yehuda Sadeh [Fri, 30 Sep 2016 01:35:59 +0000 (18:35 -0700)]
rgw: set correct instance on the object

Fixes: http://tracker.ceph.com/issues/17443
This was broken by commit bc840afafdfe5e528e5c1b711e71420ac3cb5a67

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
8 years agoos/bluestore/BlueFS: be less complainy about fallback allocations 11268/head
Sage Weil [Thu, 29 Sep 2016 22:05:20 +0000 (18:05 -0400)]
os/bluestore/BlueFS: be less complainy about fallback allocations

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoceph_test_objecstore: use 1TB block device 11267/head
Sage Weil [Thu, 29 Sep 2016 21:46:42 +0000 (17:46 -0400)]
ceph_test_objecstore: use 1TB block device

Big enough to get into 32-bit LBAs.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore/bluestore_types: uint64_t for ref_map
Sage Weil [Thu, 29 Sep 2016 21:43:04 +0000 (17:43 -0400)]
os/bluestore/bluestore_types: uint64_t for ref_map

We use this to track raw extents on disk for SharedBlob.  We
also use it for the in-memory Blob with the blob namespace, but
using uint64_t intead of uint32_t doesn't hurt us there.

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoos/bluestore/BlueFS: release completed aios
Sage Weil [Thu, 29 Sep 2016 21:05:53 +0000 (17:05 -0400)]
os/bluestore/BlueFS: release completed aios

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11266 from stiopaa1/osd_passSharedPtrByConstRef
Sage Weil [Thu, 29 Sep 2016 20:17:09 +0000 (15:17 -0500)]
Merge pull request #11266 from stiopaa1/osd_passSharedPtrByConstRef

osd: pass shared_ptr by const reference

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoFix test-erasure-code-plugins.sh test on ARM 11086/head
Bassam Tabbara [Thu, 29 Sep 2016 19:26:43 +0000 (12:26 -0700)]
Fix test-erasure-code-plugins.sh test on ARM

The ISA plugin is not available on ARM, this test now excludes it.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agoerasure-code: improve non-regression testing
Bassam Tabbara [Thu, 22 Sep 2016 19:25:16 +0000 (12:25 -0700)]
erasure-code: improve non-regression testing

Pickup new ec corpus with improved testing.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agodoc: Updated PendingReleaseNotes.
Bassam Tabbara [Wed, 21 Sep 2016 13:47:08 +0000 (06:47 -0700)]
doc: Updated PendingReleaseNotes.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agoerasure-code: Backward compatibility with legacy EC plugins
Bassam Tabbara [Wed, 21 Sep 2016 14:00:01 +0000 (07:00 -0700)]
erasure-code: Backward compatibility with legacy EC plugins

Resurrected jerasure_generic, jerasure_sse3, jerasure_sse4, jerasure_neon,
shec_generic, shec_sse3, shec_sse4 and shec_neon. These all are exact
copies of the new jerasure and shec plugins that support SIMD detection.

Moved EC preload code in ceph-mon and ceph-osd to a central location, added
warning when preloading legacy plugins.

OSMonitor::get_erasure_code and OSDMonitor:normalize_profile will now check
if legacy EC plugins are used and log a warning.

Added tests to check that warnings make it to the log.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agoerasure-code: Move the EC factory code into separate header files
Bassam Tabbara [Mon, 19 Sep 2016 18:19:37 +0000 (11:19 -0700)]
erasure-code: Move the EC factory code into separate header files

This helps the EC factories be invokable directly for testing
and other uses.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agocmake: normalize use of SIMD flags
Bassam Tabbara [Thu, 22 Sep 2016 19:41:58 +0000 (12:41 -0700)]
cmake: normalize use of SIMD flags

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agoerasure-code: Remove SIMD flavors for jerasure and shec
Bassam Tabbara [Thu, 22 Sep 2016 19:40:52 +0000 (12:40 -0700)]
erasure-code: Remove SIMD flavors for jerasure and shec

By switching to a new gf-complete with SIMD runtime detection, we can now remove all the different flavors of jerasure and shec. This simplifies deployment and configuration of erasure coding, enables hetergenous OSDs, and enables us to take advantage of new performance improvements in jerasure without config/build changes.

This commit removes flavors from cmake, removes ErasureCodePluginSelect___, and fixes unit tests. There is now a single plugin for jerasure and a single plugin for shec.

SIMDExt.cmake was changed so that its a little more generic, and is not polluted with gf-complete specific CFLAG defines. The #define for SIMD instruction were based on gf-complete.

I also added a small init helper for jerasure that has code that was common between jerasure and shec.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agoerasure-code: Pickup gf-complete v3 with runtime SIMD detection
Bassam Tabbara [Tue, 20 Sep 2016 19:29:49 +0000 (12:29 -0700)]
erasure-code: Pickup gf-complete v3 with runtime SIMD detection

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agobuild/ops: remove autoconf leftover
Bassam Tabbara [Tue, 20 Sep 2016 19:28:48 +0000 (12:28 -0700)]
build/ops: remove autoconf leftover

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
8 years agoremove do_autogen.sh
Sage Weil [Thu, 8 Sep 2016 15:04:08 +0000 (11:04 -0400)]
remove do_autogen.sh

Signed-off-by: Sage Weil <sage@redhat.com>
8 years agopybind/mgr/rest: remove unused DebugJob 10328/head
John Spray [Tue, 27 Sep 2016 13:19:08 +0000 (14:19 +0100)]
pybind/mgr/rest: remove unused DebugJob

This dates back from the Calamari/Salt days.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agopybind/mgr/rest: fix "sync_object" API endpoint
John Spray [Tue, 27 Sep 2016 13:17:26 +0000 (14:17 +0100)]
pybind/mgr/rest: fix "sync_object" API endpoint

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agovstart: include cython mods in PYTHONPATH
John Spray [Mon, 26 Sep 2016 23:03:28 +0000 (00:03 +0100)]
vstart: include cython mods in PYTHONPATH

This is useful for ceph-mgr because it means that
any in-mgr modules that want to use e.g. rbd
can find it when running in a vstart cluster.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: remove hardcoded site-packages
John Spray [Mon, 26 Sep 2016 22:47:53 +0000 (23:47 +0100)]
mgr: remove hardcoded site-packages

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agopackaging: add debian packaging for ceph-mgr
John Spray [Mon, 26 Sep 2016 21:42:56 +0000 (22:42 +0100)]
packaging: add debian packaging for ceph-mgr

...at least, try to!  This is a copy-paste of the ceph-mds
packaging with a search and replace mds to mgr.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agosystemd: autogenerate ceph-mgr key during daemon startup
Tim Serong [Tue, 20 Sep 2016 13:55:32 +0000 (23:55 +1000)]
systemd: autogenerate ceph-mgr key during daemon startup

This is a hack to inject a key for the mgr daemon, using whatever
key already exists on the mon on this node to gain sufficient
permissions to create the mgr key.  Failure is ignored at every
step (the '-' prefix) in case someone has already used some other
trick to set everything up manually.

Signed-off-by: Tim Serong <tserong@suse.com>
8 years agosystemd: encourage ceph-mgr to start in sync with ceph-mon
Tim Serong [Tue, 20 Sep 2016 12:32:58 +0000 (22:32 +1000)]
systemd: encourage ceph-mgr to start in sync with ceph-mon

This change introduces the following behaviour:

- When ceph-mon starts, it will try to start ceph-mgr with the same
  instance id (Wants=), but will *not* fail to start if ceph-mgr
  doesn't start (i.e. the mon still works as it always did).
- ceph-mgr will start After= ceph-mon, and will stop and start when
  ceph-mon stops and starts, because it's PartOf= ceph-mon.

If you don't want ceph-mgr to run on the mons, you need to mask the
service, i.e. `systemctl mask ceph-mgr@INSTANCE`.  Hostnames are
typically instance names, so `systemctl mask ceph-mgr@$(hostname)`
should suffice if you wish to disable ceph-mgr on the mons.

Signed-off-by: Tim Serong <tserong@suse.com>
8 years agoceph.spec.in: add ceph-mgr package
Tim Serong [Wed, 7 Sep 2016 05:49:58 +0000 (15:49 +1000)]
ceph.spec.in: add ceph-mgr package

This adds ceph-mgr following the same pattern used for ceph-mon,
ceph-mds, ceph-osd.  I've removed the boost-python BuildRequire
for SUSE distros, because we don't ship that (the relevant bits
are already included in boost-devel).

NOTE: This gives an installable ceph-mgr, but not necessarily a
runnable ceph-mgr.  This is because ceph-mgr needs the following
python packages:

- CherryPy
- Django
- gevent
- python-dateutil
- djangorestframework

Not all of these are available as distro packages.  For example,
on openSUSE Tumbleweed, we don't have djangorestframework available
in the base distro, and our Django version is 1.9, which seems to
be incompatible with ceph-mgr.  I'm not sure of the situation on
other distros.

Signed-off-by: Tim Serong <tserong@suse.com>
8 years agosystemd: add ceph-mgr service and target files
Tim Serong [Wed, 7 Sep 2016 05:39:58 +0000 (15:39 +1000)]
systemd: add ceph-mgr service and target files

Signed-off-by: Tim Serong <tserong@suse.com>
8 years agocmake: install ceph-mgr and its python modules
Tim Serong [Wed, 7 Sep 2016 05:39:36 +0000 (15:39 +1000)]
cmake: install ceph-mgr and its python modules

Signed-off-by: Tim Serong <tserong@suse.com>
8 years agopybind/mgr: clean up unused code
John Spray [Mon, 26 Sep 2016 21:17:16 +0000 (22:17 +0100)]
pybind/mgr: clean up unused code

...and change the "if False" django-rest-framework
conditionals to actual version checks, with a view
to genuinely supporting 2.x in future if needed.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: fix OSDMap notifications
John Spray [Mon, 26 Sep 2016 21:12:19 +0000 (22:12 +0100)]
mgr: fix OSDMap notifications

This broken when MgrStandby was separated out,
because it now eats the original OSDMap message
without calling maybe_request_map.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: fixup ClusterState with_*map fns
John Spray [Fri, 23 Sep 2016 13:46:54 +0000 (14:46 +0100)]
mgr: fixup ClusterState with_*map fns

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomon: remove need for friending OSDMap to PGMapUpdater
John Spray [Thu, 22 Sep 2016 17:01:21 +0000 (18:01 +0100)]
mon: remove need for friending OSDMap to PGMapUpdater

This used to be the friend relationship to PGMonitor.  It
was never really needed anyway, it was only being used
to skip the getter on `pools`

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomon: refactor PGMap updating code for reuse in mgr
John Spray [Thu, 22 Sep 2016 16:09:22 +0000 (17:09 +0100)]
mon: refactor PGMap updating code for reuse in mgr

...and remove the copypasta from mgr.

mgr still doesn't do all the same logic (it doesn't
have osdmap history handy) but it is now much easier
to see which bits are used one place vs. the other.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: update for Dispatcher::ms_handle_refused
John Spray [Tue, 20 Sep 2016 15:34:37 +0000 (16:34 +0100)]
mgr: update for Dispatcher::ms_handle_refused

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agocommon: refactor CommandTable
John Spray [Mon, 19 Sep 2016 19:35:28 +0000 (20:35 +0100)]
common: refactor CommandTable

Avoid handling out raw pointers to the ops,
which are in fact owned by the table.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agopackaging: add boost-python dependency
John Spray [Mon, 5 Sep 2016 16:12:27 +0000 (17:12 +0100)]
packaging: add boost-python dependency

Although ceph-mgr isn't packaged yet, builders
use these files to cue installation of dependencies.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agodoc: add initial ceph-mgr docs
John Spray [Wed, 31 Aug 2016 11:19:34 +0000 (12:19 +0100)]
doc: add initial ceph-mgr docs

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agopybind/mgr: add fsstatus module
John Spray [Thu, 4 Aug 2016 14:02:28 +0000 (15:02 +0100)]
pybind/mgr: add fsstatus module

A demonstration of creating a simple
ASCII-art status display by fusing
the metadata, perf counters, and maps that
are available to python modules in ceph-mgr.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: skip past broken modules and load the rest
John Spray [Mon, 8 Aug 2016 16:09:12 +0000 (17:09 +0100)]
mgr: skip past broken modules and load the rest

...instead of stopping at the first python module
that fails to load.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgrc: less vebose logging of messages
John Spray [Mon, 8 Aug 2016 16:08:42 +0000 (17:08 +0100)]
mgrc: less vebose logging of messages

...no need to tell us about all the things you're *not* handling.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomon: implement MgrMonitor.preprocess_beacon
John Spray [Thu, 4 Aug 2016 21:07:33 +0000 (22:07 +0100)]
mon: implement MgrMonitor.preprocess_beacon

So that we're not throwing out new mgrmap epochs
every beacon.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: expose osd stats from pgmap
John Spray [Thu, 4 Aug 2016 14:04:43 +0000 (15:04 +0100)]
mgr: expose osd stats from pgmap

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: dispose of connections after handle_command
John Spray [Thu, 4 Aug 2016 14:04:17 +0000 (15:04 +0100)]
mgr: dispose of connections after handle_command

...to avoid leaking them and eventually running out of fds.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgrc: mark down connections with dead sessions
John Spray [Thu, 4 Aug 2016 14:03:51 +0000 (15:03 +0100)]
mgrc: mark down connections with dead sessions

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agopybind/mgr: fix logging
John Spray [Thu, 4 Aug 2016 14:01:30 +0000 (15:01 +0100)]
pybind/mgr: fix logging

Previously only the errors were getting through, because
other stuff was getting held up in the python logging
framework.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: expose "df" to python modules
John Spray [Sun, 31 Jul 2016 22:23:54 +0000 (23:23 +0100)]
mgr: expose "df" to python modules

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomon: move "df" dump code from PGMonitor to PGMap
John Spray [Sun, 31 Jul 2016 22:23:09 +0000 (23:23 +0100)]
mon: move "df" dump code from PGMonitor to PGMap

...so that ceph-mgr can use it too.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agocommon/TextTable: add include guards
John Spray [Sun, 31 Jul 2016 22:22:19 +0000 (23:22 +0100)]
common/TextTable: add include guards

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agopybind/mgr: update rest module for pg_summary
John Spray [Sun, 31 Jul 2016 22:21:41 +0000 (23:21 +0100)]
pybind/mgr: update rest module for pg_summary

...which is now generated properly from PGMap
instead of reconstituted from some JSON.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgr: handle PGStats with a PGMap
John Spray [Sun, 31 Jul 2016 17:07:20 +0000 (18:07 +0100)]
mgr: handle PGStats with a PGMap

No longer need the mon to send us
the pg_summary json hack.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agoosd: send PGStats to mgr as well as mon
John Spray [Sun, 31 Jul 2016 17:06:09 +0000 (18:06 +0100)]
osd: send PGStats to mgr as well as mon

This is a rough implementation that sends all the stats,
without the efficiency of the queue+acks that we use
when talking to the mon.

Signed-off-by: John Spray <john.spray@redhat.com>
8 years agomgrc: enable sending pgstats
John Spray [Sun, 31 Jul 2016 17:05:53 +0000 (18:05 +0100)]
mgrc: enable sending pgstats

Signed-off-by: John Spray <john.spray@redhat.com>