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

current_resource attribute matching should also depend on container_name #51

Merged
merged 1 commit into from Feb 2, 2014

Conversation

normanjoyner
Copy link
Contributor

When attempting to execute action :run on multiple containers, the first docker will run successfully, and subsequent attempts will not perform any action (assuming the first docker started successfully); alternatively the subsequent attempts could also try to start the container if it failed to start originally.

This pull request will make it such that if container_name is defined, current_resource will also match on the container_name when determining container_id, and other attributes. If container_name is omitted, the provider will behave in the same fashion as before. My stack requires the execution of several :run actions with the same image / command / command line params but different container_names; I tested my recipe using this modified provider to ensure each container started successfully. I don't believe this should modify any other actions, although I have not fully tested this assumption.

…ner_name is not provided or does not match previously launched container
@bflad
Copy link
Contributor

bflad commented Jan 31, 2014

I don't think this is a bad idea. I'd be curious if others have an opinion.

@jayofdoom
Copy link
Contributor

@bflad When I saw this issue, I thought it was an awesome idea. Actually ran into an issue related to this myself, but fixed it in my local cookbooks. Sorta more of a usability issue than a bug, but I'd be +1 to a change like this.

@gabrtv
Copy link

gabrtv commented Jan 31, 2014

+1

@bflad
Copy link
Contributor

bflad commented Feb 2, 2014

Going to merge and fix debug logging location to after this check.

bflad added a commit that referenced this pull request Feb 2, 2014
current_resource attribute matching should also depend on container_name
@bflad bflad merged commit dfdce26 into sous-chefs:master Feb 2, 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

Successfully merging this pull request may close these issues.

None yet

4 participants