From 75188efd9fbc29da4cebfed75d19fba167589f9c Mon Sep 17 00:00:00 2001 From: Matthew R Kasun Date: Tue, 22 Aug 2023 15:24:32 -0400 Subject: [PATCH] update node expiration during migration --- controllers/migrate.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/migrate.go b/controllers/migrate.go index 6bf2e540f..0d365664c 100644 --- a/controllers/migrate.go +++ b/controllers/migrate.go @@ -5,7 +5,6 @@ import ( "fmt" "net" "net/http" - "strconv" "time" "github.com/google/uuid" @@ -201,7 +200,7 @@ func convertLegacyNode(legacy models.LegacyNode, hostID uuid.UUID) models.Node { node.DNSOn = models.ParseBool(legacy.DNSOn) node.PersistentKeepalive = time.Duration(int64(time.Second) * int64(legacy.PersistentKeepalive)) node.LastModified = time.Now() - node.ExpirationDateTime, _ = time.Parse(strconv.Itoa(int(legacy.ExpirationDateTime)), "0") + node.ExpirationDateTime = time.Unix(legacy.ExpirationDateTime, 0) node.EgressGatewayNatEnabled = models.ParseBool(legacy.EgressGatewayNatEnabled) node.EgressGatewayRequest = legacy.EgressGatewayRequest node.IngressGatewayRange = legacy.IngressGatewayRange