Visitar URL original
Add isolation option to docker service · Issue #31616 · moby/moby · GitHub
Skip to content

Add isolation option to docker service #31616

Closed

Description

@PatrickLang

Proposal
Add --isolation as a parameter to docker service create

Background
Windows supports running containers with two different levels of isolation - process (shared kernel), and hyperv (separate kernel per container). Customers are deploying a mix of these based on their security needs. For example, trusted internal apps may be run with process level isolation to favor higher density, while others may require a separate kernel. Therefore this setting should be service-specific and not host-wide.

I mentioned this at #25209 (comment) but want to track this as a separate specific ask.

Activity

  1. added
    kind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny
    on Mar 8, 2017
  2. carlfischer1 commented on Apr 4, 2017

    @carlfischer1

    @PatrickLang when #32339 is complete can you piggyback a PR on that?

    cc @friism @ehazlett @jhowardmsft

  3. Techwolfy commented on Aug 3, 2017

    @Techwolfy

    Are there any updates on this? I've been running into deployment issues on a mixed-version Windows cluster. While I do have a workaround, I'd prefer to be able to specify all of my deployment settings in a single Compose file. #32339 was merged a few months ago.

    Reposting my comment from #34375 (duplicate) for convenience:

    It is currently impossible to specify a container isolation mode when configuring a swarm service. This isn't relevant for Linux containers, but Windows containers can run with either process (shared kernel) or hyperv (VM) isolation. When using docker swarm to deploy to a mixed-version Windows cluster, it is possible for a container to be scheduled on a node with a different kernel version [1]. A container kernel mismatch isn't significant when running with hyperv isolation but will cause containers using process isolation to fail to start.

    As the default isolation mode is process, deployments to mixed-version Windows clusters currently fail if a mismatch occurs. Even if a cluster initially consists of a single version, mixed-version support is necessary to support online upgrades. Setting "exec-opts":["isolation=hyperv"] in C:\ProgramData\docker\config\daemon.json on each node resolves the issue at the cost of additional overhead.

    The Docker CLI supports an isolation parameter to control the setting when starting containers locally, but not for Swarm services. Docker-Compose supported this option in versions 2.1-2.3 but dropped it with v3.0's Swarm integration, presumably due to this issue. I've opened issues in each to reinstate the option but neither can proceed unless it is added to the Swarm Service API [2].

    [1]: I had trouble finding a concrete answer for this, but MSDN indicates that labels should be used to constrain deployment.

    [2]: Related issues: docker/cli#414, docker/compose#5069

  4. clawrenceks commented on Nov 5, 2017

    @clawrenceks

    I see there has been no activity on this thread since August. Is there any update available, even just to specify whether this is being considered? I have just run into this issue today and I suspect lots more people are going to as container hosts are moved to Windows Server release 1709.

  5. thaJeztah commented on Nov 6, 2017

    @thaJeztah
    Member
  6. clawrenceks commented on Nov 7, 2017

    @clawrenceks

    @thaJeztah Fantastic, thanks for the update. Looks very promising and I will keep my eye on docker/cli#426

  7. simonferquel commented on Nov 17, 2017

    @simonferquel
    Contributor

    All 3 PRs are now merged in master :)

  8. vdemeester commented on Nov 17, 2017

    @vdemeester
    Member

    Thus, I think we can close ! 👍
    Good work @simonferquel 🎉

  9. PatrickLang commented on Nov 17, 2017

    @PatrickLang
    Author

    Thanks all!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/swarmkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions