Commit d271c6fd authored by Iustin Pop's avatar Iustin Pop

Add a hypervisor constant for migration support

This variable can be used by other tools to determine in a generic way
whether a given hypervisor supports migration or not.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 96d1a0c5
......@@ -101,10 +101,14 @@ class BaseHypervisor(object):
- a function to check for parameter validity on the remote node,
in the L{ValidateParameters} function
- an error message for the above function
@type CAN_MIGRATE: boolean
@cvar CAN_MIGRATE: whether this hypervisor can do migration (either
live or non-live)
"""
PARAMETERS = {}
ANCILLARY_FILES = []
CAN_MIGRATE = False
def __init__(self):
pass
......
......@@ -40,6 +40,8 @@ class FakeHypervisor(hv_base.BaseHypervisor):
a real virtualisation software installed.
"""
CAN_MIGRATE = True
_ROOT_DIR = constants.RUN_DIR + "/ganeti-fake-hypervisor"
def __init__(self):
......
......@@ -44,6 +44,7 @@ from ganeti.hypervisor import hv_base
class KVMHypervisor(hv_base.BaseHypervisor):
"""KVM hypervisor interface"""
CAN_MIGRATE = True
_ROOT_DIR = constants.RUN_GANETI_DIR + "/kvm-hypervisor"
_PIDS_DIR = _ROOT_DIR + "/pid" # contains live instances pids
......
......@@ -39,6 +39,7 @@ class XenHypervisor(hv_base.BaseHypervisor):
all the functionality that is identical for both.
"""
CAN_MIGRATE = True
REBOOT_RETRY_COUNT = 60
REBOOT_RETRY_INTERVAL = 10
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment