v1.14.6
This commit is contained in:
@@ -26,17 +26,17 @@ func NewMigrator(cfg *Config, c decortsdk.ClientInterface) Migrator {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *migrator) Migrate(ctxOrigin context.Context, dxVMID, stackID uint64) (bool, error) {
|
||||
func (m *migrator) Migrate(ctxOrigin context.Context, dxVMID, nodeID uint64) (bool, error) {
|
||||
req := compute.MigrateRequest{
|
||||
ComputeID: dxVMID,
|
||||
TargetStackID: stackID,
|
||||
Force: false,
|
||||
ComputeID: dxVMID,
|
||||
TargetNodeID: nodeID,
|
||||
Force: false,
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(ctxOrigin, m.cfg.QueryTimeout)
|
||||
ok, err := m.client.CloudBroker().Compute().Migrate(ctx, req)
|
||||
cancel()
|
||||
if err != nil {
|
||||
return false, errors.Join(err, fmt.Errorf("Migrate VM %d to Node %d", dxVMID, stackID))
|
||||
return false, errors.Join(err, fmt.Errorf("Migrate VM %d to Node %d", dxVMID, nodeID))
|
||||
}
|
||||
return ok, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user