-
Notifications
You must be signed in to change notification settings - Fork 163
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
Enable dispatcher reconnection logic in Go infra #1854
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 22 files at r1.
Reviewable status: 7 of 22 files reviewed, all discussions resolved (waiting on @scrye)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 22 files at r1.
Reviewable status: 12 of 22 files reviewed, all discussions resolved (waiting on @scrye)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 22 files at r1.
Reviewable status: 17 of 22 files reviewed, all discussions resolved (waiting on @scrye)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 22 files at r1.
Reviewable status: 18 of 22 files reviewed, all discussions resolved (waiting on @scrye)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 22 files at r1.
Reviewable status: 19 of 22 files reviewed, all discussions resolved (waiting on @scrye)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 22 files at r1.
Reviewable status: 20 of 22 files reviewed, 1 unresolved discussion (waiting on @scrye)
go/lib/infra/infraenv/infraenv.go, line 58 at r1 (raw file):
func initNetworking(ia addr.IA, public, bind *snet.Addr, svc addr.HostSVC) (snet.Conn, error) { network, err := snet.NewNetwork(ia, "", "")
This doesn't allow the service to specify which sciond to connect to (obviously doesn't apply to sciond itself ;). The CSGO needs this, the PSGO will need it in the near future (for DRKey).
What about exporting initNetworking, and having it do snet.NewNetwork and snetproxy.NewProxyNetwork, and moving the Listen call into InitMessenger? That way you don't have a 5th argument to InitMessenger that it only uses to pass into initNetworking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 22 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @scrye)
go/path_srv/main.go, line 109 at r1 (raw file):
return 1 } topoAddress := topo.PS.GetById(config.General.ID)
Check that the result isn't nil
.
There was a problem hiding this 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 and @kormat)
go/lib/infra/infraenv/infraenv.go, line 58 at r1 (raw file):
Previously, kormat (Stephen Shirley) wrote…
This doesn't allow the service to specify which sciond to connect to (obviously doesn't apply to sciond itself ;). The CSGO needs this, the PSGO will need it in the near future (for DRKey).
What about exporting initNetworking, and having it do snet.NewNetwork and snetproxy.NewProxyNetwork, and moving the Listen call into InitMessenger? That way you don't have a 5th argument to InitMessenger that it only uses to pass into initNetworking.
I think cutting down on the number of if
s we have in our main
functions makes them a bit easier to read, so I think having one instead of two is a bit cleaner. It also reduces code duplication, as multiple services will only have one branch instead of two.
It also would make sense conceptually, as all the networking bits are hidden behind a single "Gimme a messenger" call.
As more flexibility is needed, the number of arguments will probably increase, but we can change to the Config
object pattern we use in several other places.
go/path_srv/main.go, line 109 at r1 (raw file):
Previously, kormat (Stephen Shirley) wrote…
Check that the result isn't
nil
.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @kormat and @scrye)
go/lib/infra/infraenv/infraenv.go, line 58 at r1 (raw file):
Previously, scrye (Sergiu Costea) wrote…
I think cutting down on the number of
if
s we have in ourmain
functions makes them a bit easier to read, so I think having one instead of two is a bit cleaner. It also reduces code duplication, as multiple services will only have one branch instead of two.It also would make sense conceptually, as all the networking bits are hidden behind a single "Gimme a messenger" call.
As more flexibility is needed, the number of arguments will probably increase, but we can change to the
Config
object pattern we use in several other places.
The Config
pattern probably makes sense. As i mentioned above, this will be needed as soon as the CS uses this, but i'm fine with it being done in a follow-up PR.
go/lib/infra/infraenv/infraenv.go, line 63 at r2 (raw file):
} proxyNetwork := snetproxy.NewProxyNetwork(network) conn, err := proxyNetwork.ListenSCIONWithBindSVC("udp4", public, bind, svc, 0)
There should be a flag to enable/disable using the snet proxy, with it probably defaulting to false
to start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 20 of 27 files reviewed, 2 unresolved discussions (waiting on @kormat and @scrye)
go/lib/infra/infraenv/infraenv.go, line 58 at r1 (raw file):
Previously, kormat (Stephen Shirley) wrote…
The
Config
pattern probably makes sense. As i mentioned above, this will be needed as soon as the CS uses this, but i'm fine with it being done in a follow-up PR.
Ack.
go/lib/infra/infraenv/infraenv.go, line 63 at r2 (raw file):
Previously, kormat (Stephen Shirley) wrote…
There should be a flag to enable/disable using the snet proxy, with it probably defaulting to
false
to start.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 7 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved
Also:
snetproxy
networking-related interfaces intosnet
infraenv
Fixes #1474.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)