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

Set hostname when migrating ephemeral disks over TLS #4648

Merged
merged 3 commits into from
Sep 6, 2018

Conversation

schmichael
Copy link
Member

Not setting the host name led the Go HTTP client to expect a certificate with a DNS-resolvable name. Since Nomad uses ${role}.${region}.nomad names ephemeral dir migrations were broken when TLS was enabled.

Added an e2e test to ensure this doesn't break again as it's very difficult to test and the TLS configuration is very easy to get wrong. Added new certificates for the test as our existing certificates allow localhost,127.0.0.1 which means this bug isn't triggered as those are valid hostnames.

Snuck a little commit in that fixes a race.

Not setting the host name led the Go HTTP client to expect a certificate
with a DNS-resolvable name. Since Nomad uses `${role}.${region}.nomad`
names ephemeral dir migrations were broken when TLS was enabled.

Added an e2e test to ensure this doesn't break again as it's very
difficult to test and the TLS configuration is very easy to get wrong.
@@ -666,13 +666,17 @@ func (c *Client) setServersImpl(in []string, force bool) (int, error) {
addr, err := resolveServer(srv)
if err != nil {
c.logger.Printf("[DEBUG] client: ignoring server %s due to resolution error: %v", srv, err)
mu.Lock()
Copy link
Member

Choose a reason for hiding this comment

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

good drive by fix.

@schmichael schmichael merged commit 6bd5852 into master Sep 6, 2018
@schmichael schmichael deleted the b-migrate-tls branch September 6, 2018 18:31
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants