This puts the implementation a bit more in line with microceph's,
which delegates some checks to the ceph command.
Fixes a bug for `get_cephfs`, returning the true list of filesystems
instead of `None`.
Change-Id: I78a9906845bca398b9d81fa5cf8908cd59e67974
Starting with Pacific, the 'osd blacklist' command was renamed to
'osd blocklist'. This patchset changes the allowed commands to
reflect this change.
Change-Id: If2169734f67d21c1c7c1b75677f14ebd0ea054ae
Closes-Bug: #1968369
The code currently assumes that a empty list will be passed rather than
None, so this change defensively codes against a None being passed
(deserialised from json) so that it is correctly parsed as "no extra
pools". Also modified the test to push None to the function to verify
that it handles the situation
Change-Id: I27220696f64b65280f24cab2328e1366fcbbdf4f
Closes-Bug: #1897574
If ceph-fs requests additional pools are added to the ceph fs
share to be created then add them once the share is created.
This allows ceph-fs to specify replicated pools for metadata and
default datapool but to then extend the fs with EC pools.
Change-Id: I80b7a5cc87d7d53bb55d4d65999a0f9b3cdcb77d
Use the Pool classes ability to initialize themselves from op.
Some pool properties should be allowed adjusted after a pool is
created.
The Pool quota property is already handled ad-hoc in the
`charms.ceph` broker handling code, let's bring it over to the
pool objects along with the handling of the compression properties.
Move some missing unit tests here from ceph-mon charm.
Merge after https://github.com/juju/charm-helpers/pull/497
Change-Id: Ibec4e3221387199adbc1a920e130975d7b25343c
Add support to allow 'allow_ec_overwrites' to be set on a pool,
supporting RBD and CephFS uses cases for Erasure Coding.
Add support to allow the EC technique to be provided when
creating EC profiles.
Add support for extended configuration of EC plugins.
Depends-On: https://github.com/juju/charm-helpers/pull/498
Change-Id: I2547933964849f7af1c623b2fbc014fb332839ef
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Change-Id: Id257b597368aff252ce7120b9dbc02f21a41e629
The new python3-ceph-common deb package (introduced in ceph octopus)
adds a new ceph directory (a parent package in python terms) in
/usr/lib/python3/dist-packages/ceph/. This results in a conflict with
charm-ceph-xyz/lib/ceph/ on imports. For example, with the current
import of ceph.utils in ceph-osd/hooks/ceph_hooks.py, Python finds no
utils.py in /usr/lib/python3/dist-packages/ceph/ and then stops
searching. Therefore, rename ceph to charms_ceph to avoid the
conflict.
Change-Id: I6eaf03e291f65125269b1836dd2636806f9945e1
Ensure that the default permissions for clients include the
'osd blacklist' command; This ensures that in the event of
a client crashing (due to power outage or segfault), the
client and re-connect and write to any devices on reboot.
Change-Id: I0b43dece4e1c56fb838b0147bfb75fb9906e6657
Closes-Bug: 1773449
Use sort_keys when serializing in json format for idempotency under
Python 3; Mock out calls to get_osds in broker test to ensure that
a local install of ceph-common does not cause unit test failures.
Change-Id: I6ce4075fd38e8431372a359cc88332d2da7a3974
The grammer for ceph osd capabilities shows that permissions can
be applied to a pool or to a object_prefix:
match := [pool[=]<poolname> | object_prefix <prefix>]
This patch adds support for requesting object_prefix permissions on
a given set of prefixes.
http://docs.ceph.com/docs/firefly/man/8/ceph-authtool/#osd-capabilities
Partial-Bug: #1696073
Change-Id: I799f87fe2178ed7d3e44f14e2fa0683f917d2f0d
Add unit tests to increase coverage of permissions requests from
broker. This is a prerequisite for work to add object prefix
permissions.
Sort permissions list to ensure permissions string does keep changing
when running under py3.
Change-Id: Ib7f9f59d157edbd223e848e7e2fde2e27556f079