Commit Graph

8 Commits

Author SHA1 Message Date
Corey Bryant fcfa499f11 Rename lib/ceph to lib/charms_ceph
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-osd/lib/ceph/. For example, with the current import of
ceph.utils in hooks/ceph_hooks.py, Python finds no utils.py in
/usr/lib/python3/dist-packages/ceph/ and then stops searching.
Therefore, rename lib/ceph to lib/charms_ceph to avoid the conflict.

Depends-On: https://review.opendev.org/#/c/709226
Change-Id: I13ae7c048d8f1eef2ea64b13ae14b51dbfaaf3cd
2020-02-24 15:21:33 +00:00
taodd 8ca701eb87 Fix list-disk action wrongly report osd journal as the non-pristine device
Change-Id: Ib117fc5797447ade75d50a7ff7dae5de473fe7b9
Closes-Bug: #1847988
2019-10-23 15:27:17 +08:00
Frode Nordahl 352d699387
Add pre-flight check for device pristinity
Add `non-pristine` key to `list-disks` action.

No longer attempt to do initializtion of `osd-journal` devices.

Make py27 test noop

Flip pep8 test to py3

Partial-Bug: #1698154
Change-Id: I0ca574fa7f0683b4e8a693b9f62fbf6b39689789
Depends-On: I90a866aa138d18e4242783c42d4c7c587f696d7d
2018-06-04 17:02:11 +02:00
Alex Kavanagh 4e1ecd55b8 Bring ceph-osd to Python 3
* Synced version of charm-helpers
* Synced version of charms.ceph to bring in Py3 compatible library
  methods.

Change-Id: I5ac45740f48a71d9cb0c5943472fc8590a723514
2017-11-17 12:13:54 +00:00
Frode Nordahl c4d4e42c1a Add actions to blacklist osd-devices
The blacklist actions allow for adding and removing devices
to a unit-local list of devices to be skipped during osd
initialization. This list will be used to override the
application level, and thereby deployment wide, 'osd-devices'
configuration option on a individual unit basis.

The pre-existing list-disk action is extended to return
list of blacklisted devices under the 'blacklist' key.

Change-Id: I28a3c5d6076fb496dead3fe3387d9bbbbe9ec083
Closes-Bug: #1730267
2017-11-09 07:06:29 +01:00
Alex Kavanagh b15237b3c5 Fix up the imports on a recent change to follow coding spec
Essentially, we want to avoid doing:

    from module import f1, f2, f2

and instead doL

    import module

    module.f1()

This helps with reading the code and understanding where the functions
come from.

Change-Id: I1bc06441dc5595e8a0c84a5b5c3db5d88b68a4f2
2017-10-25 14:23:13 +01:00
Frode Nordahl 52306f8419 Fix imports for actions
Commit 4bcdddc4a3 code cleanup did
not address actions.

Fixed.

Change-Id: Ic5de38e4d56022e3f72e5dcb08f6a4253e3306ee
Closes-bug: #1726275
2017-10-23 17:18:57 +02:00
Chris MacNaughton 2dfbb5fe47 Add action to list unmounted disks
This action is fairly simple in that it returns
a list of unmounted disks

This also includes a git-sync to pull in charms.ceph
changes.

Change-Id: I0daa514958799cf5899375335e8e9e684df27704
Closes-Bug: 1645481
2016-11-28 16:53:04 -05:00