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
Later ceph versions allow the crush_rule to be changed on a pool;
add this key with type str to the list of supported keys for
the pool broker.
Change-Id: I2c405f9a4956ff1ccf1edb7372a9bb11e1e591a4
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
In Ceph >= Luminous, application name needs to be set
on a per-pool level to avoid health warnings. This
change adds support for sending the application name
over the broker channel from consuming charms.
When a name is not sent from the other side of the
relation, the application name will be set to "unknown"
in Luminous and greater
Change-Id: I99ae47b6802f50ea019751ffa328f11567cca567
Closes-Bug: #1753640
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
These changes make the charms.ceph library suitable for both the
old-stable Python 2 charms and the (to be) updates Python 3 only charms.
Avoided use of six by using str() with the decode('UTF-8') function to
allow the library to be used with both Py2 and Py3. The str(...)
coercions can be removed at a later date when the library no longer
needs to be synced to Py2 versions of the ceph-* charms.
Change-Id: I416053439444bf4cf8945d1fe96643f9ed0f05f4