Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph-disk: Handle custom mount options for non-default-named clusters #1206

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 20 additions & 21 deletions src/ceph-disk
Original file line number Diff line number Diff line change
Expand Up @@ -1657,34 +1657,33 @@ def mount_activate(
e,
)

# TODO always using mount options from cluster=ceph for
# now; see http://tracker.newdream.net/issues/3253
mount_options = get_conf(
cluster='ceph',
variable='osd_mount_options_{fstype}'.format(
fstype=fstype,
),
)

if mount_options is None:
mount_options = get_conf(
cluster='ceph',
variable='osd_fs_mount_options_{fstype}'.format(
fstype=fstype,
),
)

#remove whitespaces from mount_options
if mount_options is not None:
mount_options = "".join(mount_options.split())

mount_options = None
path = mount(dev=dev, fstype=fstype, options=mount_options)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's no good to use default options in some cases :(


osd_id = None
cluster = None
try:
(osd_id, cluster) = activate(path, activate_key_template, init)

mount_options = get_conf(
cluster=cluster,
variable='osd_mount_options_{fstype}'.format(
fstype=fstype,
),
)

if mount_options is None:
mount_options = get_conf(
cluster=cluster,
variable='osd_fs_mount_options_{fstype}'.format(
fstype=fstype,
),
)

#remove whitespaces from mount_options
if mount_options is not None:
mount_options = "".join(mount_options.split())

# check if the disk is already active, or if something else is already
# mounted there
active = False
Expand Down