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

Kernel parameter fs.may_detach_mounts is necessary even if mount flag is set to slave #13

Closed
jamiejackson opened this issue Oct 20, 2017 · 1 comment
Labels

Comments

@jamiejackson
Copy link
Contributor

I just discovered this role today. It covers a lot of bases, but it might be missing one.

I had been having issues on my host (with another Docker role, FWIW) until I added the following:

    - name: 'may_detach_mounts workaround (https://github.com/moby/moby/pull/34886 & https://github.com/moby/moby/issues/34538#issuecomment-331533940)'
      become: yes
      copy:
        content: |
          fs.may_detach_mounts=1
        dest: /etc/sysctl.d/may_detach_mounts.conf
      register: may_detach_mounts_config
    
    - name: activate may_detach_mounts
      command: sysctl -p  /etc/sysctl.d/may_detach_mounts.conf
      become: yes
      when: may_detach_mounts_config.changed

I see this (https://github.com/haxorof/ansible-role-docker-ce/blob/master/tasks/main-Mountflags.yml) but IIRC, I'd encountered an issue even with that set.

Thoughts?

References:

@haxorof
Copy link
Owner

haxorof commented Oct 21, 2017

Thanks @jamiejackson for letting me know about this. I will have a look at it and read the links you provided.

@haxorof haxorof added the add label Oct 22, 2017
@haxorof haxorof changed the title Account for CentOS may_detach_mounts? Kernel parameter fs.may_detach_mounts is necessary even if mount flag is set to slave Oct 22, 2017
@haxorof haxorof added fix and removed add labels Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants