Skip to content
This repository was archived by the owner on Feb 1, 2021. It is now read-only.

Improve node management.#1569

Merged
abronan merged 6 commits intodocker-archive:masterfrom
dongluochen:nodeManagement
Jan 8, 2016
Merged

Improve node management.#1569
abronan merged 6 commits intodocker-archive:masterfrom
dongluochen:nodeManagement

Conversation

@dongluochen
Copy link
Copy Markdown
Contributor

This change improves swarm node management according to proposal #1486.

  1. Introduce pending state. Pending nodes need validation before moving to healthy state. Resolve issues of duplicate ID and no join retry for unreachable node issues.
  2. Expose error and last update time in docker info.
  3. Use connect success/failure to drive state transition between healthy and unhealthy.

Signed-off-by: Dong Chen dongluo.chen@docker.com

1. Introduce pending state. Pending nodes need validation before moving to healthy state. Resolve issues of duplicate ID and dead node drop issues.
2. Expose error and last update time in docker info.
3. Use connect success/failure to drive state transition between healthy and unhealthy.

Signed-off-by: Dong Chen <dongluo.chen@docker.com>
@abronan
Copy link
Copy Markdown
Contributor

abronan commented Jan 4, 2016

Design LGTM. Will review the code and test shortly.

ping @vieux for design approval.

@dongluochen This might need a set of integration tests (or improve the existing ones) to validate that the state machine works and that a node transitions correctly from a state to another. At least for Pending to Healthy and from Healthy to Unhealthy.

@dongluochen
Copy link
Copy Markdown
Contributor Author

@abronan thanks Alex! I'll update test cases soon.

@vieux
Copy link
Copy Markdown
Contributor

vieux commented Jan 5, 2016

@dongluochen small comment, but could we please put └ Error: <none> or └ Error: (none) instead of blanc ?

Signed-off-by: Dong Chen <dongluo.chen@docker.com>
@dongluochen
Copy link
Copy Markdown
Contributor Author

@vieux I updated no error to └ Error: (none). Thanks for the comment.

…l. Each pending node has its own validation interval according to failure count. So reducing sleep interval is not increasing validation frequency for unreachable nodes.

Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
@vieux
Copy link
Copy Markdown
Contributor

vieux commented Jan 7, 2016

LGTM

@vieux vieux added this to the 1.1.0 milestone Jan 7, 2016
@vieux vieux assigned vieux and dongluochen and unassigned vieux Jan 7, 2016
@dongluochen
Copy link
Copy Markdown
Contributor Author

ping @docker/swarm-maintainers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@dongluochen This is just for convenience but can we add a TODO and reference to the issue (#1508) here? Because the comment is there anyway :)

@abronan
Copy link
Copy Markdown
Contributor

abronan commented Jan 7, 2016

Tested and seems to work as expected, just very small nits but LGTM

Signed-off-by: Dong Chen <dongluo.chen@docker.com>
@dongluochen
Copy link
Copy Markdown
Contributor Author

Thanks @abronan! I've updated code accordingly.

@abronan
Copy link
Copy Markdown
Contributor

abronan commented Jan 8, 2016

Sweet! Thanks @dongluochen!

abronan added a commit that referenced this pull request Jan 8, 2016
@abronan abronan merged commit 8b173fd into docker-archive:master Jan 8, 2016
@abronan
Copy link
Copy Markdown
Contributor

abronan commented Jan 8, 2016

🎉

@abronan abronan mentioned this pull request Jan 12, 2016
@dongluochen dongluochen deleted the nodeManagement branch February 2, 2016 18:23
ChristianKniep pushed a commit to ChristianKniep/swarm that referenced this pull request Jul 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants