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

Rewrite mount.fuse.ceph (to python) and move ceph-fuse options to fs_mntops #11448

Merged
merged 1 commit into from Feb 3, 2017

Conversation

Projects
None yet
5 participants
@ledgr
Contributor

ledgr commented Oct 12, 2016

Rewrote mount.fuse.ceph to move ceph-fuse options to fs_mntops, where it should be.
Bash version with options in fs_spec is counterintuitive and cause issues in some
situations (systemd, for example)

@ledgr ledgr force-pushed the ledgr:change/mount_fuse_ceph_options_in_fs_mntops_and_python branch from 2332fad to 98927e8 Oct 12, 2016

@jcsp

This comment has been minimized.

Contributor

jcsp commented Oct 14, 2016

I don't think any of our automated testing covers this. How have you tested it?

@ledgr

This comment has been minimized.

Contributor

ledgr commented Oct 14, 2016

We have used this script for half a year for our project. Then switched to kernel client.
It works with standard fuse and systemd .mount, and .automount units. We didn't do any sophisticated tests.

@ledgr

This comment has been minimized.

Contributor

ledgr commented Oct 14, 2016

Systemd mount unit file used:

[Unit]
Description=Mount /home as ceph-fuse client
DefaultDependencies=yes
After=remote-fs-pre.target network.target network-online.target

[Install]
WantedBy=multi-user.target

[Mount]
What=none
Type=fuse.ceph
Options=ceph.name=client.cephfuse-client.domain.tld,nonempty,_netdev
Where=/home

_netdev is necessary: https://www.freedesktop.org/software/systemd/man/systemd.mount.html#Automatic%20Dependencies

In some cases this is not sufficient (for example network block device based mounts, such as iSCSI), in which case _netdev may be added to the mount option string of the unit, which forces systemd to consider the mount unit a network mount.

Systemd automount unit used:

[Unit]
Description=/home ceph-fuse Automount Point
DefaultDependencies=yes
After=remote-fs-pre.target network.target network-online.target

[Automount]
Where=/home
@jcsp

This comment has been minimized.

Contributor

jcsp commented Oct 19, 2016

OK, I think I'm on board with this, but it seems like it wouldn't be hard to make it backward compatible for existing fstabs (i.e. detect if the first column is not none, and parse out the old-style args in this case), so that needs doing before we merge (otherwise it's an unnecessary breaking change)

An update to doc/cephfs/fstab.rst is also needed.

@ktdreyer ktdreyer added the needs-doc label Oct 26, 2016

@jcsp

This comment has been minimized.

Contributor

jcsp commented Nov 29, 2016

@ledgr could you add the backward compatibility change and docs update so that we can merge it? I appreciate this works already in your environment but if we merged it as-is it would break some people's systems and confuse anyone reading the docs.

@jcsp

This comment has been minimized.

Contributor

jcsp commented Nov 29, 2016

(note to self, don't merge until we branch Kraken)

@jcsp

This comment has been minimized.

Contributor

jcsp commented Jan 26, 2017

@ledgr are you still interested in coming back to this?

@ledgr

This comment has been minimized.

Contributor

ledgr commented Jan 26, 2017

@jspc, yes, I will come back to it later this week.

@jspc

This comment has been minimized.

jspc commented Jan 26, 2017

@ledgr - I think you want @jcsp 😁

@ledgr

This comment has been minimized.

Contributor

ledgr commented Jan 26, 2017

Haha, yes, a typo 😁

@ledgr

This comment has been minimized.

Contributor

ledgr commented Jan 26, 2017

@ledgr ledgr force-pushed the ledgr:change/mount_fuse_ceph_options_in_fs_mntops_and_python branch from 98927e8 to 30e62b5 Jan 29, 2017

Rewrite mount.fuse.ceph (to python) and move ceph-fuse options to fs_…
…mntops

Rewrote mount.fuse.ceph to move ceph-fuse options to `fs_mntops`, where it should be.
Bash version with options in `fs_spec` is counterintuitive and cause issues in some
situations (systemd, for example)

Signed-off-by: Edgaras Lukosevicius <edgaras.lukosevicius@gmail.com>

@ledgr ledgr force-pushed the ledgr:change/mount_fuse_ceph_options_in_fs_mntops_and_python branch from 30e62b5 to 35a13e8 Jan 29, 2017

@ledgr

This comment has been minimized.

Contributor

ledgr commented Jan 29, 2017

Updated for backward compatibility with existing fstabs.
Updated docs.

Tested python versions:

Python 2.6.6
Python 2.7.9
Python 3.4.5

Tested mount versions:

mount from util-linux 2.25.2 (libmount 2.25.0: selinux, assert, debug)
mount from util-linux 2.20.1 (with libblkid and selinux support)
mount from util-linux 2.28.2 (libmount 2.28.2: selinux, btrfs, force-mountinfo, assert, debug)
mount from util-linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)

CentOS 7.2 had problems with mount: https://bugzilla.redhat.com/show_bug.cgi?id=1248003
Which is fixed by updating libmount to 2.23.2-33.el7

@jcsp

I don't think any of our automated testing covers this.

I didn't write any tests for this, nor did I test it against multiple ceph-fuse versions

smithfarm added a commit to smithfarm/ceph that referenced this pull request Feb 2, 2017

test_librbd_fsx: flush before discard in krbd mode
We need to sync dirty pages before issuing BLKDISCARD, explained in
a comment.

Fixes: ceph#11448
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit bd05024)

@jcsp jcsp merged commit c6eabe0 into ceph:master Feb 3, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@jcsp

This comment has been minimized.

Contributor

jcsp commented Feb 3, 2017

👍 thank you @ledgr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment