Fix imports for actions
Commit 4bcdddc4a3
code cleanup did
not address actions.
Fixed.
Change-Id: Ic5de38e4d56022e3f72e5dcb08f6a4253e3306ee
Closes-bug: #1726275
This commit is contained in:
parent
8ba8bce657
commit
52306f8419
|
@ -31,7 +31,10 @@ from charmhelpers.contrib.storage.linux.ceph import (
|
|||
send_request_if_needed,
|
||||
)
|
||||
|
||||
import ceph
|
||||
from ceph.utils import (
|
||||
osdize,
|
||||
tune_dev,
|
||||
)
|
||||
|
||||
from ceph_hooks import (
|
||||
get_journal_devices,
|
||||
|
@ -39,14 +42,14 @@ from ceph_hooks import (
|
|||
|
||||
|
||||
def add_device(request, device_path, bucket=None):
|
||||
ceph.osdize(dev, config('osd-format'),
|
||||
get_journal_devices(), config('osd-reformat'),
|
||||
config('ignore-device-errors'),
|
||||
config('osd-encrypt'),
|
||||
config('bluestore'))
|
||||
osdize(dev, config('osd-format'),
|
||||
get_journal_devices(), config('osd-reformat'),
|
||||
config('ignore-device-errors'),
|
||||
config('osd-encrypt'),
|
||||
config('bluestore'))
|
||||
# Make it fast!
|
||||
if config('autotune'):
|
||||
ceph.tune_dev(dev)
|
||||
tune_dev(dev)
|
||||
mounts = filter(lambda disk: device_path
|
||||
in disk.device, psutil.disk_partitions())
|
||||
if mounts:
|
||||
|
|
|
@ -28,7 +28,7 @@ sys.path.append('lib/')
|
|||
|
||||
from charmhelpers.core.hookenv import action_set
|
||||
|
||||
from ceph import unmounted_disks
|
||||
from ceph.utils import unmounted_disks
|
||||
|
||||
if __name__ == '__main__':
|
||||
action_set({
|
||||
|
|
|
@ -22,7 +22,9 @@ sys.path.append('lib/')
|
|||
|
||||
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
|
||||
|
@ -90,8 +92,8 @@ if __name__ == '__main__':
|
|||
osd_format = config('osd-format')
|
||||
osd_journal = config('osd-journal')
|
||||
|
||||
ceph.replace_osd(dead_osd_number=dead_osd_number,
|
||||
dead_osd_device="/dev/{}".format(device_name),
|
||||
new_osd_device=replacement_device,
|
||||
osd_format=osd_format,
|
||||
osd_journal=osd_journal)
|
||||
replace_osd(dead_osd_number=dead_osd_number,
|
||||
dead_osd_device="/dev/{}".format(device_name),
|
||||
new_osd_device=replacement_device,
|
||||
osd_format=osd_format,
|
||||
osd_journal=osd_journal)
|
||||
|
|
Loading…
Reference in New Issue