@@ -24,6 +24,7 @@ package ctriface
2424
2525import (
2626 "context"
27+ "encoding/json"
2728 "os"
2829 "os/exec"
2930 "path/filepath"
@@ -523,6 +524,9 @@ func (o *Orchestrator) LoadSnapshot(ctx context.Context, originVmID string, vmID
523524 go func () {
524525 defer close (loadDone )
525526
527+ confStr , _ := json .Marshal (conf )
528+ logger .Debugf ("TEST: CreateVM request: %s" , confStr )
529+
526530 if _ , loadErr := o .fcClient .CreateVM (ctx , conf ); loadErr != nil {
527531 logger .Error ("Failed to load snapshot of the VM: " , loadErr )
528532 logger .Errorf ("snapFilePath: %s, memFilePath: %s, newSnapshotPath: %s" , snap .GetSnapshotFilePath (), snap .GetMemFilePath (), containerSnap .GetDevicePath ())
@@ -552,9 +556,11 @@ func (o *Orchestrator) LoadSnapshot(ctx context.Context, originVmID string, vmID
552556 }()
553557
554558 logger .Debug ("TEST: CreatVM request sent" )
559+ <- loadDone
560+
555561 if o .GetUPFEnabled () {
556562
557- logger .Debug ("TEST: Registering VM with the memory manager" )
563+ logger .Debug ("TEST: Registering VM with snap with the memory manager" )
558564
559565 stateCfg := manager.SnapshotStateCfg {
560566 VMID : vmID ,
@@ -570,12 +576,13 @@ func (o *Orchestrator) LoadSnapshot(ctx context.Context, originVmID string, vmID
570576 logger .Error (err , "failed to register new VM with memory manager" )
571577 }
572578
579+ logger .Debug ("TEST: activate VM in mm" )
573580 if activateErr = o .memoryManager .Activate (vmID ); activateErr != nil {
574581 logger .Warn ("Failed to activate VM in the memory manager" , activateErr )
575582 }
576583 }
577584
578- <- loadDone
585+ // <-loadDone
579586
580587 loadSnapshotMetric .MetricMap [metrics .LoadVMM ] = metrics .ToUS (time .Since (tStart ))
581588
0 commit comments