summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-09 18:09:35 -0700
committerSage Weil <sage@inktank.com>2013-08-09 21:24:08 -0700
commitec94b026c1bd09ddcbf5178cab3e3733eb9a898d (patch)
tree8c9f4eaf07433237402c3f64a3f25c18c4b4ff94
parentcb50b5a7f1ab2d4e7fdad623a0e7769000755a70 (diff)
downloadceph-ec94b026c1bd09ddcbf5178cab3e3733eb9a898d.tar.gz
ceph-disk: do not mount -o ''wip-ceph-disk
Let's not trust all distros to be polite about this. Signed-off-by: Sage Weil <sage@inktank.com>
-rwxr-xr-xsrc/ceph-disk29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 0ecfdf02073..23d4e17de54 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -668,15 +668,11 @@ def mount(
)
try:
LOG.debug('Mounting %s on %s with options %s', dev, path, options)
- subprocess.check_call(
- args=[
- 'mount',
- '-o', options,
- '--',
- dev,
- path,
- ],
- )
+ args = ['mount']
+ if options:
+ args.extend(['-o', options])
+ args.extend(['--', dev, path])
+ subprocess.check_call(args=args)
except subprocess.CalledProcessError as e:
try:
os.rmdir(path)
@@ -1366,16 +1362,11 @@ def move_mount(
# /etc/mtab, which *still* isn't a symlink to /proc/mounts despite
# this being 2013. Instead, mount the original device at the final
# location.
- subprocess.check_call(
- args=[
- '/bin/mount',
- '-o',
- mount_options,
- '--',
- dev,
- osd_data,
- ],
- )
+ args = ['/bin/mount']
+ if mount_options:
+ args.extend(['-o', mount_options])
+ args.extend(['--', dev, osd_data])
+ subprocess.check_call(args=args)
subprocess.check_call(
args=[
'/bin/umount',