Skip to content
This repository has been archived by the owner on Jan 19, 2018. It is now read-only.

Stopping on Docker provider should remove the containers #389

Open
rtnpro opened this issue Nov 10, 2015 · 8 comments
Open

Stopping on Docker provider should remove the containers #389

rtnpro opened this issue Nov 10, 2015 · 8 comments

Comments

@rtnpro
Copy link
Contributor

rtnpro commented Nov 10, 2015

Issue

Currently, stopping a Nulecule application on Docker provider just stops the running containers. If you have named your containers, an attempt to run the Nulecule application, for the second time, will fail because the names of the containers to be run will collide with the stopped containers from the previous run.

Solution

Instead of just stopping the Docker containers, we should also remove them.

@dustymabe
Copy link
Contributor

So one thing about this is that we are planning to make other steps in the future (see dustymabe@bacf8ac). I think the action of removing the containers would be part of another step (not stop).

Another thing is that we should really re-evaluate having "named" containers. If we need named containers for docker links then we could have nulecule itself come up with random names for the containers to then plug in to the links.

I think Docker 1.9 has basic service discovery where links is possibly no longer needed. Would need some investigation.

@rtnpro
Copy link
Contributor Author

rtnpro commented Nov 10, 2015

Yes, cleaning up containers should go to a different step, and that's in our roadmap. However, this issue leaves the current user experience using Docker provider poor.

The main culprit for this issue is sharing to use hard coded names for docker linking. We have discussed in the past about some way to generate run time data when deploying artifacts, in this case, container ID, name, etc. This won't make much a value addition in case of k8s and openshift, but it can be a useful feature if someone wants to use it.

Noted: I will need to look into service discovery in Docker 1.9.

@dustymabe shall I work on a POC for atomicapp to keep track of values generated during runtime for use in subsequent steps?

@dustymabe
Copy link
Contributor

@rtnpro I'd say for now let's concentrate on beta3 testing/bugfix and revisit this subject next week. Sound reasonable?

@rtnpro
Copy link
Contributor Author

rtnpro commented Nov 10, 2015

@dustymabe yeah!

@rtnpro rtnpro added this to the CDK 2 GA milestone Nov 10, 2015
@dustymabe dustymabe added the GA label Nov 25, 2015
@rtnpro rtnpro removed the GA label Nov 25, 2015
@rtnpro rtnpro assigned rtnpro and unassigned dustymabe Dec 9, 2015
@dustymabe
Copy link
Contributor

talked with rtnpro today. we agreed that this should/could be handled by another command rather than stop.

@rtnpro
Copy link
Contributor Author

rtnpro commented Dec 14, 2015

@dustymabe I am implementing clean command for it, ok?

rtnpro added a commit to rtnpro/atomicapp that referenced this issue Dec 15, 2015


Pods, services, etc. are a first class entity on a Kubernetes
provider, and they get deleted when the provider is stopped.
In the same way, containers, which are a first class entity
on Docker provider, should also get deleted when the provider
is stopped.
@rtnpro rtnpro closed this as completed in b9c6904 Dec 16, 2015
cdrage added a commit that referenced this issue Dec 16, 2015
Remove container on stopping on Docker provider. Fixes #389
dustymabe added a commit that referenced this issue Dec 16, 2015
…ontainers-on-stop

Revert "Remove container on stopping on Docker provider. Fixes #389"
@dustymabe
Copy link
Contributor

We had to re-open because of issues with stop on docker provider. see comments in #457 for details.

@dustymabe dustymabe reopened this Dec 18, 2015
@kadel kadel added blocker and removed blocker labels Feb 4, 2016
@rtnpro rtnpro modified the milestone: CDK 2 GA Feb 11, 2016
@dustymabe
Copy link
Contributor

Removing the blocker label from this. We won't be doing this before GA because:

  • There are issues with removing a docker container from within atomicapp prior to docker 1.9

@dustymabe dustymabe removed the blocker label Feb 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants