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

try both 4001 and 2379 etcd ports in SD if not configured #3351

Merged
merged 1 commit into from Jun 6, 2017

Conversation

xvello
Copy link
Contributor

@xvello xvello commented May 29, 2017

What does this PR do?

  • if a port is configured, only try this one
  • else, try on 4001 then 2379

If connection fails, raise a ValueError that is caught in sd_docker_backend

Motivation

This allows a smooth update path to users that upgrade to new versions of etcd and didn't configure their etcd port for SD

Testing Guidelines

Tested manually with:

  • an invalid host (both ports fails, exception raised)
  • no conf and a server listening only on 2379 (4001 will fail, 2379 will succeed)
  • port 2379 configured (only this one is tried)

- if a port is configured, only try this one
- else, try on 4001 then 2379

If connection fails, raise a ValueError that is caught in sd_docker_backend
@xvello xvello requested a review from hkaj May 29, 2017 13:08
@xvello xvello added this to the 5.15 milestone May 29, 2017
Copy link
Member

@hkaj hkaj left a comment

Choose a reason for hiding this comment

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

nice, lgtm

@xvello xvello merged commit d290afe into master Jun 6, 2017
@xvello xvello deleted the xvello/sd_etcd_port_2379 branch June 6, 2017 11:39
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

2 participants