sighupio / furyagent

Apache License 2.0
9 stars 2 forks source link

Autojoin furyagent command #9

Closed lzecca78 closed 4 years ago

lzecca78 commented 4 years ago

to be more complete and resilient, furyagent now will be owner of the join process of the node. I decided to expose an additional parameter to the furyagent.yml config file:

........
clusterComponent:
  node:
    joinCmdMaxRetryMin: 20

that identify the max window time for the exponential backoff to retry. For the exponential backoff i used this library : https://godoc.org/gopkg.in/cenkalti/backoff.v4 that implements a non linear exponential backoff (see tech details here : https://godoc.org/gopkg.in/cenkalti/backoff.v4#ExponentialBackOff) . Basically is a really simple implementation: the download of the join script from s3 bucket and the execution of it is wrapped around the backoff logic. This to avoid every race condition/ network partitioning that may occur during the very first execution after the boot process. Is still to be tested, i would like to do this in pair with @angelbarrera92 to become friendly on the flow and put this under ci possibly in order to avoid regressions in the future. Let me know if you some inconsistencies or enhancements that could be done!

lzecca78 commented 4 years ago

Auto-Join bash logic

angelbarrera92 commented 4 years ago

LGTM! Pending pair testing ;) anyway awesome work Luca ;)

jnardiello commented 4 years ago

Assigned to @angelbarrera92 for final merge.

angelbarrera92 commented 4 years ago

We've got scheduled a demo about this feature for today in the morning ;) after that, we can start thinking in merge this feature ;)

angelbarrera92 commented 4 years ago

Tested, and merging! Thanks @lzecca78!

jnardiello commented 4 years ago

Thanks everyone