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

Redeploy breaks when a link is present #142

Closed
ericfode opened this issue Apr 30, 2014 · 5 comments
Closed

Redeploy breaks when a link is present #142

ericfode opened this issue Apr 30, 2014 · 5 comments

Comments

@ericfode
Copy link

To reproduce:

  1. Create a image resource that redeploys on update
  2. Create a container resource that has a link
  3. Run recipe

I think this is caused by the link flag being set improperly on the docker rm... It seems to want a bool not a string.

@bflad
Copy link
Contributor

bflad commented May 4, 2014

I definitely see the problem here. In comparison to #143, I can think of a few possible implementations that might suit us as well.

Maybe inside docker_container redeploy:

...
link = new_resource.link
new_resource.link = nil
remove if exists?
new_resource.link = link
...

Although having a separate remove_container method isn't too bad either, since we really don't need to remove the service files on redeploy. I'd just want to keep it DRY so remove also called remove_container.

We could also implement a docker_link LWRP for specifically handling links since its nuanced in comparison to behavior surrounding containers themselves, then we would remove the link flag from docker_container's remove. Aside with this approach: maybe Docker should also have the ability to add links to running containers, which doesn't currently exist and would have to be submitted?

Thoughts?

@bflad
Copy link
Contributor

bflad commented May 4, 2014

Speaking of the possibility of a docker_link LWRP, I can also think of situations where we'd also want a docker_volume LWRP as well, for the similar reasons. docker rm --volumes=VOLUMES CONTAINER has same nuance as docker rm --link=LINK CONTAINER

That said, we could support actions such as remove_link and remove_volumes on docker_container too. Confusing yet? :)

@ericfode
Copy link
Author

ericfode commented May 5, 2014

Hahaha maybe this would be a good spot to start using the docker api?
On May 4, 2014 2:41 PM, "Brian Flad" notifications@github.com wrote:

Speaking of the possibility of a docker_link LWRP, I can also think of
situations where we'd also want a docker_volume LWRP as well, for the
similar reasons. docker rm --volumes=VOLUMES CONTAINER has same nuance as docker
rm --link=LINK CONTAINER

That said, we could support actions such as remove_link and remove_volumes
on docker_container too. Confusing yet? :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/142#issuecomment-42146131
.

@bflad
Copy link
Contributor

bflad commented May 5, 2014

Haha maybe so but only if we have feature parity across the board.

@bflad
Copy link
Contributor

bflad commented May 7, 2014

I believe this commit will close this issue: e298547

Took your approach of a separate remove_container method as well as splitting out new remove_link and remove_volume actions. I'll release it in 0.35.0.

@bflad bflad closed this as completed May 7, 2014
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

2 participants