Feature #595

Support locally initiated migration

Added by Lars Kellogg-Stedman over 9 years ago. Updated about 9 years ago.

Status:ClosedStart date:04/27/2011
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:Core & System
Target version:Release 3.0
Resolution:fixed Pull request:

Description

The security model we have adopted for our environment does not permit ssh connectivity between the hosts in our VM cluster. All operations are initiated from the OpenNebula server. The idea here is that a compromise on one host does not lead to a compromise of the entire cluster.

This model works fine with the stock libvirt tools. For example:

virsh -c qemu+ssh://host0/system migrate --live guest0 qemu+ssh://host1/system

This will contact host0 over ssh and host1 over ssh, which will then talk to each other over a TCP channel selected by KVM.

This doesn't work with OpenNebula out of the box, because the "migrate" action is unilaterally initiated on the source host (host0 in the above example), which will then try to contact host1 over ssh. The attached patch introduces the "--local" (-L) option to one_vmm_ssh.rb, which accepts a comma-delimited list of actions that should be initiated on the OpenNebula server via local_action() rather than on a remote system via remotes_action(). This logic is currently implemented for the 'poll' and 'migrate' actions.

The patch does not modify the default behavior of OpenNebula.

The patch also introduces the "migrate_local" command to handle the local migrate action.

These changes are against "release-2.2" in the git tree.

With this patch in place, our VMM_MAD definition in oned.conf looks like this:

VM_MAD = [
name = "vmm_kvm",
executable = "one_vmm_ssh",
arguments = "-t 15 -r 0 -L migrate kvm",
default = "vmm_ssh/vmm_ssh_kvm.conf",
type = "kvm" ]

And the hosts only accept ssh connections originating from the OpenNebula server.

0002-support-locally-initiated-live-migration.patch Magnifier - patch adding locally initiated migrate action (7.44 KB) Lars Kellogg-Stedman, 04/27/2011 08:06 PM

Associated revisions

Revision e5734fbc
Added by Javi Fontan about 9 years ago

feature #595: vmm changes to support local exec

Added support code to driver libraries so they support both local and remote scripts execution. one_vmm_ssh driver was modified to test these changes.

Revision 89ac12eb
Added by Javi Fontan about 9 years ago

feature #595: changed comments and formating

Revision 856089c3
Added by Javi Fontan about 9 years ago

feature #595: refactored code to eliminate duplicate functionality

Revision a40f1ec5
Added by Javi Fontan about 9 years ago

feature #595: changed comments and formating

Revision 06aff6c8
Added by Javi Fontan about 9 years ago

feature #595: do_actions now accepts default script name

Revision f330549c
Added by Javi Fontan about 9 years ago

feature #595: imm_ssh driver modified to support local and remote

Revision c2ec3598
Added by Javi Fontan about 9 years ago

feature #595: scripts always get id and host as parameters

Revision 48c20f57
Added by Javi Fontan about 9 years ago

feature #595: moved read_configuration to OpenNebulaDriver

Revision 28917152
Added by Javi Fontan about 9 years ago

feature #595: changed initializers to use options hash

Revision a0853526
Added by Javi Fontan about 9 years ago

feature #595: added documentation

Revision 8974940f
Added by Javi Fontan about 9 years ago

feature #595: added tests to OpenNebulaDriver

Revision 2fa21065
Added by Javi Fontan about 9 years ago

feature #595: remove whitespace

Revision dfa86ee3
Added by Javi Fontan about 9 years ago

feature #595: changed one_vmm_ssh to one_vmm_exec, sh driver is deleted

Revision 9d040161
Added by Javi Fontan about 9 years ago

feature #595: added one_vmm_sh wrapper

Revision ccc5b348
Added by Javi Fontan about 9 years ago

feature #595: changed one_vmm_ssh to _exec in oned.conf

Revision 4c124e45
Added by Javi Fontan about 9 years ago

feature #595: tests for OpenNebulaDriver#remotes_action

Revision b659e399
Added by Javi Fontan about 9 years ago

feature #595: tests for OpenNebulaDriver local_action and log

Revision b98e5412
Added by Javi Fontan about 9 years ago

feature #595: changed im_ssh to im_exec

Revision 99b22d8e
Added by Javi Fontan about 9 years ago

feature #595: bug in im_ssh

Revision 77fd34bf
Added by Javi Fontan about 9 years ago

feature #595: changed tm to use new libraries

Revision 053755f5
Added by Javi Fontan about 9 years ago

feature #595: changed ec2 driver to use new libraries

Revision ffc4a884
Added by Javi Fontan about 9 years ago

feature #595: added one_vmm_ssh wrapper

Revision d4117e6b
Added by Javi Fontan about 9 years ago

feature #595: bug in tm driver

Revision dd92014d
Added by Javi Fontan about 9 years ago

feature #595: cleanup comments

Revision df6b4c30
Added by Javi Fontan about 9 years ago

feature #595: change image driver to use new mad libraries

Revision c57a0959
Added by Javi Fontan about 9 years ago

feature #595: changed ec2 driver to use new mad libraries

Revision 62bb25a2
Added by Javi Fontan about 9 years ago

feature #595: cleanup comments and code

Revision 3b1cdb77
Added by Javi Fontan about 9 years ago

feature #595: changed auth driver to use new driver libraries

Revision 8a4f5211
Added by Javi Fontan about 9 years ago

feature #595: changed hook manager to use the new driver library

Revision b8264109
Added by Javi Fontan about 9 years ago

feature #595: changed vmm_dummy to use the new driver library

Revision 6b4243ac
Added by Javi Fontan about 9 years ago

feature #595: changed im_dummy to use the new driver library

Revision 2b321e26
Added by Javi Fontan about 9 years ago

feature #595: comments and code formatting

Revision 1202c182
Added by Javi Fontan about 9 years ago

feature #595: im driver -l option does not get parameters

Revision b66fb90b
Added by Javi Fontan about 9 years ago

feature #595: added im sh and ssh wrappers

Revision cb2140ac
Added by Javi Fontan about 9 years ago

feature #595: removed im_sh driver

Revision b2ba7cd5
Added by Javi Fontan about 9 years ago

feature #595: im_ec2 does not have a remotes dir

Revision 6dfb6114
Added by Javi Fontan about 9 years ago

feature #595: now remotes copy is retried

Revision 867ae0f2
Added by Javi Fontan about 9 years ago

feature #595: added migrate_local action to kvm

Revision 5e6d2183
Added by Javi Fontan about 9 years ago

feature #595: bug in migrate_local script

Revision 19073b47
Added by Javi Fontan about 9 years ago

feature #595: added kvm migrate_local to install.sh

Revision 9fb10706
Added by Javi Fontan about 9 years ago

feature #595: changed tests as the code now is different

Old expectations are still in the test commented as I am not really
sure the code or tests are right.

TODO: revise tests and library behavior

History

#1 Updated by Ruben S. Montero over 9 years ago

  • Assignee set to Javi Fontan
  • Target version changed from Release 2.2 to Release 3.0

OK Thanks for the patch, this is scheduled for the next release.

Thanks again for the contribution :)

#2 Updated by Javi Fontan about 9 years ago

  • Status changed from New to Assigned

#3 Updated by Javi Fontan about 9 years ago

Local migration script is added in 867ae0f. The way to specify the local migration is with arguments:

-l migrate=migrate_local

#4 Updated by Javi Fontan about 9 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Also available in: Atom PDF