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.
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.
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.
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.
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.
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.
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.
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:
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.
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.
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.
Tim Serong [Thu, 30 Jun 2016 06:38:11 +0000 (16:38 +1000)]
mgr: api_docs.py: Update for use outside Calamari
The ceph_state module is implemented in C++, and isn't available at
build time, which causes import failures when api_docs.py tries to
import calamari_rest in order to introspect it (MgrModule is eventually
imported, which in turn tries to import ceph_state, which fails unless
we stub it out).
Additional changes:
* Search calamari_rest.urls (not calamari_web)
calamari_web isn't available - it largely held static content in
Calamari, and in turn included calamari_rest.urls. Here in ceph-mgr we
only have calamari_rest.
* note that --list-urls does nothing, apparently
* Pass actions to old as_view method
django-rest-framework 3.x raises TypeError if the actions argument isn't
passed to as_view().
* Use view().get_view_name() instead of metadata
Attempting to access view().metadata(None)['name'] results in
"AttributeError: 'super' object has no attribute 'metadata'".
* Use somewhat unfriendly field class names
django-rest-framework 3.x seems to have done away with type_label for
fields, so instead use the field's class name, which is somewhat
unfriendly, but arguably better than nothing.
* import global_instance to fix ImportError
This is necessary to avoid what seems to be weird import loops (if this
isn't present, we later get "ImportError: cannot import name
UserRequest" or similar).
* Make api_examples.json optional
This way we at least get bare docs with no examples, rather than no docs
at all.