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

Don't set container name to node hostname #4

Merged
merged 1 commit into from
Oct 30, 2017

Conversation

jovrum
Copy link
Contributor

@jovrum jovrum commented Sep 19, 2017

As pointed out here, PR #3 introduced a regression by setting the container name to the node hostname by default. This prevents running beaker concurrently with other beaker nodesets containing nodes with the same hostname.

This patch simply leaves that option blank by default (pre-PR3 behavior).

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can verify that the issue and that applying this patch fixes it.

@mchllweeks
Copy link
Contributor

@jovrum Please add a test so we can ensure we don't break this again in the future.

@ekohl
Copy link
Member

ekohl commented Sep 27, 2017

An interesting point could be to enable reusing containers with BEAKER_provision=no which the fixed name could help with but I've never been able to successfully use that with beaker-docker.

@jovrum
Copy link
Contributor Author

jovrum commented Sep 28, 2017

@ekohl, FWIW, you can set docker_container_name in the node definition to get a fixed name.

@jovrum
Copy link
Contributor Author

jovrum commented Sep 28, 2017

@mchllweeks, I amended the commit to fix the tests, but ideally there should be an explicit test of the absence of the 'name' parameter (except for the 'docker_container_name' test), with a comment explaining why.

Any rspec veterans know of a clean way to do that here?

@ekohl
Copy link
Member

ekohl commented Sep 28, 2017

would adding .without('name') work?

@jovrum
Copy link
Contributor Author

jovrum commented Sep 29, 2017

@ekohl, where?

@ekohl
Copy link
Member

ekohl commented Sep 30, 2017

I tried my suggestion but it doesn't work so I'm out of ideas.

@ferglor
Copy link

ferglor commented Oct 9, 2017

@jovrum is hash_excluding what you want? https://github.com/rspec/rspec-mocks listed under "Argument Matchers" in the README

@mchllweeks
Copy link
Contributor

last comment still current

This prevents running beaker concurrently with other beaker nodesets
containing nodes with the same hostname.
@jovrum
Copy link
Contributor Author

jovrum commented Oct 23, 2017

@ferglor, thanks! Updated the test to use hash_excluding.

@mchllweeks
Copy link
Contributor

@puppetlabs-jenkins retest this please

@mchllweeks mchllweeks merged commit 7d6dd43 into voxpupuli:master Oct 30, 2017
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

5 participants