libnetwork prep for docker port persistence policies.#453
libnetwork prep for docker port persistence policies.#453bru7us wants to merge 1 commit intomoby:masterfrom
Conversation
3ff441e to
8c03d6d
Compare
|
@mavenugo, this a minor extension to #285 that just merged today. It enables "preferred" port allocation requests from a range that will support port persistence policies. All we do here is:
This should still be back-compatible with current docker master, but conflicts slightly with PR moby/moby#12927 (@dkjer), which would need to also add the separation of HostPort and HostPortStart if you accept this PR. |
a20cbaa to
66860e5
Compare
This is the libnetwork portion of work required to define port persistence policies (see moby/moby#12622) Remains backward-compatible with docker/docker master Signed-off-by: Dave Russell <bru7us@bru7us.com>
|
Now that moby/moby#12927 got merged - refactored this one to stay backwards compatible with docker master. |
|
Hey @mavenugo, was hoping to get some feedback on this part before I rewrite the docker/docker side. I think I'd use slightly different wording for the policies, something like "--port-persistence = [ default | preferred | enforced ]", but apart from that, the concept hasn't really changed much in my mind from where we ended up in moby/moby#12622 |
|
@mavenugo @aboch @mrjana, Any input on this one? My office had a big outage this morning and had to spend a lot of time reconfiguring our load balancer/proxy after all of our docker hosts restarted. These port persistence policies would have allowed us to auto-recover with no manual input other than restarting the hosts and containers. Would love to continue pressing forward with this. |
|
@bru7us It has been detected that this issue has not received any activity in over 6 months. Can you please let us know if it is still relevant:
Thank you! |
This is the libnetwork portion of work required to define port persistence policies (see moby/moby#12622)
Requesting a port without a range will act in the same way as before (docker master does this).
Specifying a range with port "0" will allocate the next available port from that range.
Specifying a range and a non-zero port will first try to allocate the requested port, then fallback to next available in the range if the requested port is already allocated.
Signed-off-by: Dave Russell bru7us@bru7us.com