Made ephemeral unmounting a configurable option

This commit is contained in:
James Page 2012-10-10 11:20:48 +01:00
parent c3918a1acf
commit 5cf8f4dbfa
3 changed files with 13 additions and 3 deletions

View File

@ -30,6 +30,15 @@ options:
.
These devices are the range of devices that will be checked for and
used across all service units.
ephemeral-unmount:
type: string
description: |
Cloud instances provider ephermeral storage which is normally mounted
on /mnt.
.
Providing this option will force an unmount of the ephemeral device
so that it can be used as a OSD storage device. This is useful for
testing purposes (cloud deployment is not a typical use case).
source:
type: string
description: |

View File

@ -115,8 +115,9 @@ def bootstrap_monitor_cluster():
def osdize(dev):
# XXX hack for instances
subprocess.call(['umount', '/mnt'])
e_mountpoint = utils.config_get('ephemeral-unmount')
if e_mountpoint != "":
subprocess.call(['umount', e_mountpoint])
if ceph.is_osd_disk(dev):
utils.juju_log('INFO',

View File

@ -1 +1 @@
83
84