Make solr/memcached name lookup refer exclusively to the right container #1897
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem/Issue/Bug:
There seems to be a docker bug or (misunderstanding?) about the correct use of a service lookup, as reported by @yanniboi in https://twitter.com/yanni_boi/status/1186941678885703682
If you do not add a "links:" stanza to the web service, then it may find "solr" at the wrong project. This was discovered about the "db" container in #813 and so we used "links:" to make sure it was explicit.
So currently, as was described by @yanniboi , if you have two projects with a solr container, and you
ddev ssh
into each, thenping solr
you may get random results, sometimes referring to one project's solr container, sometimes referring to the other.How this PR Solves The Problem:
Add explicit "links:" to the 3rd-party service definitions to prevent this.
Manual Testing Instructions:
Start two projects that have solr (and memcached and beanstalk)
ddev ssh
andping solr
. You should get the right name resolution and the right container.Automated Testing Overview:
Related Issue Link(s):
#813 discusses this general problem but with the db container
Release/Deployment notes:
This change is made here for the 3 services describe in the main repo, but the change should be made in the ddev-contrib repository as well.