Skip to content

Commit

Permalink
Replace TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Campion committed Feb 28, 2024
1 parent d6c865b commit f7f92fa
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions kola/tests/misc/tang.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,12 @@ const (
)

func init() {
// The Tang server started here will bind to an IP of a networking interface in the root networking namespace.
// This works because traffic from inside the QEMU VM to that IP will be routed to the host.
// If this causes issues in the future, we could alternatively add another TAP interface to the bridge and let
// the Tang server bind to its IP. That would require the Tang setup to happen outside of these tests and
// introduce complexity in different parts of the code base.
tangPort := 8007
// TODO: I let the Tang server bind to an IP of a networking interface in the root networking namespace. This works because
// traffic from within the VM to that IP will be routed to the host. However, this approach introduces an unappealing dependency
// between this test and how the network is setup for the VMs, and also it might bind Tang to an interface with a public IP.
// An alternative approach would be to add another TAP interface to the bridge and let the Tang server bind there, but that would
// require the Tang setup to happen outside of these tests and introducing more complexity in different parts of the code base.
// I'll decide whether to rewrite this or leave it as it is based on feedback by reviewers.
tangIP, err := getIP()
if err != nil {
fmt.Printf("failed to find IP for the Tang server to bind to: %v\n", err)
Expand Down

0 comments on commit f7f92fa

Please sign in to comment.