mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Update Java tests to 4.4
This commit is contained in:
1 parent
f00d57c013
commit
77c9bd747e
6 files changed
+330
-80
No files matched your search
@@ -144,7 +144,7 @@ public class GroupTest
|
||||
res = system.getGroupQuotas();
|
||||
assertTrue( res.getErrorMessage(), !res.isError() );
|
||||
|
||||
res = system.setGroupQuotas("VM = [ VMS = 7, MEMORY = 0, CPU = 3]");
|
||||
res = system.setGroupQuotas("VM = [ VMS = 7, MEMORY = 0, CPU = 3, VOLATILE_SIZE = 1 ]");
|
||||
assertTrue( res.getErrorMessage(), !res.isError() );
|
||||
|
||||
Node node = system.getGroupQuotasXML();
|
||||
|
||||
@@ -63,7 +63,7 @@ public class HostTest
|
||||
@Before
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
res = Host.allocate(client, name, "im_dummy", "vmm_dummy", "dummy");
|
||||
res = Host.allocate(client, name, "dummy", "dummy", "dummy");
|
||||
|
||||
int hid = !res.isError() ? Integer.parseInt(res.getMessage()) : -1;
|
||||
host = new Host(hid, client);
|
||||
@@ -76,6 +76,7 @@ public class HostTest
|
||||
public void tearDown() throws Exception
|
||||
{
|
||||
host.delete();
|
||||
Thread.sleep(2000);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -173,7 +173,7 @@ public class UserTest
|
||||
res = system.getUserQuotas();
|
||||
assertTrue( res.getErrorMessage(), !res.isError() );
|
||||
|
||||
res = system.setUserQuotas("VM = [ VMS = 7, MEMORY = 0, CPU = 3]");
|
||||
res = system.setUserQuotas("VM = [ VMS = 7, MEMORY = 0, CPU = 3, VOLATILE_SIZE = 1 ]");
|
||||
assertTrue( res.getErrorMessage(), !res.isError() );
|
||||
|
||||
Node node = system.getUserQuotasXML();
|
||||
|
||||
@@ -82,11 +82,11 @@ public class VirtualMachineTest
|
||||
|
||||
|
||||
res = Host.allocate(client, "host_A",
|
||||
"im_dummy", "vmm_dummy", "dummy");
|
||||
"dummy", "dummy", "dummy");
|
||||
hid_A = Integer.parseInt( res.getMessage() );
|
||||
|
||||
res = Host.allocate(client, "host_B",
|
||||
"im_dummy", "vmm_dummy", "dummy");
|
||||
"dummy", "dummy", "dummy");
|
||||
hid_B = Integer.parseInt( res.getMessage() );
|
||||
|
||||
Datastore systemDs = new Datastore(0, client);
|
||||
@@ -301,6 +301,8 @@ public class VirtualMachineTest
|
||||
assertTrue( vm.xpath("TEMPLATE/CONTEXT/DNS").equals("192.169.1.4") );
|
||||
}
|
||||
|
||||
// TODO
|
||||
/*
|
||||
@Test
|
||||
public void savedisk()
|
||||
{
|
||||
@@ -332,6 +334,11 @@ public class VirtualMachineTest
|
||||
|
||||
vm = new VirtualMachine(vmid, client);
|
||||
|
||||
res = vm.deploy(hid_A);
|
||||
assertTrue( res.getErrorMessage(), !res.isError() );
|
||||
|
||||
waitAssert(vm, "ACTIVE", "RUNNING");
|
||||
|
||||
res = vm.savedisk(0, "New_image");
|
||||
assertTrue( res.getErrorMessage(), !res.isError() );
|
||||
|
||||
@@ -341,7 +348,7 @@ public class VirtualMachineTest
|
||||
res = vm.info();
|
||||
assertTrue( res.getErrorMessage(), !res.isError() );
|
||||
}
|
||||
|
||||
*/
|
||||
@Test
|
||||
public void resize()
|
||||
{
|
||||
|
||||
+309
-73
@@ -6,15 +6,17 @@
|
||||
# Daemon configuration attributes
|
||||
#-------------------------------------------------------------------------------
|
||||
# MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions.
|
||||
# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL can not have smaller values
|
||||
# than MANAGER_TIMER.
|
||||
# MONITORING_INTERVAL cannot have a smaller value than MANAGER_TIMER.
|
||||
#
|
||||
# MONITORING_INTERVAL: Time in seconds between host and VM monitorization.
|
||||
#
|
||||
# HOST_MONITORING_INTERVAL: Time in seconds between host monitorization.
|
||||
# HOST_PER_INTERVAL: Number of hosts monitored in each interval.
|
||||
# HOST_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
|
||||
# information. Use 0 to disable HOST monitoring recording.
|
||||
#
|
||||
# VM_POLLING_INTERVAL: Time in seconds between virtual machine monitorization.
|
||||
# (use 0 to disable VM monitoring).
|
||||
# VM_PER_INTERVAL: Number of VMs monitored in each interval.
|
||||
# VM_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
|
||||
# information. Use 0 to disable VM monitoring recording.
|
||||
#
|
||||
# SCRIPTS_REMOTE_DIR: Remote path to store the monitoring and VM management
|
||||
# scripts.
|
||||
@@ -33,17 +35,30 @@
|
||||
# VNC_BASE_PORT: VNC ports for VMs can be automatically set to VNC_BASE_PORT +
|
||||
# VMID
|
||||
#
|
||||
# DEBUG_LEVEL: 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG
|
||||
# LOG: Configuration for the logging system
|
||||
# system: defines the logging system:
|
||||
# file to log in the oned.log file
|
||||
# syslog to use the syslog facilities
|
||||
# debug_level: 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG
|
||||
#
|
||||
# VM_SUBMIT_ON_HOLD: Forces VMs to be created on hold state instead of pending.
|
||||
# Values: YES or NO.
|
||||
#*******************************************************************************
|
||||
|
||||
LOG = [
|
||||
system = "file",
|
||||
debug_level = 3
|
||||
]
|
||||
|
||||
#MANAGER_TIMER = 30
|
||||
|
||||
HOST_MONITORING_INTERVAL = 600
|
||||
#HOST_PER_INTERVAL = 15
|
||||
MONITORING_INTERVAL = 300
|
||||
|
||||
VM_POLLING_INTERVAL = 600
|
||||
#VM_PER_INTERVAL = 5
|
||||
#HOST_PER_INTERVAL = 15
|
||||
#HOST_MONITORING_EXPIRATION_TIME = 86400
|
||||
|
||||
#VM_PER_INTERVAL = 5
|
||||
#VM_MONITORING_EXPIRATION_TIME = 86400
|
||||
|
||||
SCRIPTS_REMOTE_DIR=/var/tmp/one
|
||||
|
||||
@@ -61,7 +76,35 @@ DB = [ backend = "sqlite" ]
|
||||
|
||||
VNC_BASE_PORT = 5900
|
||||
|
||||
DEBUG_LEVEL = 3
|
||||
#VM_SUBMIT_ON_HOLD = "NO"
|
||||
|
||||
#*******************************************************************************
|
||||
# XML-RPC server configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
# These are configuration parameters for oned's xmlrpc-c server
|
||||
#
|
||||
# MAX_CONN: Maximum number of simultaneous TCP connections the server
|
||||
# will maintain
|
||||
#
|
||||
# MAX_CONN_BACKLOG: Maximum number of TCP connections the operating system
|
||||
# will accept on the server's behalf without the server accepting them from
|
||||
# the operating system
|
||||
#
|
||||
# KEEPALIVE_TIMEOUT: Maximum time in seconds that the server allows a
|
||||
# connection to be open between RPCs
|
||||
#
|
||||
# KEEPALIVE_MAX_CONN: Maximum number of RPCs that the server will execute on
|
||||
# a single connection
|
||||
#
|
||||
# TIMEOUT: Maximum time in seconds the server will wait for the client to
|
||||
# do anything while processing an RPC
|
||||
#*******************************************************************************
|
||||
|
||||
#MAX_CONN = 15
|
||||
#MAX_CONN_BACKLOG = 15
|
||||
#KEEPALIVE_TIMEOUT = 15
|
||||
#KEEPALIVE_MAX_CONN = 30
|
||||
#TIMEOUT = 15
|
||||
|
||||
#*******************************************************************************
|
||||
# Physical Networks configuration
|
||||
@@ -80,11 +123,21 @@ MAC_PREFIX = "02:00"
|
||||
#*******************************************************************************
|
||||
# DataStore Configuration
|
||||
#*******************************************************************************
|
||||
# DATASTORE_LOCATION: Path for Datastores in the hosts. It IS the same for all
|
||||
# the hosts in the cluster. DATASTORE_LOCATION IS ONLY FOR THE HOSTS AND *NOT*
|
||||
# THE FRONT-END. It defaults to /var/lib/one/datastores (or
|
||||
# DATASTORE_LOCATION: *Default* Path for Datastores in the hosts. It IS the
|
||||
# same for all the hosts in the cluster. DATASTORE_LOCATION IS ONLY FOR THE
|
||||
# HOSTS AND *NOT* THE FRONT-END. It defaults to /var/lib/one/datastores (or
|
||||
# $ONE_LOCATION/var/datastores in self-contained mode)
|
||||
#
|
||||
# You can define a different DATASTORE_LOCATION in each cluster by updating
|
||||
# its properties with onecluster update.
|
||||
#
|
||||
# DATASTORE_BASE_PATH: This is the base path for the SOURCE attribute of
|
||||
# the images registered in a Datastore. This is a default value, that can be
|
||||
# changed when the datastore is created.
|
||||
#
|
||||
# DATASTORE_CAPACITY_CHECK: Checks that there is enough capacity before
|
||||
# creating a new imag. Defaults to Yes
|
||||
#
|
||||
# DEFAULT_IMAGE_TYPE: This can take values
|
||||
# OS Image file holding an operating system
|
||||
# CDROM Image file holding a CDROM
|
||||
@@ -97,11 +150,16 @@ MAC_PREFIX = "02:00"
|
||||
# vd KVM virtual disk
|
||||
#*******************************************************************************
|
||||
|
||||
#DATASTORE_LOCATION = /var/lib/one/datastores
|
||||
#DATASTORE_LOCATION = /var/lib/one/datastores
|
||||
|
||||
#DATASTORE_BASE_PATH = /var/lib/one/datastores
|
||||
|
||||
DATASTORE_CAPACITY_CHECK = "yes"
|
||||
|
||||
DEFAULT_IMAGE_TYPE = "OS"
|
||||
DEFAULT_DEVICE_PREFIX = "hd"
|
||||
|
||||
|
||||
#*******************************************************************************
|
||||
# Information Driver Configuration
|
||||
#*******************************************************************************
|
||||
@@ -119,15 +177,35 @@ DEFAULT_DEVICE_PREFIX = "hd"
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#*******************************************************************************
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Information Collector for KVM and Xen IM's.
|
||||
#-------------------------------------------------------------------------------
|
||||
# This driver CANNOT BE ASSIGNED TO A HOST, and needs to be used with KVM or
|
||||
# Xen drivers
|
||||
# -h prints this help.
|
||||
# -a Address to bind the collectd sockect (defults 0.0.0.0)
|
||||
# -p UDP port to listen for monitor information (default 4124)
|
||||
# -f Interval in seconds to flush collected information (default 5)
|
||||
# -t Number of threads for the server (defult 50)
|
||||
# -i Time in seconds of the monitorization push cycle. This parameter must
|
||||
# be smaller than MONITORING_INTERVAL, otherwise push monitorization will
|
||||
# not be effective.
|
||||
#-------------------------------------------------------------------------------
|
||||
IM_MAD = [
|
||||
name = "collectd",
|
||||
executable = "collectd",
|
||||
arguments = "-p 4124 -f 5 -t 50 -i 20" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# KVM Information Driver Manager Configuration
|
||||
# -r number of retries when monitoring a host
|
||||
# -t number of threads, i.e. number of hosts monitored at the same time
|
||||
#-------------------------------------------------------------------------------
|
||||
IM_MAD = [
|
||||
name = "im_kvm",
|
||||
name = "kvm",
|
||||
executable = "one_im_ssh",
|
||||
arguments = "-r 0 -t 15 kvm" ]
|
||||
arguments = "-r 3 -t 15 kvm" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -135,10 +213,19 @@ IM_MAD = [
|
||||
# -r number of retries when monitoring a host
|
||||
# -t number of threads, i.e. number of hosts monitored at the same time
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Driver for Xen 3.x
|
||||
#IM_MAD = [
|
||||
# name = "im_xen",
|
||||
# name = "xen",
|
||||
# executable = "one_im_ssh",
|
||||
# arguments = "xen" ]
|
||||
# arguments = "xen3" ]
|
||||
|
||||
# Driver for Xen 4.x
|
||||
#IM_MAD = [
|
||||
# name = "xen",
|
||||
# executable = "one_im_ssh",
|
||||
# arguments = "xen4" ]
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -147,33 +234,24 @@ IM_MAD = [
|
||||
# -t number of threads, i.e. number of hosts monitored at the same time
|
||||
#-------------------------------------------------------------------------------
|
||||
#IM_MAD = [
|
||||
# name = "im_vmware",
|
||||
# name = "vmware",
|
||||
# executable = "one_im_sh",
|
||||
# arguments = "-t 15 -r 0 vmware" ]
|
||||
# arguments = "-c -t 15 -r 0 vmware" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# EC2 Information Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
#IM_MAD = [
|
||||
# name = "im_ec2",
|
||||
# executable = "one_im_ec2",
|
||||
# arguments = "im_ec2/im_ec2.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Ganglia Information Driver Manager Configuration
|
||||
#-----------------------------------------------------------------------------
|
||||
#IM_MAD = [
|
||||
# name = "im_ganglia",
|
||||
# name = "ec2",
|
||||
# executable = "one_im_sh",
|
||||
# arguments = "ganglia" ]
|
||||
#-----------------------------------------------------------------------------
|
||||
# arguments = "-c -t 1 -r 0 ec2" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Dummy Information Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
IM_MAD = [ name="im_dummy", executable="one_im_dummy"]
|
||||
IM_MAD = [ name="dummy", executable="one_im_dummy"]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
@@ -204,10 +282,13 @@ IM_MAD = [ name="im_dummy", executable="one_im_dummy"]
|
||||
# -l <actions[=command_name]> actions executed locally, command can be
|
||||
# overridden for each action.
|
||||
# Valid actions: deploy, shutdown, cancel, save, restore, migrate, poll
|
||||
# An example: "-l migrate,poll=poll_ganglia,save"
|
||||
# An example: "-l migrate=migrate_local,save"
|
||||
#
|
||||
# Note: You can use type = "qemu" to use qemu emulated guests, e.g. if your
|
||||
# CPU does not have virtualization extensions or use nested Qemu-KVM hosts
|
||||
#-------------------------------------------------------------------------------
|
||||
VM_MAD = [
|
||||
name = "vmm_kvm",
|
||||
name = "kvm",
|
||||
executable = "one_vmm_exec",
|
||||
arguments = "-t 15 -r 0 kvm",
|
||||
default = "vmm_exec/vmm_exec_kvm.conf",
|
||||
@@ -221,14 +302,25 @@ VM_MAD = [
|
||||
# -l <actions[=command_name]> actions executed locally, command can be
|
||||
# overridden for each action.
|
||||
# Valid actions: deploy, shutdown, cancel, save, restore, migrate, poll
|
||||
# An example: "-l migrate,poll=poll_ganglia,save"
|
||||
# An example: "-l migrate,save"
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Driver for Xen 3.x
|
||||
#VM_MAD = [
|
||||
# name = "vmm_xen",
|
||||
# name = "xen",
|
||||
# executable = "one_vmm_exec",
|
||||
# arguments = "-t 15 -r 0 xen",
|
||||
# default = "vmm_exec/vmm_exec_xen.conf",
|
||||
# arguments = "-t 15 -r 0 xen3",
|
||||
# default = "vmm_exec/vmm_exec_xen3.conf",
|
||||
# type = "xen" ]
|
||||
|
||||
# Driver for Xen 4.x
|
||||
#VM_MAD = [
|
||||
# name = "xen",
|
||||
# executable = "one_vmm_exec",
|
||||
# arguments = "-t 15 -r 0 xen4",
|
||||
# default = "vmm_exec/vmm_exec_xen4.conf",
|
||||
# type = "xen" ]
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -237,30 +329,29 @@ VM_MAD = [
|
||||
# -t number of threads, i.e. number of hosts monitored at the same time
|
||||
#-------------------------------------------------------------------------------
|
||||
#VM_MAD = [
|
||||
# name = "vmm_vmware",
|
||||
# name = "vmware",
|
||||
# executable = "one_vmm_sh",
|
||||
# arguments = "-t 15 -r 0 vmware",
|
||||
# arguments = "-t 15 -r 0 vmware -s sh",
|
||||
# default = "vmm_exec/vmm_exec_vmware.conf",
|
||||
# type = "vmware" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# EC2 Virtualization Driver Manager Configuration
|
||||
# arguments: default values for the EC2 driver, can be an absolute path or
|
||||
# relative to $ONE_LOCATION/etc (or /etc/one/ if OpenNebula was
|
||||
# installed in /).
|
||||
# -r number of retries when monitoring a host
|
||||
# -t number of threads, i.e. number of actions performed at the same time
|
||||
#-------------------------------------------------------------------------------
|
||||
#VM_MAD = [
|
||||
# name = "vmm_ec2",
|
||||
# executable = "one_vmm_ec2",
|
||||
# arguments = "vmm_ec2/vmm_ec2.conf",
|
||||
# name = "ec2",
|
||||
# executable = "one_vmm_sh",
|
||||
# arguments = "-t 15 -r 0 ec2",
|
||||
# type = "xml" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Dummy Virtualization Driver Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
VM_MAD = [ name="vmm_dummy", executable="one_vmm_dummy", type="xml" ]
|
||||
VM_MAD = [ name="dummy", executable="one_vmm_dummy", type="xml" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
@@ -277,11 +368,93 @@ VM_MAD = [ name="vmm_dummy", executable="one_vmm_dummy", type="xml" ]
|
||||
# -t: number of threads, i.e. number of transfers made at the same time
|
||||
# -d: list of transfer drivers separated by commas, if not defined all the
|
||||
# drivers available will be enabled
|
||||
#
|
||||
# The configuration for each driver is defined in TM_MAD_CONF. These
|
||||
# values are used when creating a new datastore and should not be modified
|
||||
# since they define the datastore behaviour.
|
||||
# name : name of the transfer driver, listed in the -d option of the
|
||||
# TM_MAD section
|
||||
# ln_target : determines how the persistent images will be cloned when
|
||||
# a new VM is instantiated.
|
||||
# NONE: The image will be linked and no more storage capacity will be used
|
||||
# SELF: The image will be cloned in the Images datastore
|
||||
# SYSTEM: The image will be cloned in the System datastore
|
||||
# clone_target : determines how the non persistent images will be
|
||||
# cloned when a new VM is instantiated.
|
||||
# NONE: The image will be linked and no more storage capacity will be used
|
||||
# SELF: The image will be cloned in the Images datastore
|
||||
# SYSTEM: The image will be cloned in the System datastore
|
||||
# shared : determines if the storage holding the system datastore is shared
|
||||
# among the different hosts or not. Valid values: "yes" or "no"
|
||||
#*******************************************************************************
|
||||
|
||||
TM_MAD = [
|
||||
executable = "one_tm",
|
||||
arguments = "-t 15 -d dummy,lvm,shared,qcow2,ssh,vmware,iscsi" ]
|
||||
arguments = "-t 15 -d dummy,lvm,shared,shared_lvm,qcow2,ssh,vmfs,iscsi,ceph"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "dummy",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SYSTEM",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "lvm",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SELF",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "shared",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SYSTEM",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "shared_lvm",
|
||||
ln_target = "SYSTEM",
|
||||
clone_target= "SYSTEM",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "qcow2",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SYSTEM",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "ssh",
|
||||
ln_target = "SYSTEM",
|
||||
clone_target= "SYSTEM",
|
||||
shared = "no"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "vmfs",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SYSTEM",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "iscsi",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SELF",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "ceph",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SELF",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
#*******************************************************************************
|
||||
# Datastore Driver Configuration
|
||||
@@ -298,13 +471,16 @@ TM_MAD = [
|
||||
|
||||
DATASTORE_MAD = [
|
||||
executable = "one_datastore",
|
||||
arguments = "-t 15 -d fs,vmware,iscsi,lvm"
|
||||
arguments = "-t 15 -d dummy,fs,vmfs,iscsi,lvm,ceph"
|
||||
]
|
||||
|
||||
#*******************************************************************************
|
||||
# Hook Manager Configuration
|
||||
#*******************************************************************************
|
||||
# The Driver (HM_MAD), used to execute the Hooks
|
||||
# The Driver (HM_MAD)
|
||||
# -----------------------------------------------
|
||||
#
|
||||
# Used to execute the Hooks:
|
||||
# executable: path of the hook driver executable, can be an
|
||||
# absolute path or relative to $ONE_LOCATION/lib/mads (or
|
||||
# /usr/lib/one/mads/ if OpenNebula was installed in /)
|
||||
@@ -313,30 +489,52 @@ DATASTORE_MAD = [
|
||||
# to $ONE_LOCATION/etc (or /etc/one/ if OpenNebula was installed
|
||||
# in /)
|
||||
#
|
||||
# Virtual Machine Hooks (VM_HOOK) defined by:
|
||||
# Virtual Machine Hooks (VM_HOOK)
|
||||
# -------------------------------
|
||||
#
|
||||
# Defined by:
|
||||
# name : for the hook, useful to track the hook (OPTIONAL)
|
||||
# on : when the hook should be executed,
|
||||
# - CREATE, when the VM is created (onevm create)
|
||||
# - PROLOG, when the VM is in the prolog state
|
||||
# - RUNNING, after the VM is successfully booted
|
||||
# - UNKNOWN, when the VM is in the unknown state
|
||||
# - SHUTDOWN, after the VM is shutdown
|
||||
# - STOP, after the VM is stopped (including VM image transfers)
|
||||
# - DONE, after the VM is deleted or shutdown
|
||||
# - FAILED, when the VM enters the failed state
|
||||
# - CUSTOM, user defined specific STATE and LCM_STATE combination
|
||||
# of states to trigger the hook.
|
||||
# command : path is relative to $ONE_LOCATION/var/remotes/hook
|
||||
# (self-contained) or to /var/lib/one/remotes/hook (system-wide).
|
||||
# That directory will be copied on the hosts under
|
||||
# SCRIPTS_REMOTE_DIR. It can be an absolute path that must exist
|
||||
# on the target host
|
||||
# arguments : for the hook. You can access to VM information with $
|
||||
# - $VMID, the ID of the virtual machine
|
||||
# - $ID, the ID of the virtual machine
|
||||
# - $TEMPLATE, the VM template in xml and base64 encoded
|
||||
# - $PREV_STATE, the previous STATE of the Virtual Machine
|
||||
# - $PREV_LCM_STATE, the previous LCM STATE of the Virtual Machine
|
||||
# remote : values,
|
||||
# - YES, The hook is executed in the host where the VM was
|
||||
# allocated
|
||||
# - NO, The hook is executed in the OpenNebula server (default)
|
||||
#
|
||||
# Host Hooks (HOST_HOOK) defined by:
|
||||
# Example Virtual Machine Hook
|
||||
# ----------------------------
|
||||
#
|
||||
# VM_HOOK = [
|
||||
# name = "advanced_hook",
|
||||
# on = "CUSTOM",
|
||||
# state = "ACTIVE",
|
||||
# lcm_state = "BOOT_UNKNOWN",
|
||||
# command = "log.rb",
|
||||
# arguments = "$ID $PREV_STATE $PREV_LCM_STATE" ]
|
||||
#
|
||||
# Host Hooks (HOST_HOOK)
|
||||
# -------------------------------
|
||||
#
|
||||
# Defined by:
|
||||
# name : for the hook, useful to track the hook (OPTIONAL)
|
||||
# on : when the hook should be executed,
|
||||
# - CREATE, when the Host is created (onehost create)
|
||||
@@ -348,30 +546,55 @@ DATASTORE_MAD = [
|
||||
# SCRIPTS_REMOTE_DIR. It can be an absolute path that must exist
|
||||
# on the target host.
|
||||
# arguments : for the hook. You can use the following Host information:
|
||||
# - $HID, the ID of the host
|
||||
# - $ID, the ID of the host
|
||||
# - $TEMPLATE, the Host template in xml and base64 encoded
|
||||
# remote : values,
|
||||
# - YES, The hook is executed in the host
|
||||
# - NO, The hook is executed in the OpenNebula server (default)
|
||||
#
|
||||
# Virtual Network (VNET_HOOK)
|
||||
# User (USER_HOOK)
|
||||
# Group (GROUP_HOOK)
|
||||
# Image (IMAGE_HOOK)
|
||||
# -------------------------------
|
||||
#
|
||||
# These hooks are executed when one of the referring entities are created or
|
||||
# removed. Each hook is defined by:
|
||||
# name : for the hook, useful to track the hook (OPTIONAL)
|
||||
# on : when the hook should be executed,
|
||||
# - CREATE, when the vnet is created
|
||||
# - REMOVE, when the vnet is removed
|
||||
# command : path is relative to $ONE_LOCATION/var/remotes/hook
|
||||
# (self-contained) or to /var/lib/one/remotes/hook (system-wide).
|
||||
# That directory will be copied on the hosts under
|
||||
# SCRIPTS_REMOTE_DIR. It can be an absolute path that must exist
|
||||
# on the target host.
|
||||
# arguments : for the hook. You can use the following Host information:
|
||||
# - $ID, the ID of the host
|
||||
# - $TEMPLATE, the vnet template in xml and base64 encoded
|
||||
#-------------------------------------------------------------------------------
|
||||
HM_MAD = [
|
||||
executable = "one_hm" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
# Fault Tolerance Hooks
|
||||
#*******************************************************************************
|
||||
# This hook is used to perform recovery actions when a host fails. The VMs
|
||||
# running in the host can be deleted (use -d option) or resubmitted (-r) in
|
||||
# other host
|
||||
# Last argument (force) can be "y", so suspended VMs in the host will be
|
||||
# resubmitted/deleted, or "n", so suspended VMs in the host will be ignored
|
||||
# This hook is used to perform recovery actions when a host fails.
|
||||
# Script to implement host failure tolerance
|
||||
# It can be set to
|
||||
# -r recreate VMs running in the host
|
||||
# -d delete VMs running in the host
|
||||
# Additional flags
|
||||
# -f force resubmission of suspended VMs
|
||||
# -p <n> avoid resubmission if host comes
|
||||
# back after n monitoring cycles
|
||||
#*******************************************************************************
|
||||
#
|
||||
#HOST_HOOK = [
|
||||
# name = "error",
|
||||
# on = "ERROR",
|
||||
# command = "ft/host_error.rb",
|
||||
# arguments = "$HID -r n",
|
||||
# arguments = "$ID -r",
|
||||
# remote = "no" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
# These two hooks can be used to automatically delete or resubmit VMs that reach
|
||||
@@ -386,13 +609,13 @@ HM_MAD = [
|
||||
# name = "on_failure_delete",
|
||||
# on = "FAILED",
|
||||
# command = "/usr/bin/env onevm delete",
|
||||
# arguments = "$VMID" ]
|
||||
# arguments = "$ID" ]
|
||||
#
|
||||
#VM_HOOK = [
|
||||
# name = "on_failure_resubmit",
|
||||
# name = "on_failure_recreate",
|
||||
# on = "FAILED",
|
||||
# command = "/usr/bin/env onevm resubmit",
|
||||
# arguments = "$VMID" ]
|
||||
# command = "/usr/bin/env onevm delete --recreate",
|
||||
# arguments = "$ID" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
@@ -414,21 +637,25 @@ HM_MAD = [
|
||||
# valid. During this time, the driver is not used. Use 0 to disable session
|
||||
# caching
|
||||
#
|
||||
# ENABLE_OTHER_PERMISSIONS: Whether or not to enable the permissions for
|
||||
# 'other'. Users in the oneadmin group will still be able to change
|
||||
# these permissions. Values: YES or NO
|
||||
# ENABLE_OTHER_PERMISSIONS: Whether or not users can set the permissions for
|
||||
# 'other', so publishing or sharing resources with others. Users in the oneadmin
|
||||
# group will still be able to change these permissions. Values: YES or NO.
|
||||
#
|
||||
# DEFAULT_UMASK: Similar to Unix umask, sets the default resources permissions.
|
||||
# Its format must be 3 octal digits. For example a umask of 137 will set
|
||||
# the new object's permissions to 640 "um- u-- ---"
|
||||
#*******************************************************************************
|
||||
|
||||
AUTH_MAD = [
|
||||
executable = "one_auth_mad",
|
||||
authn = "ssh,x509,ldap,server_cipher,server_x509"
|
||||
# , authz = "quota"
|
||||
]
|
||||
|
||||
SESSION_EXPIRATION_TIME = 900
|
||||
|
||||
#ENABLE_OTHER_PERMISSIONS = "YES"
|
||||
|
||||
DEFAULT_UMASK = 177
|
||||
|
||||
#*******************************************************************************
|
||||
# Restricted Attributes Configuration
|
||||
@@ -437,9 +664,18 @@ SESSION_EXPIRATION_TIME = 900
|
||||
#*******************************************************************************
|
||||
|
||||
VM_RESTRICTED_ATTR = "CONTEXT/FILES"
|
||||
VM_RESTRICTED_ATTR = "DISK/SOURCE"
|
||||
VM_RESTRICTED_ATTR = "NIC/MAC"
|
||||
VM_RESTRICTED_ATTR = "NIC/VLAN_ID"
|
||||
VM_RESTRICTED_ATTR = "RANK"
|
||||
|
||||
#VM_RESTRICTED_ATTR = "RANK"
|
||||
#VM_RESTRICTED_ATTR = "SCHED_RANK"
|
||||
#VM_RESTRICTED_ATTR = "REQUIREMENTS"
|
||||
#VM_RESTRICTED_ATTR = "SCHED_REQUIREMENTS"
|
||||
|
||||
IMAGE_RESTRICTED_ATTR = "SOURCE"
|
||||
|
||||
#*******************************************************************************
|
||||
# OneGate
|
||||
#*******************************************************************************
|
||||
|
||||
#ONEGATE_ENDPOINT = "http://frontend:5030"
|
||||
@@ -23,8 +23,10 @@ JUNIT_JAR="/usr/share/java/junit4.jar"
|
||||
|
||||
if [ -z $ONE_LOCATION ]; then
|
||||
DB_LOCATION="/var/lib/one/one.db"
|
||||
LOG_LOCATION="/var/log/one"
|
||||
else
|
||||
DB_LOCATION="$ONE_LOCATION/var/one.db"
|
||||
LOG_LOCATION="$ONE_LOCATION/var"
|
||||
fi
|
||||
|
||||
if [ -f $DB_LOCATION ]; then
|
||||
@@ -40,7 +42,11 @@ PID=$$
|
||||
|
||||
oned -f &
|
||||
|
||||
sleep 10s;
|
||||
sleep 2;
|
||||
|
||||
until grep 'Datastore default (1) successfully monitored' $LOG_LOCATION/oned.log; do
|
||||
sleep 1;
|
||||
done
|
||||
|
||||
java -cp ../lib/*:../jar/*:$JUNIT_JAR:. org.junit.runner.JUnitCore $1
|
||||
|
||||
|
||||
Reference in new issue
Block a user