Commit Graph

15 Commits

Author SHA1 Message Date
Edward Hope-Morley dd978b7bd0 Code cleanup
* import ordering
* doctrings
* unit tests cleanup
* move code out of __init__.py
* rename files

Change-Id: Id56d4ea1a0cca33df03f40222bbf51a6bef58b20
2017-08-11 12:42:29 +01:00
Corey Bryant 55a89963d6 Add ceph-mgr bootstrap function
As of the Luminous release, Ceph requires ceph-mgr daemons be run
to have a fully functional cluster. [0]

[0] http://docs.ceph.com/docs/master/mgr/administrator/

Change-Id: I31197dcd3ad05c0db3811096c6d88308e7c10658
2017-08-10 20:32:09 +00:00
James Page 43e7a3c691 Call ceph-create-keys for >= Luminos
Ceph Luminos removes the automatic call to ceph-create-keys on
ceph-mon startup; deployment tools are required to call this
after the monitors have been started to create the admin keyring
across the cluster.

ceph-create-keys still blocks until the cluster is in quorum, at
which points keys are created and written out to the normal location
in /etc/ceph.

Change-Id: Ifc9b8aaf3dbce71cb62567ba03455d2196eaf29f
2017-07-05 11:05:22 +01:00
David Ames e60c420377 Do not install NTP when installed in a container
Check if the charm is installed inside a container and do not install
NTP if that is the case.

Change-Id: I9a9a50e724e24aa0d5b04d544a82b2d8202cd181
Partial-Bug: #169051
2017-05-16 10:49:20 -07:00
Xav Paice 59f113d912 Add ceph methods for reweight
Adds the following methods:
- get_ceph_pg_stat
- get_ceph_health
- reweight_osd

Change-Id: I23a1563875cfa53cf4341f17ce14c5322cc955ca
2017-04-28 23:19:45 +12:00
Chris Holcombe 573bad86dc Zap Journals
The is_osd_disk code assumes that the first partition
is the osd journal.  That might not always be the case.
This patch makes that function more general by searching
all partitions on a disk.

Change-Id: I4239ae498b9b6d2d97551d61d1a4f2981f72b88a
2017-04-25 08:29:26 -07:00
James Page 8e58c99777 Fixup python 3 compatibility for subprocess calls
check_output needs to be decoded in py3 environments; provide
a helper wrapper function todo this + update unit tests to deal
with this slightly different approach to UTF-8 decoding.

Change-Id: I95c4fce0d5cc997ba19f22b611cf99fbd5b17dd1
2017-03-10 16:02:48 +00:00
Chris Holcombe e422e65fc9 Fix parse_key
If the returned cephx key from ceph contains [caps] the
parse_key function returns the wrong output.

Partial-Bug: 1665149
Change-Id: Icca4c174fa15b9637732a919ab5149f34260ae0f
2017-02-16 11:00:52 -08:00
Chris MacNaughton 9881001be3 Fix get_named_key
this change allows the get_named_key to check if
a key with the given name already exists (with any
permissions) and returns the named key if so.
Otherwise, it returns a new key created with the
requested name and permissions

Closes-Bug: 1664546
Change-Id: Ifd1ff35e5e55e2f4d480609643174d3bf4afd0c0
2017-02-14 10:09:29 -06:00
Chris MacNaughton 2ecb4f641a Add broker request to move Disk
This allows a remote charm, ideally an OSD unit,
to request that the monitor move a disk to a given
bucket in the Crushmap

Change-Id: I77d8159d588f3b31d6eb1c25cd5ca16e53c6f01d
2016-12-06 14:34:42 -05:00
Chris MacNaughton c79af13c15 Add support for listing unmounted devices
Change-Id: Ia30b3104086a1b1bd45e14f7d328ce383d1e4ee0
2016-11-15 09:45:36 -05:00
James Page 316a1f5d1f Add helper for UCA -> ceph version resolution
resolve_ceph_version will map the provided source configuration
option to an associated UCA/OpenStack release, and the version
of Ceph that the UCA shipped with.

This will be used for generalization of upgrade workflows for all
ceph charms.

Change-Id: I3981347f3e4a0bd1b763d3da0afb65d1b7084a05
Partial-Bug: 1611082
2016-10-20 14:18:12 +01:00
James Page 8ab6c49c86 Downgrade default mon caps
Prior to the introduction of the ceph broker for managing pools,
consuming charms would create their own pools, requiring rw
permissions for on mons.

Drop the 'w' capability as all charms now use the broker for
creation of pools

Change-Id: Iefffe047214555a15c4201fca605f07ac39c8f5c
Partial-Bug: 1424771
2016-10-17 08:58:41 +01:00
James Page 7766bef0b9 Fixup py3 compatibility 2016-09-20 14:49:19 +01:00
Chris Holcombe 13f8e8a1b0 Add pool support to get_named_key
This patch adds a list of pool support into the
get_named_key
function to allow callers to specify the pools the cephx key
should have access to.  This patch also adds in tox testing.
2016-08-04 15:12:00 -07:00