Skip to content

Commit 41d119e

Browse files
committed
Coding standards fixes
Signed-off-by: Kristian Feldsam <[email protected]>
1 parent 24b109d commit 41d119e

File tree

2 files changed

+80
-80
lines changed

2 files changed

+80
-80
lines changed

src/vmm_mad/exec/one_vmm_exec.rb

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -549,28 +549,28 @@ def save(id, drv_message)
549549

550550
# Save migration data to remote location
551551
steps << {
552-
:driver => :vmm,
553-
:action => "/bin/cat - >#{mfile}",
554-
:is_local => false,
555-
:stdin => mdata,
556-
:no_extra_params => true
552+
:driver => :vmm,
553+
:action => "/bin/cat - >#{mfile}",
554+
:is_local => false,
555+
:stdin => mdata,
556+
:no_extra_params => true
557557
}
558558
end
559559

560560
steps.concat([
561-
# Save the Virtual Machine state
562-
{
563-
:driver => :vmm,
564-
:action => :save,
565-
:parameters => [:deploy_id, :checkpoint_file, :host]
566-
},
567-
# Execute networking clean up operations
568-
{
569-
:driver => :vnm,
570-
:action => :clean,
571-
:parameters => [:host]
572-
}
573-
])
561+
# Save the Virtual Machine state
562+
{
563+
:driver => :vmm,
564+
:action => :save,
565+
:parameters => [:deploy_id, :checkpoint_file, :host]
566+
},
567+
# Execute networking clean up operations
568+
{
569+
:driver => :vnm,
570+
:action => :clean,
571+
:parameters => [:host]
572+
}
573+
])
574574

575575
action.run(steps)
576576
end
@@ -658,69 +658,69 @@ def migrate(id, drv_message)
658658

659659
# Save migration data to remote location
660660
steps << {
661-
:driver => :vmm,
662-
:action => "/bin/cat - >#{mfile}",
663-
:is_local => false,
664-
:stdin => mdata,
665-
:no_extra_params => true
661+
:driver => :vmm,
662+
:action => "/bin/cat - >#{mfile}",
663+
:is_local => false,
664+
:stdin => mdata,
665+
:no_extra_params => true
666666
}
667667
end
668668

669669
steps.concat([
670-
# Execute a pre-migrate TM setup
671-
{
672-
:driver => :tm,
673-
:action => :tm_premigrate,
674-
:parameters => pre.split,
675-
:stdin => action.data[:vm]
676-
},
677-
# Execute pre-boot networking setup on migrating host
678-
{
679-
:driver => :vnm,
680-
:action => :pre,
681-
:destination => true
682-
},
683-
# Migrate the Virtual Machine
684-
{
685-
:driver => :vmm,
686-
:action => :migrate,
687-
:parameters => [:deploy_id, :dest_host, :host],
688-
:fail_actions => [
689-
{
690-
:driver => :tm,
691-
:action => :tm_failmigrate,
692-
:parameters => failed.split,
693-
:stdin => action.data[:vm],
694-
:no_fail => true
695-
}
696-
]
697-
},
698-
# Execute networking clean up operations
699-
# NOTE: VM is now in the new host. If we fail from now on, oned will
700-
# assume that the VM is in the previous host but it is in fact
701-
# migrated. Log errors will be shown in vm.log
702-
{
703-
:driver => :vnm,
704-
:action => :clean,
705-
:parameters => [:host],
706-
:no_fail => true
707-
},
708-
# Execute post-boot networking setup on migrating host
709-
{
710-
:driver => :vnm,
711-
:action => :post,
712-
:parameters => [:deploy_id, :host],
713-
:destination => true,
714-
:no_fail => true
715-
},
716-
{
717-
:driver => :tm,
718-
:action => :tm_postmigrate,
719-
:parameters => post.split,
720-
:stdin => action.data[:vm],
721-
:no_fail => true
722-
}
723-
])
670+
# Execute a pre-migrate TM setup
671+
{
672+
:driver => :tm,
673+
:action => :tm_premigrate,
674+
:parameters => pre.split,
675+
:stdin => action.data[:vm]
676+
},
677+
# Execute pre-boot networking setup on migrating host
678+
{
679+
:driver => :vnm,
680+
:action => :pre,
681+
:destination => true
682+
},
683+
# Migrate the Virtual Machine
684+
{
685+
:driver => :vmm,
686+
:action => :migrate,
687+
:parameters => [:deploy_id, :dest_host, :host],
688+
:fail_actions => [
689+
{
690+
:driver => :tm,
691+
:action => :tm_failmigrate,
692+
:parameters => failed.split,
693+
:stdin => action.data[:vm],
694+
:no_fail => true
695+
}
696+
]
697+
},
698+
# Execute networking clean up operations
699+
# NOTE: VM is now in the new host. If we fail from now on, oned will
700+
# assume that the VM is in the previous host but it is in fact
701+
# migrated. Log errors will be shown in vm.log
702+
{
703+
:driver => :vnm,
704+
:action => :clean,
705+
:parameters => [:host],
706+
:no_fail => true
707+
},
708+
# Execute post-boot networking setup on migrating host
709+
{
710+
:driver => :vnm,
711+
:action => :post,
712+
:parameters => [:deploy_id, :host],
713+
:destination => true,
714+
:no_fail => true
715+
},
716+
{
717+
:driver => :tm,
718+
:action => :tm_postmigrate,
719+
:parameters => post.split,
720+
:stdin => action.data[:vm],
721+
:no_fail => true
722+
}
723+
])
724724

725725
action.run(steps)
726726
end

src/vmm_mad/remotes/kvm/migrate

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,16 @@ begin
213213

214214
@vm_dir = Pathname.new(action_xml['/VMM_DRIVER_ACTION_DATA/DISK_TARGET_PATH']).cleanpath
215215
@shared = action_xml['/VMM_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/SHARED'].casecmp('YES') == 0
216-
@migrate_file = Pathname.new(action_xml['/VMM_DRIVER_ACTION_DATA/REMOTE_MIGRATE_FILE']).cleanpath
216+
@mig_file = Pathname.new(action_xml['/VMM_DRIVER_ACTION_DATA/REMOTE_MIGRATE_FILE']).cleanpath
217217

218-
kvm_vm = KvmDomain.new(@deploy_id)
218+
kvm_vm = KvmDomain.new(@deploy_id)
219219

220220
# Migration can't be done with domain snapshots, drop them first
221221
kvm_vm.snapshots_delete
222222

223223
# Migrate VMs using shared/local storage
224224
if @shared
225-
rc, _out, err = kvm_vm.live_migrate(@dst_host, @migrate_file)
225+
rc, _out, err = kvm_vm.live_migrate(@dst_host, @mig_file)
226226

227227
cleanup_host(kvm_vm, err) if rc != 0
228228
else

0 commit comments

Comments
 (0)