Skip to content

Commit

Permalink
don't migrate relays
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkasun committed Aug 11, 2023
1 parent db460ec commit ae46ec2
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions controllers/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func migrate(w http.ResponseWriter, r *http.Request) {
continue
}
host.Nodes = append(host.Nodes, node.ID.String())

nodes = append(nodes, node)
}
if err := logic.UpsertHost(&host); err != nil {
Expand Down Expand Up @@ -126,17 +126,6 @@ func migrate(w http.ResponseWriter, r *http.Request) {
}
runUpdates(&ingressNode, true)
}
if node.IsRelay == "yes" && servercfg.Is_EE {
_, relayNode, err := logic.CreateRelay(models.RelayRequest{
NodeID: node.ID,
NetID: node.Network,
RelayedNodes: node.RelayAddrs,
})
if err != nil {
logger.Log(0, "error creating relay for node", node.ID, err.Error())
}
runUpdates(&relayNode, true)
}
}
}

Expand Down Expand Up @@ -198,9 +187,9 @@ func convertLegacyNode(legacy models.LegacyNode, hostID uuid.UUID) models.Node {
node.IsEgressGateway = models.ParseBool(legacy.IsEgressGateway)
node.EgressGatewayRanges = legacy.EgressGatewayRanges
node.IsIngressGateway = models.ParseBool(legacy.IsIngressGateway)
node.IsRelayed = models.ParseBool(legacy.IsRelayed)
node.IsRelay = models.ParseBool(legacy.IsRelay)
node.RelayedNodes = legacy.RelayAddrs
node.IsRelayed = false
node.IsRelay = false
node.RelayedNodes = []string{}
node.DNSOn = models.ParseBool(legacy.DNSOn)
node.PersistentKeepalive = time.Duration(legacy.PersistentKeepalive)
node.LastModified = time.Now()
Expand Down

0 comments on commit ae46ec2

Please sign in to comment.