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

BR: reconnect to dispatcher support #3040

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

sgmonroy
Copy link
Contributor

@sgmonroy sgmonroy commented Aug 23, 2019

This change is Reviewable

@scrye scrye self-requested a review September 2, 2019 11:02
@scrye scrye assigned scrye and sgmonroy and unassigned scrye Sep 2, 2019
Copy link
Contributor

@scrye scrye left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @sgmonroy)

a discussion (no related file):
Code looks good. Did you manually test this somehow?


a discussion (no related file):
Note that this enables reconnects only on the one snetConn. I think it's sufficient, but just pointing it out to be certain it's intended.


@scrye
Copy link
Contributor

scrye commented Sep 2, 2019

a discussion (no related file):
Also, note that this will try to reconnect forever. There are some use cases where this is awkward (e.g., if the dispatcher socket is incorrect, a BR that starts up will never error out completely). Is this intended?

You can avoid reconnecting forever at the start by passing in a timeout to the Listen.


Copy link
Contributor Author

@sgmonroy sgmonroy left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @scrye)

a discussion (no related file):

Previously, scrye (Sergiu Costea) wrote…

Code looks good. Did you manually test this somehow?

Yes, manual check . I ended up running acceptance test setup, kill the dispatcher, check BR log error, start dispatcher, check BR sends BR IfStateReq packets.


a discussion (no related file):

Previously, scrye (Sergiu Costea) wrote…

Note that this enables reconnects only on the one snetConn. I think it's sufficient, but just pointing it out to be certain it's intended.

Yes, there is only a single snet connection from the control process.


a discussion (no related file):

Previously, scrye (Sergiu Costea) wrote…

Also, note that this will try to reconnect forever. There are some use cases where this is awkward (e.g., if the dispatcher socket is incorrect, a BR that starts up will never error out completely). Is this intended?

You can avoid reconnecting forever at the start by passing in a timeout to the Listen.

BR control is just another infra service and I think at the moment consistent behavior with other infra services.


Copy link
Contributor

@scrye scrye left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Add logic to support automatic reconnect to dispatcher in case of socket
error.
The feature is enable in the config with the ReconnectToDispatcher
option in the General config section.
Copy link
Contributor

@scrye scrye left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Contributor

@scrye scrye left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@sgmonroy sgmonroy merged commit aab8aff into scionproto:master Sep 2, 2019
@sgmonroy sgmonroy deleted the br-ctrl-reconnect branch September 2, 2019 11:52
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.

2 participants