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

Support new Docker Swarm Mode (Docker 17+) #215

Closed
scnerd opened this issue Jan 19, 2018 · 3 comments
Closed

Support new Docker Swarm Mode (Docker 17+) #215

scnerd opened this issue Jan 19, 2018 · 3 comments

Comments

@scnerd
Copy link
Contributor

scnerd commented Jan 19, 2018

It's official, SwarmSpawner is deprecated. After several days of copying every example configuration I can find, I can't get the latest SwarmSpawner to work on Docker 17+ (specifically 17.12.0-ce).

Any chance spawning Docker Services into a new-style Docker Swarm will get supported any time soon? This repository seems like the perfect place to implement such a feature (seeing as old-style swarms were already supported), now that there's no other alternative.

@scnerd
Copy link
Contributor Author

scnerd commented Jan 25, 2018

I'm currently working on implementing this in scnerd:swarmspawner and it looks like there's some older, possibly stale work in yacchin1205:with-docker-services-api. Neither approach looks nearly mature, but I'm hoping to get my branch robust enough to propose a PR.

@co60ca
Copy link

co60ca commented Jul 17, 2018

Edit: I noticed this Issue is OLD, sorry but it wasn't working last month but I thought I'd share my knowledge:
FYI I patched version 3906f4b

with

diff --git a/dockerspawner/swarmspawner.py b/dockerspawner/swarmspawner.py
index 501047a..f853f0c 100644
--- a/dockerspawner/swarmspawner.py
+++ b/dockerspawner/swarmspawner.py
@@ -105,7 +105,7 @@ class SwarmSpawner(DockerSpawner):
                     source=host_loc,
                     type="bind",
                     read_only=vol["mode"] == "ro",
-                    driver_config=driver,
+                #    driver_config=driver,
                 )
                 for host_loc, vol in self.volume_binds.items()
             ]
@@ -126,7 +126,7 @@ class SwarmSpawner(DockerSpawner):
             "Service %s status: %s", self.service_id[:7], pformat(service_state)
         )

-        if service_state["State"] in {"running", "pending"}:
+        if service_state["State"] in {"running", "pending", "starting"}:
             return None

         else:

and it works for me. You'll note that this isn't a proper fix but might help someone anyway.

@minrk
Copy link
Member

minrk commented Feb 26, 2021

Hi! I’m going through and cleaning up old/stale issues on this repo.

SwarmSpawner has received several updates related to handling service states (e.g. #296), so I think this is probably fixed. Feel free to open a new Issue if you are still having this trouble.

@minrk minrk closed this as completed Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants