mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-12-14 23:49:38 -05:00
Persist Node State to disk after node activation
Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
parent
0501d07f4a
commit
55a1aa783f
10 changed files with 109 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/edgelesssys/constellation/coordinator/peer"
|
||||
"github.com/edgelesssys/constellation/coordinator/pubapi/pubproto"
|
||||
"github.com/edgelesssys/constellation/coordinator/role"
|
||||
"github.com/edgelesssys/constellation/coordinator/state"
|
||||
"github.com/edgelesssys/constellation/coordinator/vpnapi/vpnproto"
|
||||
"go.uber.org/zap"
|
||||
|
|
@ -58,6 +59,11 @@ func (a *API) ActivateAsNode(ctx context.Context, in *pubproto.ActivateAsNodeReq
|
|||
return nil, status.Errorf(codes.Internal, "%v", err)
|
||||
}
|
||||
|
||||
// persist node state on disk
|
||||
if err := a.core.PersistNodeState(role.Node, in.OwnerId, in.ClusterId); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "%v", err)
|
||||
}
|
||||
|
||||
// regularly get (peer) updates from Coordinator
|
||||
a.wgClose.Add(1)
|
||||
go a.updateLoop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue