Skip to content
Snippets Groups Projects
Commit 52306f84 authored by Frode Nordahl's avatar Frode Nordahl
Browse files

Fix imports for actions

Commit 4bcdddc4 code cleanup did
not address actions.

Fixed.

Change-Id: Ic5de38e4d56022e3f72e5dcb08f6a4253e3306ee
Closes-bug: #1726275
parent 8ba8bce6
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,10 @@ from charmhelpers.contrib.storage.linux.ceph import ( ...@@ -31,7 +31,10 @@ from charmhelpers.contrib.storage.linux.ceph import (
send_request_if_needed, send_request_if_needed,
) )
import ceph from ceph.utils import (
osdize,
tune_dev,
)
from ceph_hooks import ( from ceph_hooks import (
get_journal_devices, get_journal_devices,
...@@ -39,14 +42,14 @@ from ceph_hooks import ( ...@@ -39,14 +42,14 @@ from ceph_hooks import (
def add_device(request, device_path, bucket=None): def add_device(request, device_path, bucket=None):
ceph.osdize(dev, config('osd-format'), osdize(dev, config('osd-format'),
get_journal_devices(), config('osd-reformat'), get_journal_devices(), config('osd-reformat'),
config('ignore-device-errors'), config('ignore-device-errors'),
config('osd-encrypt'), config('osd-encrypt'),
config('bluestore')) config('bluestore'))
# Make it fast! # Make it fast!
if config('autotune'): if config('autotune'):
ceph.tune_dev(dev) tune_dev(dev)
mounts = filter(lambda disk: device_path mounts = filter(lambda disk: device_path
in disk.device, psutil.disk_partitions()) in disk.device, psutil.disk_partitions())
if mounts: if mounts:
......
...@@ -28,7 +28,7 @@ sys.path.append('lib/') ...@@ -28,7 +28,7 @@ sys.path.append('lib/')
from charmhelpers.core.hookenv import action_set from charmhelpers.core.hookenv import action_set
from ceph import unmounted_disks from ceph.utils import unmounted_disks
if __name__ == '__main__': if __name__ == '__main__':
action_set({ action_set({
......
...@@ -22,7 +22,9 @@ sys.path.append('lib/') ...@@ -22,7 +22,9 @@ sys.path.append('lib/')
from charmhelpers.core.hookenv import action_get, log, config, action_fail from charmhelpers.core.hookenv import action_get, log, config, action_fail
import ceph from ceph.utils import (
replace_osd,
)
""" """
Given a OSD number this script will attempt to turn that back into a mount Given a OSD number this script will attempt to turn that back into a mount
...@@ -90,8 +92,8 @@ if __name__ == '__main__': ...@@ -90,8 +92,8 @@ if __name__ == '__main__':
osd_format = config('osd-format') osd_format = config('osd-format')
osd_journal = config('osd-journal') osd_journal = config('osd-journal')
ceph.replace_osd(dead_osd_number=dead_osd_number, replace_osd(dead_osd_number=dead_osd_number,
dead_osd_device="/dev/{}".format(device_name), dead_osd_device="/dev/{}".format(device_name),
new_osd_device=replacement_device, new_osd_device=replacement_device,
osd_format=osd_format, osd_format=osd_format,
osd_journal=osd_journal) osd_journal=osd_journal)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment