diff --git a/go/daemon/network/network.go b/go/daemon/network/network.go index b574d2f..3b6ab70 100644 --- a/go/daemon/network/network.go +++ b/go/daemon/network/network.go @@ -572,20 +572,9 @@ func (n *network) reloadHosts(ctx context.Context) error { return fmt.Errorf("getting hosts from garage: %w", err) } - // TODO there's some potential race conditions here, where - // CreateHost could be called at this point, write the new host to - // garage and the bootstrap, but then this reload call removes the - // host from this bootstrap/children until the next reload. - newBootstrap := currBootstrap newBootstrap.Hosts = newHosts - // the daemon's view of this host's bootstrap info takes precedence over - // whatever is in garage. The garage version lacks the private credentials - // which must be stored locally. - thisHost := currBootstrap.ThisHost() - newBootstrap.Hosts[thisHost.Name] = thisHost - if _, err = n.reload(ctx, nil, &newBootstrap); err != nil { return fmt.Errorf("reloading with new host data: %w", err) } @@ -945,13 +934,8 @@ func (n *network) CreateHost( return JoiningBootstrap{}, fmt.Errorf("putting new host in garage: %w", err) } - // the new bootstrap will have been initialized with both all existing hosts - // (based on currBootstrap) and the host being created. - newBootstrap := currBootstrap - newBootstrap.Hosts = joiningBootstrap.Bootstrap.Hosts - n.logger.Info(ctx, "Reloading local state with new host") - if _, err = n.reload(ctx, nil, &newBootstrap); err != nil { + if err = n.reloadHosts(ctx); err != nil { return JoiningBootstrap{}, fmt.Errorf("reloading child processes: %w", err) } diff --git a/tasks/soon/code/ipv6-support.md b/tasks/soon/code/ipv6-support.md new file mode 100644 index 0000000..6a26a69 --- /dev/null +++ b/tasks/soon/code/ipv6-support.md @@ -0,0 +1,10 @@ +--- +type: task +--- + +# IPv6 Support + +It should be possible for nebula IP ranges to use designated private IPv6 +ranges. Depending on how wide these ranges are it might even be possible for +CreateNetwork to automatically assign an IP range, with some hope that there's +little chance for collision.