Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Bad Argument Parsing Destroys "Unrelated" Containers #28

Open
alexmipego opened this issue Jun 17, 2015 · 0 comments
Open

Bad Argument Parsing Destroys "Unrelated" Containers #28

alexmipego opened this issue Jun 17, 2015 · 0 comments

Comments

@alexmipego
Copy link

I've been having trouble with a new setup and I believe I've found a major issue with systemd-docker. I've the following on my unit file:

ExecStart=/opt/bin/systemd-docker --cgroups name=systemd run
--name postgres-ambassador
-v /var/run/docker.sock:/docker.sock
-p 127.0.0.1:5432:5432
--expose 5432
--rm
cpuguy83/docker-grand-ambassador
-name postgres
-sock /docker.sock

As you can see, the container I want to run is named postgres-ambassador and one of the arguments the container receives is "-name postgres". The issue here is that systemd-docker's argument parsing seems to be using "postgres" as the controlled container, instead of the correct "postgres-ambassador".

This is a major issue because it will stop and remove the wrong container. As it is right now, the postgres unit (also launched using systemd-docker) doesn't fail but the container is stopped and destroyed. Trying to restart postgres-ambassador will fail because it's trying to "--rm postgres" and launching "postgres-ambassor" which docker refuses due to a conflicting name. Meanwhile, all links and dependencies to "postgres" will cascade fail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant