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

Fix conflicting hostname problem by making list unique, fixes #789 #825

Merged
merged 1 commit into from
May 21, 2018

Conversation

rfay
Copy link
Member

@rfay rfay commented May 4, 2018

The Problem/Issue/Bug:

OP #789: Since we introduced the additional_hostnames feature, there have been a few reports of people accidentally introducing conflicting hostnames. The most common is probably where the project name is "myname", adding "myname" again in the additional_hostnames. This causes the ddev-router to freak out and fail to preprocess its nginx configs.

How this PR Solves The Problem:

Make sure that the list of hostnames provided to docker-compose.yaml (and thus to ddev-router) is unique.

This PR does not solve the problem of multiple projects competing for one hostname.

Manual Testing Instructions:

For a project named "junk", add "junk" in additional_hostnames config. When you ddev start things should work. This should go down in flames in earlier versions of ddev.

Automated Testing Overview:

This adds the broken case to TestDdevStartMultipleHostnames(), so a regression should be caught there.

Related Issue Link(s):

OP #789

Related: Make ddev-router more transparent about failures: #774

@rfay rfay self-assigned this May 4, 2018
@rfay rfay requested review from cweagans and rickmanelius May 4, 2018 22:46
@rfay rfay force-pushed the 20180504_fix_conflicting_additional_hostname branch 2 times, most recently from acdacc9 to 986667e Compare May 10, 2018 19:26
@rfay rfay force-pushed the 20180504_fix_conflicting_additional_hostname branch 2 times, most recently from 9dd4593 to 454a6cb Compare May 14, 2018 19:08
@rfay rfay requested a review from tannerjfco May 15, 2018 02:06
@rfay rfay added this to the v0.19.0 milestone May 16, 2018
@rfay rfay force-pushed the 20180504_fix_conflicting_additional_hostname branch from 454a6cb to a5add46 Compare May 17, 2018 20:59
Copy link
Contributor

@tannerjfco tannerjfco left a comment

Choose a reason for hiding this comment

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

This works and LGTM. Bonus points for 'uniqueify' :)

@rfay rfay force-pushed the 20180504_fix_conflicting_additional_hostname branch from a5add46 to bec3463 Compare May 18, 2018 03:56
@rfay rfay force-pushed the 20180504_fix_conflicting_additional_hostname branch from bec3463 to 7c62e36 Compare May 18, 2018 14:20
@rfay rfay merged commit addffd6 into ddev:master May 21, 2018
@rfay rfay deleted the 20180504_fix_conflicting_additional_hostname branch May 21, 2018 13:30
@dclear dclear removed this from the v0.19.0 milestone May 31, 2018
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

3 participants