mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Merge branch 'master' into feature-1678
This commit is contained in:
commit
f6f5521bd3
@ -1,11 +1,10 @@
|
||||
|
||||
OpenNebula - The OpenSource Toolkit for Cloud Computing
|
||||
OpenNebula - Flexible Enterprise Cloud Made Simple
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
OpenNebula is an open-source project aimed at building the industry standard
|
||||
open source cloud computing tool to manage the complexity and heterogeneity of
|
||||
distributed data center infrastructures.
|
||||
OpenNebula is an open-source project delivering a simple but feature-rich and
|
||||
flexible solution to build and manage enterprise clouds and virtualized data centers.
|
||||
|
||||
Complete documentation can be found at
|
||||
|
||||
|
@ -246,7 +246,8 @@ build_scripts=[
|
||||
'share/man/SConstruct',
|
||||
'src/sunstone/locale/languages/SConstruct',
|
||||
'share/scripts/context-packages/SConstruct',
|
||||
'share/rubygems/SConstruct'
|
||||
'share/rubygems/SConstruct',
|
||||
'src/im_mad/collectd/SConstruct'
|
||||
]
|
||||
|
||||
# Testing
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "Clusterable.h"
|
||||
#include "ObjectCollection.h"
|
||||
#include "NebulaLog.h"
|
||||
#include "NebulaUtil.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -85,6 +86,21 @@ public:
|
||||
(state == MONITORING_DISABLED));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if host is hybrid
|
||||
* @return true if the host is enabled
|
||||
*/
|
||||
bool isHybrid() const;
|
||||
|
||||
/**
|
||||
* Return an element of the hypervisor array. The calling function
|
||||
* must check that the index is valid.
|
||||
*/
|
||||
static const char * get_hybrid_hypervisor_by_id(int i)
|
||||
{
|
||||
return HYBRID_HYPERVISORS[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the current host, it will not be monitored nor used by the
|
||||
* scheduler
|
||||
@ -459,6 +475,7 @@ private:
|
||||
*/
|
||||
ObjectCollection vm_collection;
|
||||
|
||||
|
||||
// *************************************************************************
|
||||
// Constructor
|
||||
// *************************************************************************
|
||||
@ -489,6 +506,17 @@ private:
|
||||
|
||||
static const char * monit_table;
|
||||
|
||||
/**
|
||||
* Array containing the hybrid hypervisors, and counter. There is a
|
||||
* correspondence between Host::HYBRID_HYPERVISOR and
|
||||
* VirtualMachine::HYBRID_ATTRIBUTES. Attributes in HYBRID_ATTRIBUTES[i] are
|
||||
* meant to be used in hosts reporting a a hypervisor of type
|
||||
* HYBRID_HYPERVISOR[i]
|
||||
*/
|
||||
static const char * HYBRID_HYPERVISORS[];
|
||||
|
||||
static const int NUM_HYBRID_HYPERVISORS;
|
||||
|
||||
/**
|
||||
* Execute an INSERT or REPLACE Sql query.
|
||||
* @param db The SQL DB
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
* @param obj Callbackable obj to call if the query succeeds
|
||||
* @return 0 on success
|
||||
*/
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0);
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0, bool quiet=false);
|
||||
|
||||
/**
|
||||
* This function returns a legal SQL string that can be used in an SQL
|
||||
@ -143,7 +143,7 @@ public:
|
||||
|
||||
~MySqlDB(){};
|
||||
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0){return -1;};
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0, bool quiet=false){return -1;};
|
||||
|
||||
char * escape_str(const string& str){return 0;};
|
||||
|
||||
|
@ -330,18 +330,23 @@ public:
|
||||
*/
|
||||
static string version()
|
||||
{
|
||||
return "OpenNebula 4.3.0";
|
||||
return "OpenNebula 4.3.80";
|
||||
};
|
||||
|
||||
static string db_version()
|
||||
{
|
||||
return "4.3.0";
|
||||
return "4.3.80";
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts all the modules and services for OpenNebula
|
||||
*/
|
||||
void start();
|
||||
void start(bool bootstrap_only=false);
|
||||
|
||||
/**
|
||||
* Initialize the database
|
||||
*/
|
||||
void bootstrap_db();
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Configuration attributes (read from oned.conf)
|
||||
|
@ -22,12 +22,14 @@
|
||||
/**
|
||||
* VM Quotas, defined as:
|
||||
* VM = [
|
||||
* VMS = <Max. number of VMs>
|
||||
* MEMORY = <Max. number of MB requested by VMs>
|
||||
* CPU = <Max. number of CPU units requested by VMs>
|
||||
* VMS_USED = Current number of VMs
|
||||
* MEMORY_USED = Overall Memory requested
|
||||
* CPU_USED = Overall CPU requested
|
||||
* VMS = <Max. number of VMs>
|
||||
* MEMORY = <Max. number of MB requested by VMs>
|
||||
* CPU = <Max. number of CPU units requested by VMs>
|
||||
* VOLATILE_SIZE = <Max. number of volatile disk MB>
|
||||
* VMS_USED = Current number of VMs
|
||||
* MEMORY_USED = Overall Memory requested
|
||||
* CPU_USED = Overall CPU requested
|
||||
* VOLATILE_SIZE_USED = <Max. number of volatile disk MB>
|
||||
* ]
|
||||
*
|
||||
* 0 = unlimited, default if missing
|
||||
|
@ -56,6 +56,16 @@ protected:
|
||||
PoolObjectAuth * ds_perm,
|
||||
AuthRequest::Operation op);
|
||||
|
||||
bool quota_resize_authorization(
|
||||
Template * deltas,
|
||||
RequestAttributes& att,
|
||||
PoolObjectAuth& vm_perms);
|
||||
|
||||
bool quota_resize_authorization(
|
||||
int oid,
|
||||
Template * deltas,
|
||||
RequestAttributes& att);
|
||||
|
||||
int get_host_information(
|
||||
int hid,
|
||||
string& name,
|
||||
|
@ -37,10 +37,10 @@ public:
|
||||
* Performs a DB transaction
|
||||
* @param sql_cmd the SQL command
|
||||
* @param callbak function to execute on each data returned
|
||||
* @param arg to pass to the callback function
|
||||
* @param quiet True to log errors with DDEBUG level instead of ERROR
|
||||
* @return 0 on success
|
||||
*/
|
||||
virtual int exec(ostringstream& cmd, Callbackable* obj=0) = 0;
|
||||
virtual int exec(ostringstream& cmd, Callbackable* obj=0, bool quiet=false) = 0;
|
||||
|
||||
/**
|
||||
* This function returns a legal SQL string that can be used in an SQL
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
* @param arg to pass to the callback function
|
||||
* @return 0 on success
|
||||
*/
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0);
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0, bool quiet=false);
|
||||
|
||||
/**
|
||||
* This function returns a legal SQL string that can be used in an SQL
|
||||
@ -113,7 +113,7 @@ public:
|
||||
|
||||
~SqliteDB(){};
|
||||
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0){return -1;};
|
||||
int exec(ostringstream& cmd, Callbackable* obj=0, bool quiet=false){return -1;};
|
||||
|
||||
char * escape_str(const string& str){return 0;};
|
||||
|
||||
|
@ -1068,6 +1068,21 @@ public:
|
||||
*/
|
||||
void release_disk_images();
|
||||
|
||||
/**
|
||||
* Check if the given disk is volatile
|
||||
*/
|
||||
static bool isVolatile(const VectorAttribute * disk);
|
||||
|
||||
/**
|
||||
* Check if the template contains a volatile disk
|
||||
*/
|
||||
static bool isVolatile(const Template * tmpl);
|
||||
|
||||
/**
|
||||
* Return the total SIZE of volatile disks
|
||||
*/
|
||||
static float get_volatile_disk_size(Template * tmpl);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Context related functions
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -67,12 +67,30 @@ public:
|
||||
*/
|
||||
void remove_all_except_restricted();
|
||||
|
||||
/**
|
||||
* Returns the hypervisor name if the template is hybrid
|
||||
* @param hypervisor the resulting hypervisor string
|
||||
* @return true if any hybrid hypervisor attribute found, false otherwise
|
||||
*/
|
||||
bool get_hybrid_hypervisor(string& hypervisor) const;
|
||||
|
||||
private:
|
||||
|
||||
friend class VirtualMachinePool;
|
||||
|
||||
static vector<string> restricted_attributes;
|
||||
|
||||
/**
|
||||
* Array containing the hybrid attributes, and counter. There is a
|
||||
* correspondence between Host::HYBRID_HYPERVISOR and
|
||||
* VirtualMachine::HYBRID_ATTRIBUTES. Attributes in HYBRID_ATTRIBUTES[i] are
|
||||
* meant to be used in hosts reporting a a hypervisor of type
|
||||
* HYBRID_HYPERVISOR[i]
|
||||
*/
|
||||
static const char * HYBRID_ATTRIBUTES[];
|
||||
|
||||
static const int NUM_HYBRID_ATTRIBUTES;
|
||||
|
||||
/**
|
||||
* Stores the attributes as restricted, these attributes will be used in
|
||||
* VirtualMachineTemplate::check
|
||||
|
99
install.sh
99
install.sh
@ -227,9 +227,7 @@ SHARE_DIRS="$SHARE_LOCATION/examples \
|
||||
$SHARE_LOCATION/tgt \
|
||||
$SHARE_LOCATION/websockify"
|
||||
|
||||
ETC_DIRS="$ETC_LOCATION/im_ec2 \
|
||||
$ETC_LOCATION/vmm_ec2 \
|
||||
$ETC_LOCATION/vmm_exec \
|
||||
ETC_DIRS="$ETC_LOCATION/vmm_exec \
|
||||
$ETC_LOCATION/hm \
|
||||
$ETC_LOCATION/auth \
|
||||
$ETC_LOCATION/auth/certificates \
|
||||
@ -264,12 +262,17 @@ VAR_DIRS="$VAR_LOCATION/remotes \
|
||||
$VAR_LOCATION/remotes/im/kvm.d \
|
||||
$VAR_LOCATION/remotes/im/xen3.d \
|
||||
$VAR_LOCATION/remotes/im/xen4.d \
|
||||
$VAR_LOCATION/remotes/im/kvm-probes.d \
|
||||
$VAR_LOCATION/remotes/im/xen3-probes.d \
|
||||
$VAR_LOCATION/remotes/im/xen4-probes.d \
|
||||
$VAR_LOCATION/remotes/im/vmware.d \
|
||||
$VAR_LOCATION/remotes/im/ec2.d \
|
||||
$VAR_LOCATION/remotes/vmm \
|
||||
$VAR_LOCATION/remotes/vmm/kvm \
|
||||
$VAR_LOCATION/remotes/vmm/xen3 \
|
||||
$VAR_LOCATION/remotes/vmm/xen4 \
|
||||
$VAR_LOCATION/remotes/vmm/vmware \
|
||||
$VAR_LOCATION/remotes/vmm/ec2 \
|
||||
$VAR_LOCATION/remotes/vnm \
|
||||
$VAR_LOCATION/remotes/vnm/802.1Q \
|
||||
$VAR_LOCATION/remotes/vnm/dummy \
|
||||
@ -447,9 +450,13 @@ INSTALL_FILES=(
|
||||
MADS_LIB_FILES:$LIB_LOCATION/mads
|
||||
IM_PROBES_FILES:$VAR_LOCATION/remotes/im
|
||||
IM_PROBES_KVM_FILES:$VAR_LOCATION/remotes/im/kvm.d
|
||||
IM_PROBES_KVM_PROBES_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d
|
||||
IM_PROBES_XEN3_FILES:$VAR_LOCATION/remotes/im/xen3.d
|
||||
IM_PROBES_XEN3_PROBES_FILES:$VAR_LOCATION/remotes/im/xen3-probes.d
|
||||
IM_PROBES_XEN4_FILES:$VAR_LOCATION/remotes/im/xen4.d
|
||||
IM_PROBES_XEN4_PROBES_FILES:$VAR_LOCATION/remotes/im/xen4-probes.d
|
||||
IM_PROBES_VMWARE_FILES:$VAR_LOCATION/remotes/im/vmware.d
|
||||
IM_PROBES_EC2_FILES:$VAR_LOCATION/remotes/im/ec2.d
|
||||
AUTH_SSH_FILES:$VAR_LOCATION/remotes/auth/ssh
|
||||
AUTH_X509_FILES:$VAR_LOCATION/remotes/auth/x509
|
||||
AUTH_LDAP_FILES:$VAR_LOCATION/remotes/auth/ldap
|
||||
@ -461,6 +468,7 @@ INSTALL_FILES=(
|
||||
VMM_EXEC_XEN3_SCRIPTS:$VAR_LOCATION/remotes/vmm/xen3
|
||||
VMM_EXEC_XEN4_SCRIPTS:$VAR_LOCATION/remotes/vmm/xen4
|
||||
VMM_EXEC_VMWARE_SCRIPTS:$VAR_LOCATION/remotes/vmm/vmware
|
||||
VMM_EXEC_EC2_SCRIPTS:$VAR_LOCATION/remotes/vmm/ec2
|
||||
TM_FILES:$VAR_LOCATION/remotes/tm
|
||||
TM_SHARED_FILES:$VAR_LOCATION/remotes/tm/shared
|
||||
TM_SHARED_LVM_FILES:$VAR_LOCATION/remotes/tm/shared_lvm
|
||||
@ -656,9 +664,8 @@ INSTALL_ONEFLOW_ETC_FILES=(
|
||||
INSTALL_ETC_FILES=(
|
||||
ETC_FILES:$ETC_LOCATION
|
||||
VMWARE_ETC_FILES:$ETC_LOCATION
|
||||
VMM_EC2_ETC_FILES:$ETC_LOCATION/vmm_ec2
|
||||
EC2_ETC_FILES:$ETC_LOCATION
|
||||
VMM_EXEC_ETC_FILES:$ETC_LOCATION/vmm_exec
|
||||
IM_EC2_ETC_FILES:$ETC_LOCATION/im_ec2
|
||||
HM_ETC_FILES:$ETC_LOCATION/hm
|
||||
AUTH_ETC_FILES:$ETC_LOCATION/auth
|
||||
ECO_ETC_FILES:$ETC_LOCATION
|
||||
@ -743,18 +750,15 @@ MADS_LIB_FILES="src/mad/sh/madcommon.sh \
|
||||
src/vmm_mad/exec/one_vmm_exec \
|
||||
src/vmm_mad/exec/one_vmm_sh \
|
||||
src/vmm_mad/exec/one_vmm_ssh \
|
||||
src/vmm_mad/ec2/one_vmm_ec2.rb \
|
||||
src/vmm_mad/ec2/one_vmm_ec2 \
|
||||
src/vmm_mad/dummy/one_vmm_dummy.rb \
|
||||
src/vmm_mad/dummy/one_vmm_dummy \
|
||||
src/im_mad/im_exec/one_im_exec.rb \
|
||||
src/im_mad/im_exec/one_im_exec \
|
||||
src/im_mad/im_exec/one_im_ssh \
|
||||
src/im_mad/im_exec/one_im_sh \
|
||||
src/im_mad/ec2/one_im_ec2.rb \
|
||||
src/im_mad/ec2/one_im_ec2 \
|
||||
src/im_mad/dummy/one_im_dummy.rb \
|
||||
src/im_mad/dummy/one_im_dummy \
|
||||
src/im_mad/collectd/collectd \
|
||||
src/tm_mad/one_tm \
|
||||
src/tm_mad/one_tm.rb \
|
||||
src/hm_mad/one_hm.rb \
|
||||
@ -851,32 +855,65 @@ VMM_EXEC_VMWARE_SCRIPTS="src/vmm_mad/remotes/vmware/cancel \
|
||||
src/vmm_mad/remotes/vmware/vmware_driver.rb \
|
||||
src/vmm_mad/remotes/vmware/vi_driver.rb"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VMM Driver EC2 scripts, to be installed under $REMOTES_LOCATION/vmm/ec2
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
VMM_EXEC_EC2_SCRIPTS="src/vmm_mad/remotes/ec2/cancel \
|
||||
src/vmm_mad/remotes/ec2/attach_disk \
|
||||
src/vmm_mad/remotes/ec2/detach_disk \
|
||||
src/vmm_mad/remotes/ec2/attach_nic \
|
||||
src/vmm_mad/remotes/ec2/detach_nic \
|
||||
src/vmm_mad/remotes/ec2/snapshot_create \
|
||||
src/vmm_mad/remotes/ec2/snapshot_revert \
|
||||
src/vmm_mad/remotes/ec2/snapshot_delete \
|
||||
src/vmm_mad/remotes/ec2/deploy \
|
||||
src/vmm_mad/remotes/ec2/migrate \
|
||||
src/vmm_mad/remotes/ec2/restore \
|
||||
src/vmm_mad/remotes/ec2/reboot \
|
||||
src/vmm_mad/remotes/ec2/reset \
|
||||
src/vmm_mad/remotes/ec2/save \
|
||||
src/vmm_mad/remotes/ec2/poll \
|
||||
src/vmm_mad/remotes/ec2/shutdown \
|
||||
src/vmm_mad/remotes/ec2/ec2_driver.rb"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Information Manager Probes, to be installed under $REMOTES_LOCATION/im
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
IM_PROBES_FILES="src/im_mad/remotes/run_probes"
|
||||
|
||||
IM_PROBES_KVM_FILES="src/im_mad/remotes/kvm.d/kvm.rb \
|
||||
src/im_mad/remotes/kvm.d/architecture.sh \
|
||||
src/im_mad/remotes/kvm.d/cpu.sh \
|
||||
src/im_mad/remotes/kvm.d/poll.sh \
|
||||
src/im_mad/remotes/kvm.d/name.sh"
|
||||
IM_PROBES_KVM_FILES="src/im_mad/remotes/kvm.d/collectd-client_control.sh \
|
||||
src/im_mad/remotes/kvm.d/collectd-client.rb"
|
||||
|
||||
IM_PROBES_XEN3_FILES="src/im_mad/remotes/xen.d/xen.rb \
|
||||
src/im_mad/remotes/xen.d/architecture.sh \
|
||||
src/im_mad/remotes/xen.d/cpu.sh \
|
||||
src/im_mad/remotes/xen.d/poll3.sh \
|
||||
src/im_mad/remotes/xen.d/name.sh"
|
||||
IM_PROBES_KVM_PROBES_FILES="src/im_mad/remotes/kvm-probes.d/kvm.rb \
|
||||
src/im_mad/remotes/kvm-probes.d/architecture.sh \
|
||||
src/im_mad/remotes/kvm-probes.d/cpu.sh \
|
||||
src/im_mad/remotes/kvm-probes.d/poll.sh \
|
||||
src/im_mad/remotes/kvm-probes.d/name.sh"
|
||||
|
||||
IM_PROBES_XEN4_FILES="src/im_mad/remotes/xen.d/xen.rb \
|
||||
src/im_mad/remotes/xen.d/architecture.sh \
|
||||
src/im_mad/remotes/xen.d/cpu.sh \
|
||||
src/im_mad/remotes/xen.d/poll4.sh \
|
||||
src/im_mad/remotes/xen.d/name.sh"
|
||||
IM_PROBES_XEN3_FILES="src/im_mad/remotes/xen.d/collectd-client_control.sh \
|
||||
src/im_mad/remotes/xen.d/collectd-client.rb"
|
||||
|
||||
IM_PROBES_XEN3_PROBES_FILES="src/im_mad/remotes/xen-probes.d/xen.rb \
|
||||
src/im_mad/remotes/xen-probes.d/architecture.sh \
|
||||
src/im_mad/remotes/xen-probes.d/cpu.sh \
|
||||
src/im_mad/remotes/xen-probes.d/poll3.sh \
|
||||
src/im_mad/remotes/xen-probes.d/name.sh"
|
||||
|
||||
IM_PROBES_XEN4_FILES="src/im_mad/remotes/xen.d/collectd-client_control.sh \
|
||||
src/im_mad/remotes/xen.d/collectd-client.rb"
|
||||
|
||||
IM_PROBES_XEN4_PROBES_FILES="src/im_mad/remotes/xen-probes.d/xen.rb \
|
||||
src/im_mad/remotes/xen-probes.d/architecture.sh \
|
||||
src/im_mad/remotes/xen-probes.d/cpu.sh \
|
||||
src/im_mad/remotes/xen-probes.d/poll4.sh \
|
||||
src/im_mad/remotes/xen-probes.d/name.sh"
|
||||
|
||||
IM_PROBES_VMWARE_FILES="src/im_mad/remotes/vmware.d/vmware.rb"
|
||||
|
||||
IM_PROBES_EC2_FILES="src/im_mad/remotes/ec2.d/poll"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Auth Manager drivers to be installed under $REMOTES_LOCATION/auth
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -1152,14 +1189,14 @@ ETC_FILES="share/etc/oned.conf \
|
||||
|
||||
VMWARE_ETC_FILES="src/vmm_mad/remotes/vmware/vmwarerc"
|
||||
|
||||
EC2_ETC_FILES="src/vmm_mad/remotes/ec2/ec2_driver.conf \
|
||||
src/vmm_mad/remotes/ec2/ec2_driver.default"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Virtualization drivers config. files, to be installed under $ETC_LOCATION
|
||||
# - ec2, $ETC_LOCATION/vmm_ec2
|
||||
# - ssh, $ETC_LOCATION/vmm_exec
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
VMM_EC2_ETC_FILES="src/vmm_mad/ec2/vmm_ec2rc \
|
||||
src/vmm_mad/ec2/vmm_ec2.conf"
|
||||
|
||||
VMM_EXEC_ETC_FILES="src/vmm_mad/exec/vmm_execrc \
|
||||
src/vmm_mad/exec/vmm_exec_kvm.conf \
|
||||
@ -1167,14 +1204,6 @@ VMM_EXEC_ETC_FILES="src/vmm_mad/exec/vmm_execrc \
|
||||
src/vmm_mad/exec/vmm_exec_xen4.conf \
|
||||
src/vmm_mad/exec/vmm_exec_vmware.conf"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Information drivers config. files, to be installed under $ETC_LOCATION
|
||||
# - ec2, $ETC_LOCATION/im_ec2
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
IM_EC2_ETC_FILES="src/im_mad/ec2/im_ec2rc \
|
||||
src/im_mad/ec2/im_ec2.conf"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Hook Manager driver config. files, to be installed under $ETC_LOCATION/hm
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -57,6 +57,8 @@
|
||||
<xs:element name="MEMORY_USED" type="xs:string"/>
|
||||
<xs:element name="VMS" type="xs:string"/>
|
||||
<xs:element name="VMS_USED" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE_USED" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
@ -60,6 +60,8 @@
|
||||
<xs:element name="MEMORY_USED" type="xs:string"/>
|
||||
<xs:element name="VMS" type="xs:string"/>
|
||||
<xs:element name="VMS_USED" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE_USED" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
@ -63,6 +63,8 @@
|
||||
<xs:element name="MEMORY_USED" type="xs:string"/>
|
||||
<xs:element name="VMS" type="xs:string"/>
|
||||
<xs:element name="VMS_USED" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE_USED" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
@ -67,6 +67,8 @@
|
||||
<xs:element name="MEMORY_USED" type="xs:string"/>
|
||||
<xs:element name="VMS" type="xs:string"/>
|
||||
<xs:element name="VMS_USED" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE" type="xs:string"/>
|
||||
<xs:element name="VOLATILE_SIZE_USED" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
@ -177,6 +177,23 @@ 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)
|
||||
#-------------------------------------------------------------------------------
|
||||
IM_MAD = [
|
||||
name = "collectd",
|
||||
executable = "collectd",
|
||||
arguments = "-p 4124 -f 5 -t 50" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# KVM Information Driver Manager Configuration
|
||||
# -r number of retries when monitoring a host
|
||||
@ -224,8 +241,8 @@ IM_MAD = [
|
||||
#-------------------------------------------------------------------------------
|
||||
#IM_MAD = [
|
||||
# name = "ec2",
|
||||
# executable = "one_im_ec2",
|
||||
# arguments = "im_ec2/im_ec2.conf" ]
|
||||
# executable = "one_im_sh",
|
||||
# arguments = "-c -t 1 -r 0 ec2" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -318,14 +335,13 @@ VM_MAD = [
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 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 = "ec2",
|
||||
# executable = "one_vmm_ec2",
|
||||
# arguments = "vmm_ec2/vmm_ec2.conf",
|
||||
# executable = "one_vmm_sh",
|
||||
# arguments = "-t 15 -r 0 ec2",
|
||||
# type = "xml" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-ALLOCATE\-ADDRESS" "1" "August 2013" "" "econe-allocate-address(1) -- Allocates a new elastic IP address for the user"
|
||||
.TH "ECONE\-ALLOCATE\-ADDRESS" "1" "October 2013" "" "econe-allocate-address(1) -- Allocates a new elastic IP address for the user"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-allocate\-address\fR
|
||||
@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-ASSOCIATE\-ADDRESS" "1" "August 2013" "" "econe-associate-address(1) -- Associates a publicIP of the user with a given instance"
|
||||
.TH "ECONE\-ASSOCIATE\-ADDRESS" "1" "October 2013" "" "econe-associate-address(1) -- Associates a publicIP of the user with a given instance"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-associate\-address\fR
|
||||
@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-ATTACH\-VOLUME" "1" "August 2013" "" "econe-attach-volume(1) -- Attaches a DATABLOCK to an instance"
|
||||
.TH "ECONE\-ATTACH\-VOLUME" "1" "October 2013" "" "econe-attach-volume(1) -- Attaches a DATABLOCK to an instance"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-attach\-volume\fR
|
||||
@ -45,7 +45,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-CREATE\-KEYPAIR" "1" "August 2013" "" "econe-create-keypair(1) -- Creates the named keypair"
|
||||
.TH "ECONE\-CREATE\-KEYPAIR" "1" "October 2013" "" "econe-create-keypair(1) -- Creates the named keypair"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-create\-keypair\fR
|
||||
@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-CREATE\-VOLUME" "1" "August 2013" "" "econe-create-volume(1) -- Creates a new DATABLOCK in OpenNebula"
|
||||
.TH "ECONE\-CREATE\-VOLUME" "1" "October 2013" "" "econe-create-volume(1) -- Creates a new DATABLOCK in OpenNebula"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-create\-volume\fR
|
||||
@ -40,7 +40,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DELETE\-KEYPAIR" "1" "August 2013" "" "econe-delete-keypair(1) -- Deletes the named keypair, removes the associated keys"
|
||||
.TH "ECONE\-DELETE\-KEYPAIR" "1" "October 2013" "" "econe-delete-keypair(1) -- Deletes the named keypair, removes the associated keys"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-delete\-keypair\fR
|
||||
@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DELETE\-VOLUME" "1" "August 2013" "" "econe-delete-volume(1) -- Deletes an existing DATABLOCK"
|
||||
.TH "ECONE\-DELETE\-VOLUME" "1" "October 2013" "" "econe-delete-volume(1) -- Deletes an existing DATABLOCK"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-delete\-volume\fR
|
||||
@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DESCRIBE\-ADDRESSES" "1" "August 2013" "" "econe-describe-addresses(1) -- Lists elastic IP addresses"
|
||||
.TH "ECONE\-DESCRIBE\-ADDRESSES" "1" "October 2013" "" "econe-describe-addresses(1) -- Lists elastic IP addresses"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-describe\-addresses\fR
|
||||
@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DESCRIBE\-IMAGES" "1" "August 2013" "" "econe-describe-images(1) -- Lists all registered images belonging to one particular user"
|
||||
.TH "ECONE\-DESCRIBE\-IMAGES" "1" "October 2013" "" "econe-describe-images(1) -- Lists all registered images belonging to one particular user"
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
econe\-describe\-images \fIOPTIONS\fR
|
||||
@ -36,7 +36,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DESCRIBE\-INSTANCES" "1" "August 2013" "" "econe-describe-instances(1) -- Outputs a list of launched images belonging to one particular user"
|
||||
.TH "ECONE\-DESCRIBE\-INSTANCES" "1" "October 2013" "" "econe-describe-instances(1) -- Outputs a list of launched images belonging to one particular user"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-describe\-instances\fR
|
||||
@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DESCRIBE\-KEYPAIRS" "1" "August 2013" "" "econe-describe-keypairs(1) -- List and describe the key pairs available to the user"
|
||||
.TH "ECONE\-DESCRIBE\-KEYPAIRS" "1" "October 2013" "" "econe-describe-keypairs(1) -- List and describe the key pairs available to the user"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-describe\-keypairs\fR
|
||||
@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DESCRIBE\-VOLUMES" "1" "August 2013" "" "econe-describe-volumes(1) -- Describe all available DATABLOCKs for this user"
|
||||
.TH "ECONE\-DESCRIBE\-VOLUMES" "1" "October 2013" "" "econe-describe-volumes(1) -- Describe all available DATABLOCKs for this user"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-describe\-volumes\fR
|
||||
@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DETACH\-VOLUME" "1" "August 2013" "" "econe-detach-volume(1) -- Detaches a DATABLOCK from an instance"
|
||||
.TH "ECONE\-DETACH\-VOLUME" "1" "October 2013" "" "econe-detach-volume(1) -- Detaches a DATABLOCK from an instance"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-detach\-volume\fR
|
||||
@ -45,7 +45,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-DISASSOCIATE\-ADDRESS" "1" "August 2013" "" "econe-disassociate-address(1) -- Disasociate a publicIP of the user currently associated with an instance"
|
||||
.TH "ECONE\-DISASSOCIATE\-ADDRESS" "1" "October 2013" "" "econe-disassociate-address(1) -- Disasociate a publicIP of the user currently associated with an instance"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-disassociate\-address\fR
|
||||
@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-REBOOT\-INSTANCES" "1" "August 2013" "" "econe-reboot-instances(1) -- Reboots a set of virtual machines"
|
||||
.TH "ECONE\-REBOOT\-INSTANCES" "1" "October 2013" "" "econe-reboot-instances(1) -- Reboots a set of virtual machines"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-reboot\-instances\fR
|
||||
@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-REGISTER" "1" "August 2013" "" "econe-register(1) -- Registers an image"
|
||||
.TH "ECONE\-REGISTER" "1" "October 2013" "" "econe-register(1) -- Registers an image"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-register\fR
|
||||
@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-RELEASE\-ADDRESS" "1" "August 2013" "" "econe-release-address(1) -- Releases a publicIP of the user"
|
||||
.TH "ECONE\-RELEASE\-ADDRESS" "1" "October 2013" "" "econe-release-address(1) -- Releases a publicIP of the user"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-release\-address\fR
|
||||
@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-RUN\-INSTANCES" "1" "August 2013" "" "econe-run-instances(1) -- Runs an instance of a particular image (that needs to be referenced)"
|
||||
.TH "ECONE\-RUN\-INSTANCES" "1" "October 2013" "" "econe-run-instances(1) -- Runs an instance of a particular image (that needs to be referenced)"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-run\-instances\fR
|
||||
@ -53,7 +53,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-START\-INSTANCES" "1" "August 2013" "" "econe-start-instances(1) -- Starts a set of virtual machines"
|
||||
.TH "ECONE\-START\-INSTANCES" "1" "October 2013" "" "econe-start-instances(1) -- Starts a set of virtual machines"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-start\-instances\fR
|
||||
@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-STOP\-INSTANCES" "1" "August 2013" "" "econe-stop-instances(1) -- Stops a set of virtual machines"
|
||||
.TH "ECONE\-STOP\-INSTANCES" "1" "October 2013" "" "econe-stop-instances(1) -- Stops a set of virtual machines"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-stop\-instances\fR
|
||||
@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-TERMINATE\-INSTANCES" "1" "August 2013" "" "econe-terminate-instances(1) -- Shutdowns a set of virtual machines (or cancel, depending on its state)"
|
||||
.TH "ECONE\-TERMINATE\-INSTANCES" "1" "October 2013" "" "econe-terminate-instances(1) -- Shutdowns a set of virtual machines (or cancel, depending on its state)"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-terminate\-instances\fR
|
||||
@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ECONE\-UPLOAD" "1" "August 2013" "" "econe-upload(1) -- Uploads an image to OpenNebula"
|
||||
.TH "ECONE\-UPLOAD" "1" "October 2013" "" "econe-upload(1) -- Uploads an image to OpenNebula"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBecone\-upload\fR
|
||||
@ -43,7 +43,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||
.TH OPENNEBULA "1" "August 2013" "OpenNebula 4.3.0" "User Commands"
|
||||
.TH OPENNEBULA "1" "October 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.SH NAME
|
||||
OpenNebula \- OCCI Manage Compute
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||
.TH OPENNEBULA "1" "August 2013" "OpenNebula 4.3.0" "User Commands"
|
||||
.TH OPENNEBULA "1" "October 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.SH NAME
|
||||
OpenNebula \- OCCI Manage Instance
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||
.TH OPENNEBULA "1" "August 2013" "OpenNebula 4.3.0" "User Commands"
|
||||
.TH OPENNEBULA "1" "October 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.SH NAME
|
||||
OpenNebula \- OCCI Manage Network
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||
.TH OPENNEBULA "1" "August 2013" "OpenNebula 4.3.0" "User Commands"
|
||||
.TH OPENNEBULA "1" "October 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.SH NAME
|
||||
OpenNebula \- OCCI Manage Storage
|
||||
.SH SYNOPSIS
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEACCT" "1" "August 2013" "" "oneacct(1) -- OpenNebula Accounting Tool"
|
||||
.TH "ONEACCT" "1" "October 2013" "" "oneacct(1) -- OpenNebula Accounting Tool"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBoneacct\fR
|
||||
@ -46,7 +46,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEACL" "1" "August 2013" "" "oneacl(1) -- manages OpenNebula ACLs"
|
||||
.TH "ONEACL" "1" "October 2013" "" "oneacl(1) -- manages OpenNebula ACLs"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBoneacl\fR
|
||||
@ -54,7 +54,7 @@ aclid_list Comma\-separated list of OpenNebula ACL names or ids
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONECLUSTER" "1" "August 2013" "" "onecluster(1) -- manages OpenNebula clusters"
|
||||
.TH "ONECLUSTER" "1" "October 2013" "" "onecluster(1) -- manages OpenNebula clusters"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonecluster\fR
|
||||
@ -65,6 +65,9 @@ delvnet \fIclusterid\fR \fIvnetid\fR Deletes a Virtual Network from the given Cl
|
||||
.IP "\(bu" 4
|
||||
update \fIclusterid\fR [\fIfile\fR] Update the template contents\. If a path is not provided the editor will be launched to modify the current content\. valid options: append
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
rename \fIclusterid\fR \fIname\fR Renames the Cluster
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "ARGUMENT FORMATS"
|
||||
@ -96,7 +99,7 @@ datastoreid OpenNebula DATASTORE name or id
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEDATASTORE" "1" "August 2013" "" "onedatastore(1) -- manages OpenNebula datastores"
|
||||
.TH "ONEDATASTORE" "1" "October 2013" "" "onedatastore(1) -- manages OpenNebula datastores"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonedatastore\fR
|
||||
@ -57,6 +57,9 @@ show \fIdatastoreid\fR Shows information for the given Datastore valid options:
|
||||
.IP "\(bu" 4
|
||||
update \fIdatastoreid\fR [\fIfile\fR] Update the template contents\. If a path is not provided the editor will be launched to modify the current content\. valid options: append
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
rename \fIdatastoreid\fR \fIname\fR Renames the Datastore
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "ARGUMENT FORMATS"
|
||||
@ -88,7 +91,7 @@ userid OpenNebula USER name or id
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEDB" "1" "August 2013" "" "onedb(1) -- OpenNebula database migration tool"
|
||||
.TH "ONEDB" "1" "October 2013" "" "onedb(1) -- OpenNebula database migration tool"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonedb\fR
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEFLOW\-TEMPLATE" "1" "August 2013" "" "oneflow-template(1) -- Manage oneFlow Templates"
|
||||
.TH "ONEFLOW\-TEMPLATE" "1" "October 2013" "" "oneflow-template(1) -- Manage oneFlow Templates"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBoneflow\-template\fR
|
||||
@ -84,7 +84,7 @@ templateid_list Comma\-separated list of OpenNebula SERVICE TEMPLATE names or id
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEFLOW" "1" "August 2013" "" "oneflow(1) -- Manage oneFlow Services"
|
||||
.TH "ONEFLOW" "1" "October 2013" "" "oneflow(1) -- Manage oneFlow Services"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBoneflow\fR
|
||||
@ -94,7 +94,7 @@ vm_action Actions supported: shutdown, shutdown\-hard, undeploy, undeploy\-hard,
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEGROUP" "1" "August 2013" "" "onegroup(1) -- manages OpenNebula groups"
|
||||
.TH "ONEGROUP" "1" "October 2013" "" "onegroup(1) -- manages OpenNebula groups"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonegroup\fR
|
||||
@ -74,7 +74,7 @@ groupid_list Comma\-separated list of OpenNebula GROUP names or ids
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEHOST" "1" "August 2013" "" "onehost(1) -- manages OpenNebula hosts"
|
||||
.TH "ONEHOST" "1" "October 2013" "" "onehost(1) -- manages OpenNebula hosts"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonehost\fR
|
||||
@ -66,6 +66,9 @@ top Lists Hosts continuously valid options: list, delay, filter, xml, numeric, k
|
||||
.IP "\(bu" 4
|
||||
flush \fIrange|hostid_list\fR Disables the host and reschedules all the running VMs in it\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
rename \fIhostid\fR \fIname\fR Renames the Host
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "ARGUMENT FORMATS"
|
||||
@ -88,7 +91,7 @@ hostid_list Comma\-separated list of OpenNebula HOST names or ids
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEIMAGE" "1" "August 2013" "" "oneimage(1) -- manages OpenNebula images"
|
||||
.TH "ONEIMAGE" "1" "October 2013" "" "oneimage(1) -- manages OpenNebula images"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBoneimage\fR
|
||||
@ -161,7 +161,7 @@ type Image type: OS, CDROM, DATABLOCK, KERNEL, RAMDISK, CONTEXT
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONETEMPLATE" "1" "August 2013" "" "onetemplate(1) -- manages OpenNebula templates"
|
||||
.TH "ONETEMPLATE" "1" "October 2013" "" "onetemplate(1) -- manages OpenNebula templates"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonetemplate\fR
|
||||
@ -31,12 +31,22 @@
|
||||
\-\-raw string Raw string to add to the template\. Not to be
|
||||
confused with the RAW attribute
|
||||
\-\-vnc Add VNC server to the VM
|
||||
\-\-vnc\-password password VNC password
|
||||
\-\-vnc\-listen ip VNC IP where to listen for connections\. By
|
||||
default is 0\.0\.0\.0 (all interfaces)\.
|
||||
\-\-spice Add spice server to the VM
|
||||
\-\-spice\-password password spice password
|
||||
\-\-spice\-listen ip spice IP where to listen for connections\. By
|
||||
default is 0\.0\.0\.0 (all interfaces)\.
|
||||
\-\-ssh [file] Add an ssh public key to the context\. If the file
|
||||
is omited then the user variable SSH_PUBLIC_KEY
|
||||
will be used\.
|
||||
\-\-net_context Add network contextualization parameters
|
||||
\-\-context line1,line2,line3 Lines to add to the context section
|
||||
\-\-boot device Select boot device (hd|fd|cdrom|network)
|
||||
\-\-files_ds file1,file2 Add files to the contextualization CD from
|
||||
thefiles datastore
|
||||
\-\-init script1,script2 Script or scripts to start in context
|
||||
\-\-dry Just print the template
|
||||
\-m, \-\-multiple x Instance multiple VMs
|
||||
\-\-hold Creates the new VM on hold state instead of
|
||||
@ -81,7 +91,7 @@ Examples:
|
||||
|
||||
onetempate create \-\-name "test vm" \-\-memory 128 \-\-cpu 1 \e
|
||||
\-\-disk arch,data
|
||||
valid options: name, cpu, vcpu, arch, memory, disk, nic, raw, vnc, ssh, net_context, context, boot, dry
|
||||
valid options: name, cpu, vcpu, arch, memory, disk, nic, raw, vnc, vnc_password, vnc_listen, spice, spice_password, spice_listen, ssh, net_context, context, boot, files_ds, init, dry
|
||||
.
|
||||
.fi
|
||||
.
|
||||
@ -95,7 +105,7 @@ clone \fItemplateid\fR \fIname\fR Creates a new Template from an existing one
|
||||
delete \fIrange|templateid_list\fR Deletes the given Image
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
instantiate \fItemplateid\fR [\fIfile\fR] Creates a new VM instance from the given Template\. This VM can be managed with the \'onevm\' command valid options: name, multiple, hold, cpu, vcpu, arch, memory, disk, nic, raw, vnc, ssh, net_context, context, boot
|
||||
instantiate \fItemplateid\fR [\fIfile\fR] Creates a new VM instance from the given Template\. This VM can be managed with the \'onevm\' command valid options: name, multiple, hold, cpu, vcpu, arch, memory, disk, nic, raw, vnc, vnc_password, vnc_listen, spice, spice_password, spice_listen, ssh, net_context, context, boot, files_ds, init
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
chgrp \fIrange|templateid_list\fR \fIgroupid\fR Changes the Template group
|
||||
@ -152,7 +162,7 @@ filterflag a, all all the known VMTEMPLATEs m, mine the VMTEMPLATE belonging to
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEUSER" "1" "August 2013" "" "oneuser(1) -- manages OpenNebula users"
|
||||
.TH "ONEUSER" "1" "October 2013" "" "oneuser(1) -- manages OpenNebula users"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBoneuser\fR
|
||||
@ -99,7 +99,13 @@ delete \fIrange|userid_list\fR Deletes the given User
|
||||
passwd \fIuserid\fR [\fIpassword\fR] Changes the given User\'s password valid options: read_file, sha1, ssh, x509, key, cert, driver
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
chgrp \fIrange|userid_list\fR \fIgroupid\fR Changes the User\'s main group
|
||||
chgrp \fIrange|userid_list\fR \fIgroupid\fR Changes the User\'s primary group
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
addgroup \fIrange|userid_list\fR \fIgroupid\fR Adds the User to a secondary group
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
delgroup \fIrange|userid_list\fR \fIgroupid\fR Removes the User from a secondary group
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
chauth \fIuserid\fR [\fIauth\fR] [\fIpassword\fR] Changes the User\'s auth driver and its password (optional) Examples: oneuser chauth my_user core oneuser chauth my_user core new_password oneuser chauth my_user core \-r /tmp/mypass oneuser chauth my_user \-\-ssh \-\-key /home/oneadmin/\.ssh/id_rsa oneuser chauth my_user \-\-ssh \-r /tmp/public_key oneuser chauth my_user \-\-x509 \-\-cert /tmp/my_cert\.pem valid options: read_file, sha1, ssh, x509, key, cert, driver
|
||||
@ -141,7 +147,7 @@ password User password
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEVDC" "1" "August 2013" "" "onevdc(1) -- manages OpenNebula Virtual DataCenters"
|
||||
.TH "ONEVDC" "1" "October 2013" "" "onevdc(1) -- manages OpenNebula Virtual DataCenters"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonevdc\fR
|
||||
@ -63,7 +63,7 @@ vdcid VDC ID
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEVM" "1" "August 2013" "" "onevm(1) -- manages OpenNebula virtual machines"
|
||||
.TH "ONEVM" "1" "October 2013" "" "onevm(1) -- manages OpenNebula virtual machines"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonevm\fR
|
||||
@ -31,12 +31,22 @@
|
||||
\-\-raw string Raw string to add to the template\. Not to be
|
||||
confused with the RAW attribute
|
||||
\-\-vnc Add VNC server to the VM
|
||||
\-\-vnc\-password password VNC password
|
||||
\-\-vnc\-listen ip VNC IP where to listen for connections\. By
|
||||
default is 0\.0\.0\.0 (all interfaces)\.
|
||||
\-\-spice Add spice server to the VM
|
||||
\-\-spice\-password password spice password
|
||||
\-\-spice\-listen ip spice IP where to listen for connections\. By
|
||||
default is 0\.0\.0\.0 (all interfaces)\.
|
||||
\-\-ssh [file] Add an ssh public key to the context\. If the file
|
||||
is omited then the user variable SSH_PUBLIC_KEY
|
||||
will be used\.
|
||||
\-\-net_context Add network contextualization parameters
|
||||
\-\-context line1,line2,line3 Lines to add to the context section
|
||||
\-\-boot device Select boot device (hd|fd|cdrom|network)
|
||||
\-\-files_ds file1,file2 Add files to the contextualization CD from
|
||||
thefiles datastore
|
||||
\-\-init script1,script2 Script or scripts to start in context
|
||||
\-\-dry Just print the template
|
||||
\-a, \-\-append Append new attributes to the current template
|
||||
\-\-schedule TIME Schedules this action to be executed afterthe
|
||||
@ -98,7 +108,7 @@ Examples:
|
||||
\- a vm with two disks
|
||||
|
||||
onevm create \-\-name "test vm" \-\-memory 128 \-\-cpu 1 \-\-disk arch,data
|
||||
valid options: multiple, hold, name, cpu, vcpu, arch, memory, disk, nic, raw, vnc, ssh, net_context, context, boot, dry
|
||||
valid options: multiple, hold, name, cpu, vcpu, arch, memory, disk, nic, raw, vnc, vnc_password, vnc_listen, spice, spice_password, spice_listen, ssh, net_context, context, boot, files_ds, init, dry
|
||||
.
|
||||
.fi
|
||||
.
|
||||
@ -183,7 +193,7 @@ shutdown \fIrange|vmid_list\fR Shuts down the given VM\. The VM life cycle will
|
||||
|
||||
With \-\-hard it unplugs the VM\.
|
||||
|
||||
States: RUNNING
|
||||
States: RUNNING, UNKNOWN (with \-\-hard)
|
||||
valid options: schedule, hard
|
||||
.
|
||||
.fi
|
||||
@ -241,7 +251,7 @@ valid options: schedule, hard
|
||||
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
deploy \fIrange|vmid_list\fR \fIhostid\fR Deploys the given VM in the specified Host\. This command forces the deployment, in a standard installation the Scheduler is in charge of this decision
|
||||
deploy \fIrange|vmid_list\fR \fIhostid\fR [\fIdatastoreid\fR] Deploys the given VM in the specified Host\. This command forces the deployment, in a standard installation the Scheduler is in charge of this decision
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
@ -491,6 +501,9 @@ groupid OpenNebula GROUP name or id
|
||||
userid OpenNebula USER name or id
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
datastoreid OpenNebula DATASTORE name or id
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
vmid OpenNebula VM name or id
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
@ -505,7 +518,7 @@ diskid Integer
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEVNET" "1" "August 2013" "" "onevnet(1) -- manages OpenNebula networks"
|
||||
.TH "ONEVNET" "1" "October 2013" "" "onevnet(1) -- manages OpenNebula networks"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonevnet\fR
|
||||
@ -104,7 +104,7 @@ filterflag a, all all the known VNETs m, mine the VNET belonging to the user in
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "ONEZONE" "1" "August 2013" "" "onezone(1) -- manages OpenNebula zones"
|
||||
.TH "ONEZONE" "1" "October 2013" "" "onezone(1) -- manages OpenNebula zones"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBonezone\fR
|
||||
@ -53,7 +53,7 @@ zoneid Zone ID
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.0 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
.
|
||||
.P
|
||||
Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0
|
||||
|
@ -79,7 +79,7 @@ if [ ! -d /var/lock/one ]; then
|
||||
fi
|
||||
|
||||
# Start the one daemon
|
||||
$ONED -f 2>&1 &
|
||||
$ONED -i 2>&1 &
|
||||
STARTED=$?
|
||||
CURPID=$!
|
||||
|
||||
@ -89,9 +89,10 @@ if [ $STARTED -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# Give oned a chance to do it's thing...
|
||||
sleep 2
|
||||
sleep 5
|
||||
|
||||
# OK we're all done here
|
||||
# Just in case the process gets stuck, kill it
|
||||
kill -TERM $CURPID > /dev/null 2>&1
|
||||
|
||||
counter=0
|
||||
@ -105,4 +106,4 @@ while ps $CURPID > /dev/null 2>&1; do
|
||||
done
|
||||
|
||||
# If the lock file is left over remove it
|
||||
rm -f /var/lol/one/one
|
||||
rm -f /var/lock/one/one
|
||||
|
@ -21,7 +21,7 @@ require 'tmpdir'
|
||||
|
||||
|
||||
DEFAULTS={
|
||||
:version => "4.3.0",
|
||||
:version => "4.3.80",
|
||||
:date => Time.now.strftime("%Y-%m-%d"),
|
||||
:dependencies => []
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
VERSION=${VERSION:-4.3.0}
|
||||
VERSION=${VERSION:-4.3.80}
|
||||
MAINTAINER=${MAINTAINER:-C12G Labs <support@c12g.com>}
|
||||
LICENSE=${LICENSE:-Apache 2.0}
|
||||
PACKAGE_NAME=${PACKAGE_NAME:-one-context}
|
||||
|
@ -29,7 +29,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
|
||||
def self.state_to_str(id)
|
||||
id = id.to_i
|
||||
state_str = Host::HOST_STATES[id]
|
||||
|
||||
|
||||
return Host::SHORT_HOST_STATES[state_str]
|
||||
end
|
||||
|
||||
@ -114,7 +114,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
|
||||
"#{cpu_usage} / #{max_cpu} (#{ratio}%)"
|
||||
else
|
||||
"#{cpu_usage} / -"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -156,6 +156,84 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
|
||||
table
|
||||
end
|
||||
|
||||
|
||||
NUM_THREADS = 15
|
||||
def sync(host_ids, options)
|
||||
cluster_id = options[:cluster]
|
||||
|
||||
# Get remote_dir (implies oneadmin group)
|
||||
rc = OpenNebula::System.new(@client).get_configuration
|
||||
return -1, rc.message if OpenNebula.is_error?(rc)
|
||||
|
||||
conf = rc
|
||||
remote_dir = conf['SCRIPTS_REMOTE_DIR']
|
||||
|
||||
# Verify the existence of REMOTES_LOCATION
|
||||
if !File.directory? REMOTES_LOCATION
|
||||
error_msg = "'#{REMOTES_LOCATION}' does not exist. " <<
|
||||
"This command must be run in the frontend."
|
||||
return -1,error_msg
|
||||
end
|
||||
|
||||
# Touch the update file
|
||||
FileUtils.touch(File.join(REMOTES_LOCATION,'.update'))
|
||||
|
||||
# Get the Host pool
|
||||
filter_flag ||= OpenNebula::Pool::INFO_ALL
|
||||
|
||||
pool = factory_pool(filter_flag)
|
||||
|
||||
rc = pool.info
|
||||
return -1, rc.message if OpenNebula.is_error?(rc)
|
||||
|
||||
# Assign hosts to threads
|
||||
i = 0
|
||||
hs_threads = Array.new
|
||||
|
||||
pool.each do |host|
|
||||
if host_ids
|
||||
next if !host_ids.include?(host['ID'].to_i)
|
||||
elsif cluster_id
|
||||
next if host['CLUSTER_ID'].to_i != cluster_id
|
||||
end
|
||||
|
||||
hs_threads[i % NUM_THREADS] ||= []
|
||||
hs_threads[i % NUM_THREADS] << host['NAME']
|
||||
i+=1
|
||||
end
|
||||
|
||||
# Run the jobs in threads
|
||||
host_errors = Array.new
|
||||
lock = Mutex.new
|
||||
|
||||
ts = hs_threads.map do |t|
|
||||
Thread.new {
|
||||
t.each do |host|
|
||||
sync_cmd = "scp -rp #{REMOTES_LOCATION}/. #{host}:#{remote_dir} 2> /dev/null"
|
||||
`#{sync_cmd} 2>/dev/null`
|
||||
|
||||
if !$?.success?
|
||||
lock.synchronize {
|
||||
host_errors << host
|
||||
}
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
# Wait for threads to finish
|
||||
ts.each{|t| t.join}
|
||||
|
||||
if host_errors.empty?
|
||||
puts "All hosts updated successfully."
|
||||
0
|
||||
else
|
||||
STDERR.puts "Failed to update the following hosts:"
|
||||
host_errors.each{|h| STDERR.puts "* #{h}"}
|
||||
-1
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def factory(id=nil)
|
||||
|
@ -31,9 +31,10 @@ class OneQuotaHelper
|
||||
# ]
|
||||
#
|
||||
# VM = [
|
||||
# VMS = <Max. number of VMs>
|
||||
# MEMORY = <Max. allocated memory (Mb)>
|
||||
# CPU = <Max. allocated CPU>
|
||||
# VMS = <Max. number of VMs>
|
||||
# MEMORY = <Max. allocated memory (MB)>
|
||||
# CPU = <Max. allocated CPU>
|
||||
# VOLATILE_SIZE = <Max. allocated volatile disks (MB)>
|
||||
# ]
|
||||
#
|
||||
# NETWORK = [
|
||||
@ -180,14 +181,14 @@ class OneQuotaHelper
|
||||
|
||||
if !vm_quotas[0].nil?
|
||||
CLIHelper::ShowTable.new(nil, self) do
|
||||
column :"NUMBER OF VMS", "", :right, :size=>20 do |d|
|
||||
column :"NUMBER OF VMS", "", :right, :size=>17 do |d|
|
||||
if !d.nil?
|
||||
elem = 'VMS'
|
||||
limit = d[elem]
|
||||
limit = helper.get_default_limit(
|
||||
limit, "VM_QUOTA/VM/#{elem}")
|
||||
|
||||
"%8d / %8d" % [d["VMS_USED"], limit]
|
||||
"%7d / %7d" % [d["VMS_USED"], limit]
|
||||
end
|
||||
end
|
||||
|
||||
@ -215,6 +216,20 @@ class OneQuotaHelper
|
||||
"%8.2f / %8.2f" % [d["CPU_USED"], limit]
|
||||
end
|
||||
end
|
||||
|
||||
column :"VOLATILE_SIZE", "", :right, :size=>20 do |d|
|
||||
if !d.nil?
|
||||
elem = 'VOLATILE_SIZE'
|
||||
limit = d[elem]
|
||||
limit = helper.get_default_limit(
|
||||
limit, "VM_QUOTA/VM/#{elem}")
|
||||
|
||||
"%8s / %8s" % [
|
||||
OpenNebulaHelper.unit_to_str(d["VOLATILE_SIZE_USED"].to_i,{},"M"),
|
||||
OpenNebulaHelper.unit_to_str(limit.to_i,{},"M")
|
||||
]
|
||||
end
|
||||
end
|
||||
end.show(vm_quotas, {})
|
||||
|
||||
puts
|
||||
|
@ -20,8 +20,10 @@ ONE_LOCATION=ENV["ONE_LOCATION"]
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION="/usr/lib/one/ruby"
|
||||
REMOTES_LOCATION="/var/lib/one/remotes"
|
||||
else
|
||||
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
|
||||
REMOTES_LOCATION=ONE_LOCATION+"/var/remotes/"
|
||||
end
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
@ -72,6 +74,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
}
|
||||
|
||||
CREAT_OPTIONS = [ IM, VMM, VNET, OneClusterHelper::CLUSTER ]
|
||||
SYNC_OPTIONS = [ OneClusterHelper::CLUSTER ]
|
||||
|
||||
########################################################################
|
||||
# Formatters for arguments
|
||||
@ -164,16 +167,14 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
sync_desc = <<-EOT.unindent
|
||||
Synchronizes probes in /var/lib/one/remotes ($ONE_LOCATION/var/remotes
|
||||
in self-contained installations) with Hosts.
|
||||
The copy is performed the next time the Host is monitored
|
||||
Examples:
|
||||
onehost sync
|
||||
onehost sync -c myCluster
|
||||
onehost sync host01,host02,host03
|
||||
EOT
|
||||
|
||||
command :sync, sync_desc do
|
||||
if ONE_LOCATION
|
||||
FileUtils.touch "#{ONE_LOCATION}/var/remotes"
|
||||
else
|
||||
FileUtils.touch "/var/lib/one/remotes"
|
||||
end
|
||||
0
|
||||
command :sync, sync_desc, [:range,:hostid_list, nil], :options=>SYNC_OPTIONS do
|
||||
helper.sync(args[0],options)
|
||||
end
|
||||
|
||||
list_desc = <<-EOT.unindent
|
||||
|
@ -50,7 +50,7 @@ end
|
||||
module CloudClient
|
||||
|
||||
# OpenNebula version
|
||||
VERSION = '4.3.0'
|
||||
VERSION = '4.3.80'
|
||||
|
||||
# #########################################################################
|
||||
# Default location for the authentication file
|
||||
|
@ -64,10 +64,10 @@ set -e
|
||||
|
||||
USED_MB=\$($DU -sLm ${BASE_PATH%/} 2>/dev/null | $CUT -f1)
|
||||
|
||||
DF_STR=\$($DF -m | grep ${BASE_PATH%/} | $SED 's/ \+/:/g')
|
||||
DF_STR=\$($DF -m | grep ${BASE_PATH%/} | sed -e 's/ \+/:/g')
|
||||
|
||||
TOTAL_MB=\$(echo \$DF_STR | $CUT -d':' -f 2)
|
||||
FREE_MB=\$(echo \$DF_STR | $CUT -d':' -f 4)
|
||||
TOTAL_MB=\$(echo \$DF_STR | $CUT -d: -f 2)
|
||||
FREE_MB=\$(echo \$DF_STR | $CUT -d: -f 4)
|
||||
|
||||
echo "USED_MB=\$USED_MB"
|
||||
echo "TOTAL_MB=\$TOTAL_MB"
|
||||
|
@ -23,6 +23,13 @@
|
||||
#include "Host.h"
|
||||
#include "Nebula.h"
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
const char * Host::HYBRID_HYPERVISORS[] = {"EC2"};
|
||||
|
||||
const int Host::NUM_HYBRID_HYPERVISORS = 1;
|
||||
|
||||
/* ************************************************************************ */
|
||||
/* Host :: Constructor/Destructor */
|
||||
/* ************************************************************************ */
|
||||
@ -426,6 +433,29 @@ error_common:
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
bool Host::isHybrid() const
|
||||
{
|
||||
string hypervisor;
|
||||
bool is_hybrid = false;
|
||||
|
||||
get_template_attribute("HYPERVISOR", hypervisor);
|
||||
one_util::toupper(hypervisor);
|
||||
|
||||
for(int i=0; i < NUM_HYBRID_HYPERVISORS; i++)
|
||||
{
|
||||
if(hypervisor==HYBRID_HYPERVISORS[i])
|
||||
{
|
||||
is_hybrid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return is_hybrid;
|
||||
}
|
||||
|
||||
/* ************************************************************************ */
|
||||
/* Host :: Misc */
|
||||
/* ************************************************************************ */
|
||||
|
@ -98,8 +98,6 @@ int InformationManager::start()
|
||||
return -1;
|
||||
}
|
||||
|
||||
utime(remotes_location.c_str(), 0);
|
||||
|
||||
NebulaLog::log("InM",Log::INFO,"Starting Information Manager...");
|
||||
|
||||
pthread_attr_init (&pattr);
|
||||
@ -145,8 +143,6 @@ void InformationManager::timer_action()
|
||||
time_t now;
|
||||
ostringstream oss;
|
||||
|
||||
struct stat sb;
|
||||
|
||||
set<int> discovered_hosts;
|
||||
set<int>::iterator it;
|
||||
|
||||
@ -182,14 +178,6 @@ void InformationManager::timer_action()
|
||||
return;
|
||||
}
|
||||
|
||||
if (stat(remotes_location.c_str(), &sb) == -1)
|
||||
{
|
||||
sb.st_mtime = 0;
|
||||
|
||||
NebulaLog::log("InM",Log::ERROR,"Could not stat remotes directory, "
|
||||
"will not update remotes.");
|
||||
}
|
||||
|
||||
for(it=discovered_hosts.begin();it!=discovered_hosts.end();it++)
|
||||
{
|
||||
host = hpool->get(*it,true);
|
||||
@ -257,8 +245,8 @@ void InformationManager::timer_action()
|
||||
{
|
||||
bool update_remotes = false;
|
||||
|
||||
if ((sb.st_mtime != 0) &&
|
||||
(sb.st_mtime > host->get_last_monitored()))
|
||||
//Force remotes update if the host has never been monitored.
|
||||
if (host->get_last_monitored() == 0)
|
||||
{
|
||||
update_remotes = true;
|
||||
}
|
||||
|
137
src/im_mad/collectd/ListenerThread.cc
Normal file
137
src/im_mad/collectd/ListenerThread.cc
Normal file
@ -0,0 +1,137 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
#include "ListenerThread.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
const size_t ListenerThread::MESSAGE_SIZE = 100000;
|
||||
const size_t ListenerThread::BUFFER_SIZE = 100;
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void ListenerThread::flush_buffer(int fd)
|
||||
{
|
||||
lock();
|
||||
|
||||
std::vector<std::string>::iterator it;
|
||||
|
||||
for(it = monitor_data.begin() ; it != monitor_data.end(); ++it)
|
||||
{
|
||||
size_t size = (*it).size();
|
||||
const char * message = (*it).c_str();
|
||||
|
||||
write(fd, message, size);
|
||||
}
|
||||
|
||||
monitor_data.clear();
|
||||
|
||||
unlock();
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void ListenerThread::monitor_loop()
|
||||
{
|
||||
char buffer[MESSAGE_SIZE];
|
||||
size_t rc;
|
||||
|
||||
struct sockaddr addr;
|
||||
socklen_t addr_size = sizeof(struct sockaddr);
|
||||
|
||||
while(true)
|
||||
{
|
||||
rc = recvfrom(socket, buffer, MESSAGE_SIZE, 0, &addr, &addr_size);
|
||||
|
||||
if (rc > 0 && rc < MESSAGE_SIZE)
|
||||
{
|
||||
std::string message(buffer, rc);
|
||||
|
||||
lock();
|
||||
|
||||
monitor_data.push_back(message);
|
||||
|
||||
unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
extern "C" void * listener_main(void *arg)
|
||||
{
|
||||
ListenerThread * listener = static_cast<ListenerThread *>(arg);
|
||||
|
||||
listener->monitor_loop();
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
ListenerPool::~ListenerPool()
|
||||
{
|
||||
std::vector<ListenerThread>::iterator it;
|
||||
|
||||
for(it = listeners.begin() ; it != listeners.end(); ++it)
|
||||
{
|
||||
pthread_cancel((*it).thread_id());
|
||||
}
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void ListenerPool::start_pool()
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
pthread_t id;
|
||||
|
||||
std::vector<ListenerThread>::iterator it;
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
|
||||
for(it = listeners.begin() ; it != listeners.end(); ++it)
|
||||
{
|
||||
pthread_create(&id, &attr, listener_main, (void *)&(*it));
|
||||
|
||||
(*it).thread_id(id);
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void ListenerPool::flush_pool()
|
||||
{
|
||||
std::vector<ListenerThread>::iterator it;
|
||||
|
||||
for(it = listeners.begin() ; it != listeners.end(); ++it)
|
||||
{
|
||||
(*it).flush_buffer(out_fd);
|
||||
}
|
||||
}
|
133
src/im_mad/collectd/ListenerThread.h
Normal file
133
src/im_mad/collectd/ListenerThread.h
Normal file
@ -0,0 +1,133 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/**
|
||||
* This class implements a listener thread for the IM collector. It receives
|
||||
* messages from a UDP port and stores it in a BUFFER. The class is controlled
|
||||
* by two parameters
|
||||
* - BUFFER_SIZE the number of pre-allocated capacity to store monitor
|
||||
* messages. It should be roughly equal to the number of hosts per thread
|
||||
* - MESSAGE_SIZE the size of each monitor message (100K by default). Each VM
|
||||
* needs ~100bytes so ~1000VMs per host
|
||||
*/
|
||||
class ListenerThread
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @param _socket descriptor to listen for messages
|
||||
*/
|
||||
ListenerThread(int _socket):socket(_socket)
|
||||
{
|
||||
pthread_mutex_init(&mutex,0);
|
||||
|
||||
monitor_data.reserve(BUFFER_SIZE);
|
||||
};
|
||||
|
||||
~ListenerThread()
|
||||
{
|
||||
pthread_mutex_destroy(&mutex);
|
||||
};
|
||||
|
||||
/**
|
||||
* Write the contents of the message buffer to a descriptor. Buffer is
|
||||
* cleared
|
||||
* @param fd file descriptor to send monitor data.
|
||||
*/
|
||||
void flush_buffer(int fd);
|
||||
|
||||
/**
|
||||
* Waits for UDP messages in a loop and store them in a buffer
|
||||
*/
|
||||
void monitor_loop();
|
||||
|
||||
/**
|
||||
* Set the thread ID for the listener
|
||||
*/
|
||||
void thread_id(pthread_t id)
|
||||
{
|
||||
_thread_id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the thread ID of the listener
|
||||
*/
|
||||
pthread_t thread_id()
|
||||
{
|
||||
return _thread_id;
|
||||
}
|
||||
|
||||
private:
|
||||
static const size_t MESSAGE_SIZE; /**< Monitor message size */
|
||||
static const size_t BUFFER_SIZE; /**< Pre-allocated capacoty */
|
||||
|
||||
pthread_mutex_t mutex;
|
||||
pthread_t _thread_id;
|
||||
|
||||
std::vector<std::string> monitor_data;
|
||||
|
||||
int socket;
|
||||
|
||||
void lock()
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
}
|
||||
|
||||
void unlock()
|
||||
{
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Main function for each listener, starts the monitor loop
|
||||
*/
|
||||
extern "C" void * listener_main(void *arg);
|
||||
|
||||
/**
|
||||
* Represents a pool of listener threads, it should be periodically flushed to
|
||||
* a file descriptor
|
||||
*/
|
||||
class ListenerPool
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @param fd descriptor to flush the data
|
||||
* @param sock socket for the UDP connections
|
||||
* @param num number of threads in the pool
|
||||
*/
|
||||
ListenerPool(int fd, int sock, size_t num)
|
||||
:listeners(num, ListenerThread(sock)), out_fd(fd), socket(sock){};
|
||||
|
||||
~ListenerPool();
|
||||
|
||||
void start_pool();
|
||||
|
||||
void flush_pool();
|
||||
|
||||
private:
|
||||
std::vector<ListenerThread> listeners;
|
||||
|
||||
int out_fd;
|
||||
int socket;
|
||||
};
|
194
src/im_mad/collectd/OpenNebulaDriver.cc
Normal file
194
src/im_mad/collectd/OpenNebulaDriver.cc
Normal file
@ -0,0 +1,194 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "OpenNebulaDriver.h"
|
||||
#include "ListenerThread.h"
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
int OpenNebulaDriver::read_one(std::string& message)
|
||||
{
|
||||
fd_set in_pipes;
|
||||
std::ostringstream oss;
|
||||
|
||||
char c;
|
||||
int rc;
|
||||
|
||||
FD_ZERO(&in_pipes);
|
||||
FD_SET (0,&in_pipes);
|
||||
|
||||
rc = select(1, &in_pipes, NULL, NULL, NULL);
|
||||
|
||||
if (rc == -1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
rc = read(0, (void *) &c, sizeof(char));
|
||||
oss << c;
|
||||
}
|
||||
while ( rc > 0 && c != '\n' );
|
||||
|
||||
if (rc < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
message = oss.str();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void OpenNebulaDriver::driver_loop()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
std::string message;
|
||||
|
||||
if (read_one(message) == 0)
|
||||
{
|
||||
std::istringstream is(message);
|
||||
std::string action;
|
||||
|
||||
if ( is.good() )
|
||||
{
|
||||
is >> action >> std::ws;
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (action == "INIT")
|
||||
{
|
||||
write2one("INIT SUCCESS\n",13);
|
||||
}
|
||||
else if (action == "FINALIZE")
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
driver_action(action, is);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
int IMCollectorDriver::init_collector()
|
||||
{
|
||||
struct sockaddr_in im_server;
|
||||
int rc;
|
||||
|
||||
int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
|
||||
if ( sock < 0 )
|
||||
{
|
||||
std::cerr << strerror(errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
im_server.sin_family = AF_INET;
|
||||
im_server.sin_port = htons(_port);
|
||||
|
||||
if (_address == "0.0.0.0")
|
||||
{
|
||||
im_server.sin_addr.s_addr = htonl (INADDR_ANY);
|
||||
}
|
||||
else if (inet_pton(AF_INET,_address.c_str(),&im_server.sin_addr.s_addr) < 0)
|
||||
{
|
||||
std::cerr << strerror(errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = bind(sock, (struct sockaddr *) &im_server, sizeof(struct sockaddr_in));
|
||||
|
||||
if ( rc < 0 )
|
||||
{
|
||||
std::cerr << strerror(errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
pool = new ListenerPool(1, sock, _threads);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void IMCollectorDriver::start_collector()
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
pthread_t id;
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
|
||||
pthread_create(&id, &attr, flush_thread, (void *)this);
|
||||
|
||||
pool->start_pool();
|
||||
|
||||
start();
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
pthread_cancel(id);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
extern "C" void * flush_thread(void *arg)
|
||||
{
|
||||
IMCollectorDriver * collectd = static_cast<IMCollectorDriver *>(arg);
|
||||
|
||||
collectd->flush_loop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void IMCollectorDriver::flush_loop()
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
sleep(_flush_period);
|
||||
|
||||
pool->flush_pool();
|
||||
}
|
||||
};
|
108
src/im_mad/collectd/OpenNebulaDriver.h
Normal file
108
src/im_mad/collectd/OpenNebulaDriver.h
Normal file
@ -0,0 +1,108 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
#ifndef _OPENNEBULA_DRIVER_H
|
||||
#define _OPENNEBULA_DRIVER_H
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
class OpenNebulaDriver
|
||||
{
|
||||
public:
|
||||
|
||||
OpenNebulaDriver(){};
|
||||
|
||||
virtual ~OpenNebulaDriver(){};
|
||||
|
||||
void start()
|
||||
{
|
||||
driver_loop();
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
void write2one(const char * buf, size_t bsize) const
|
||||
{
|
||||
write(1, buf, bsize);
|
||||
};
|
||||
|
||||
|
||||
void write2one(const std::string& buf) const
|
||||
{
|
||||
write2one(buf.c_str(), buf.size());
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Main driver loop. reads actions from OpenNebula core and deals with them
|
||||
*/
|
||||
void driver_loop();
|
||||
|
||||
/**
|
||||
* Read OpenNebula message
|
||||
* @param message from OpenNebula
|
||||
* @retuen 0 on success
|
||||
*/
|
||||
int read_one(std::string& message);
|
||||
|
||||
/**
|
||||
* Generic Driver Action
|
||||
*/
|
||||
virtual void driver_action(const std::string& action,
|
||||
std::istringstream &is) = 0;
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
extern "C" void * flush_thread(void *arg);
|
||||
|
||||
class ListenerPool;
|
||||
|
||||
class IMCollectorDriver: public OpenNebulaDriver
|
||||
{
|
||||
public:
|
||||
|
||||
IMCollectorDriver(std::string address, int port, int threads,
|
||||
int flush_period)
|
||||
:OpenNebulaDriver(),_address(address),_port(port),_threads(threads),
|
||||
_flush_period(flush_period){};
|
||||
|
||||
virtual ~IMCollectorDriver(){};
|
||||
|
||||
int init_collector();
|
||||
|
||||
void flush_loop();
|
||||
|
||||
void start_collector();
|
||||
|
||||
private:
|
||||
void driver_action(const std::string& action, std::istringstream &is){};
|
||||
|
||||
std::string _address;
|
||||
|
||||
int _port;
|
||||
|
||||
int _threads;
|
||||
|
||||
int _flush_period;
|
||||
|
||||
ListenerPool *pool;
|
||||
};
|
||||
|
||||
#endif
|
42
src/im_mad/collectd/SConstruct
Normal file
42
src/im_mad/collectd/SConstruct
Normal file
@ -0,0 +1,42 @@
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# Copyright 2010-2013, C12G Labs S.L #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
||||
# not use this file except in compliance with the License. You may obtain #
|
||||
# a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
||||
import os
|
||||
Import('env')
|
||||
|
||||
cwd=os.getcwd()
|
||||
|
||||
env.Append(LIBPATH=[
|
||||
cwd
|
||||
])
|
||||
|
||||
lib_name='im_collectd'
|
||||
|
||||
source_files=[
|
||||
'OpenNebulaDriver.cc',
|
||||
'ListenerThread.cc'
|
||||
]
|
||||
|
||||
# Build library
|
||||
env.StaticLibrary(lib_name, source_files)
|
||||
|
||||
# Build daemon
|
||||
env.Prepend(LIBS=[
|
||||
'im_collectd',
|
||||
'util'
|
||||
])
|
||||
|
||||
env.Program('collectd.cc')
|
92
src/im_mad/collectd/collectd.cc
Normal file
92
src/im_mad/collectd/collectd.cc
Normal file
@ -0,0 +1,92 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
#include "OpenNebulaDriver.h"
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
static const char * usage =
|
||||
"\n collectd [-h] [-a address] [-p port] [-t threads] [-f flush]\n\n"
|
||||
"SYNOPSIS\n"
|
||||
" Information Collector for OpenNebula. It should not be started directly\n\n"
|
||||
"OPTIONS\n"
|
||||
"\t-h\tprints this help.\n"
|
||||
"\t-a\tAddress to bind the collectd sockect\n"
|
||||
"\t-p\tUDP port to listen for monitor information\n"
|
||||
"\t-f\tInterval in seconds to flush collected information\n"
|
||||
"\t-t\tNumber of threads for the server\n";
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
std::string address = "0.0.0.0";
|
||||
int port = 4124;
|
||||
int threads = 50;
|
||||
int flush = 5;
|
||||
|
||||
std::istringstream iss;
|
||||
int opt;
|
||||
|
||||
while((opt = getopt(argc,argv,":ha:p:t:f:")) != -1)
|
||||
switch(opt)
|
||||
{
|
||||
case 'h':
|
||||
std::cout << usage;
|
||||
return 0;
|
||||
break;
|
||||
case 'a':
|
||||
address = optarg;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
iss.clear();
|
||||
iss.str(optarg);
|
||||
|
||||
iss >> port;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
iss.clear();
|
||||
iss.str(optarg);
|
||||
|
||||
iss >> threads;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
iss.clear();
|
||||
iss.str(optarg);
|
||||
|
||||
iss >> flush;
|
||||
break;
|
||||
|
||||
default:
|
||||
std::cerr << usage;
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
IMCollectorDriver collectd(address, port, threads, flush);
|
||||
|
||||
if ( collectd.init_collector() != 0 )
|
||||
{
|
||||
std::cerr << ". Could not init collectd, exiting...\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
collectd.start_collector();
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
# Max number of instances that can be launched into EC2
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
SMALL_INSTANCES=5
|
||||
LARGE_INSTANCES=
|
||||
EXTRALARGE_INSTANCES=
|
@ -1,76 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
||||
# not use this file except in compliance with the License. You may obtain #
|
||||
# a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
ONE_LOCATION=ENV["ONE_LOCATION"]
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION="/usr/lib/one/ruby"
|
||||
else
|
||||
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
|
||||
end
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
|
||||
require 'pp'
|
||||
require 'OpenNebulaDriver'
|
||||
require 'base64'
|
||||
|
||||
# The EC2 Information Manager Driver
|
||||
class EC2InformationManagerDriver < OpenNebulaDriver
|
||||
# Init the driver, and compute the predefined maximum capacity for this
|
||||
# EC2 cloud
|
||||
def initialize()
|
||||
super('',
|
||||
:concurrency => 1,
|
||||
:threaded => false
|
||||
)
|
||||
|
||||
register_action(:MONITOR, method("action_monitor"))
|
||||
|
||||
sinst = ENV["SMALL_INSTANCES"].to_i
|
||||
linst = ENV["LARGE_INSTANCES"].to_i
|
||||
xlinst = ENV["EXTRALARGE_INSTANCES"].to_i
|
||||
|
||||
smem = 1048576 * 1.7 * sinst
|
||||
scpu = 100 * sinst
|
||||
|
||||
lmem = 1048576 * 7.5 * linst
|
||||
lcpu = 400 * linst
|
||||
|
||||
xlmem = 1048576 * 15 * xlinst
|
||||
xlcpu = 800 * xlinst
|
||||
|
||||
totalmemory = smem + lmem + xlmem
|
||||
totalcpu = scpu + lcpu + xlcpu
|
||||
|
||||
@info="HYPERVISOR=ec2\nTOTALMEMORY=#{totalmemory}\n"<<
|
||||
"TOTALCPU=#{totalcpu}\nCPUSPEED=1000\nFREEMEMORY=#{totalmemory}"<<
|
||||
"\nFREECPU=#{totalcpu}\n"
|
||||
end
|
||||
|
||||
# The monitor action, just print the capacity info and hostname
|
||||
def action_monitor(num, host, not_used)
|
||||
info = "HOSTNAME=\"#{host}\"\n#{@info}"
|
||||
info64 = Base64::encode64(info).strip.delete("\n")
|
||||
send_message("MONITOR", RESULT[:success], num, info64)
|
||||
end
|
||||
end
|
||||
|
||||
# The EC2 Information Driver main program
|
||||
im = EC2InformationManagerDriver.new
|
||||
im.start_driver
|
@ -49,6 +49,14 @@ class InformationManagerDriver < OpenNebulaDriver
|
||||
|
||||
# register actions
|
||||
register_action(:MONITOR, method("action_monitor"))
|
||||
|
||||
# collectd port
|
||||
@collectd_port = 4124
|
||||
begin
|
||||
im_collectd = @config["IM_MAD"].select{|e| e.match(/collectd/)}[0]
|
||||
@collectd_port = im_collectd.match(/-p (\d+)/)[1]
|
||||
rescue
|
||||
end
|
||||
end
|
||||
|
||||
# Execute the run_probes in the remote host
|
||||
@ -73,8 +81,8 @@ class InformationManagerDriver < OpenNebulaDriver
|
||||
end
|
||||
end
|
||||
|
||||
do_action("#{@hypervisor}", number, host, :MONITOR,
|
||||
:script_name => 'run_probes', :base64 => true)
|
||||
do_action("#{@hypervisor} #{number} #{@collectd_port}", number, host,
|
||||
:MONITOR, :script_name => 'run_probes', :base64 => true)
|
||||
end
|
||||
end
|
||||
|
||||
|
135
src/im_mad/remotes/common.d/collectd-client.rb
Normal file
135
src/im_mad/remotes/common.d/collectd-client.rb
Normal file
@ -0,0 +1,135 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
||||
# not use this file except in compliance with the License. You may obtain #
|
||||
# a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
require 'socket'
|
||||
require 'base64'
|
||||
|
||||
DIRNAME = File.dirname(__FILE__)
|
||||
REMOTE_DIR_UPDATE = File.join(DIRNAME, '../../.update')
|
||||
|
||||
CYCLE = 20
|
||||
TOTAL_HOSTS = 1000
|
||||
|
||||
SLEEP = 1
|
||||
|
||||
class CollectdClient
|
||||
def initialize(hypervisor, number, host, port)
|
||||
# Arguments
|
||||
@hypervisor = hypervisor
|
||||
@number = number.to_i
|
||||
@host = host
|
||||
@port = port
|
||||
|
||||
# Monitorization slot
|
||||
hosts_per_cycle = TOTAL_HOSTS / CYCLE
|
||||
@my_slot = (@number % TOTAL_HOSTS) / hosts_per_cycle
|
||||
|
||||
# Probes
|
||||
run_probes_cmd = File.join(DIRNAME, '..', "run_probes")
|
||||
@run_probes_cmd = "#{run_probes_cmd} #{@hypervisor}-probes"
|
||||
|
||||
# Get last update
|
||||
@last_update = get_last_update
|
||||
|
||||
# Socket
|
||||
@s = UDPSocket.new
|
||||
end
|
||||
|
||||
def run_probes
|
||||
data = `#{@run_probes_cmd}`
|
||||
data64 = Base64::encode64(data).strip.delete("\n")
|
||||
|
||||
return data64
|
||||
end
|
||||
|
||||
def send(data)
|
||||
@s.send("MONITOR SUCCESS #{@number} #{data}\n", 0, @host, @port)
|
||||
end
|
||||
|
||||
def do_send?(current, last_send)
|
||||
current_cycle = current[0]
|
||||
current_slot = current[1]
|
||||
|
||||
last_cycle = last_send[0]
|
||||
last_slot = last_send[1]
|
||||
|
||||
if last_slot < @my_slot
|
||||
min_cycle = last_cycle
|
||||
else
|
||||
min_cycle = last_cycle + 1
|
||||
end
|
||||
|
||||
if current_cycle > min_cycle
|
||||
return true
|
||||
elsif current_cycle < min_cycle
|
||||
return false
|
||||
else
|
||||
return current_slot >= @my_slot
|
||||
end
|
||||
end
|
||||
|
||||
def monitor
|
||||
initial = true
|
||||
data = run_probes
|
||||
|
||||
last_send = nil
|
||||
|
||||
loop do
|
||||
# Stop the execution if we receive the update signal
|
||||
exit 0 if stop?
|
||||
|
||||
t = Time.now.to_i
|
||||
|
||||
current_cycle = t / CYCLE
|
||||
current_slot = t % CYCLE
|
||||
|
||||
current = [current_cycle, current_slot]
|
||||
|
||||
if initial
|
||||
last_send = current
|
||||
initial = false
|
||||
end
|
||||
|
||||
if do_send?(current, last_send)
|
||||
send data
|
||||
last_send = current
|
||||
|
||||
data = run_probes
|
||||
end
|
||||
|
||||
sleep SLEEP
|
||||
end
|
||||
end
|
||||
|
||||
def get_last_update
|
||||
File.stat(REMOTE_DIR_UPDATE).mtime.to_i rescue 0
|
||||
end
|
||||
|
||||
def stop?
|
||||
get_last_update.to_i != @last_update.to_i
|
||||
end
|
||||
end
|
||||
|
||||
hypervisor = ARGV[0]
|
||||
number = ARGV[1]
|
||||
port = ARGV[2]
|
||||
|
||||
host = ENV['SSH_CLIENT'].split.first
|
||||
|
||||
client = CollectdClient.new(hypervisor, number, host, port)
|
||||
client.monitor
|
65
src/vmm_mad/ec2/vmm_ec2rc → src/im_mad/remotes/common.d/collectd-client_control.sh
Normal file → Executable file
65
src/vmm_mad/ec2/vmm_ec2rc → src/im_mad/remotes/common.d/collectd-client_control.sh
Normal file → Executable file
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs #
|
||||
# #
|
||||
@ -14,22 +16,53 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
#May be needed in some setups
|
||||
#CLASSPATH=""
|
||||
ARGV=$*
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# EC2 API TOOLS Configuration.
|
||||
#----------------------------------------------------------------------------
|
||||
#EC2_HOME="<path_to_ec2_utils>"
|
||||
#EC2_PRIVATE_KEY="<path_to_your_ec2_pem_key>"
|
||||
#EC2_CERT="<path_to_your_ec2_pem_cert>"
|
||||
# Directory that contains this file
|
||||
DIR=$(pwd)
|
||||
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
# Driver configuration
|
||||
#----------------------------------------------------------------------------
|
||||
# Arguments for the JAVA Virtual Machine
|
||||
EC2_JVM_ARGS="-Xms16m -Xmx64m"
|
||||
# Basename
|
||||
BASENAME=$(basename $0 _control.sh)
|
||||
|
||||
# Number of concurrent EC2 operations (not instances)
|
||||
EC2_JVM_CONCURRENCY=10
|
||||
# Collectd client (Ruby)
|
||||
CLIENT=$DIR/${BASENAME}.rb
|
||||
|
||||
# Collectd client PID
|
||||
CLIENT_PID_FILE=/tmp/one-collectd-client.pid
|
||||
|
||||
# Launch the client
|
||||
function start_client() {
|
||||
/usr/bin/env ruby $CLIENT $ARGV &
|
||||
}
|
||||
|
||||
# Write the PID
|
||||
function write_pid() {
|
||||
echo $1 > $CLIENT_PID_FILE
|
||||
}
|
||||
|
||||
# Check if running process
|
||||
function check_running() {
|
||||
# Assume the process is not running if there is no pid file
|
||||
test ! -f $CLIENT_PID_FILE && return 1
|
||||
|
||||
PID=$(cat $CLIENT_PID_FILE)
|
||||
|
||||
if ps --no-headers -o command $PID 2>/dev/null | grep -q $BASENAME; then
|
||||
return 0
|
||||
else
|
||||
# Stale PID file
|
||||
rm -f $CLIENT_PID_FILE
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if ! check_running; then
|
||||
start_client
|
||||
write_pid $!
|
||||
fi
|
||||
|
||||
# This script returns the run_probes execution
|
||||
HYPERVISOR=$1
|
||||
set $HYPERVISOR-probes $@
|
||||
|
||||
$DIR/../run_probes $@
|
27
src/im_mad/remotes/ec2.d/poll
Executable file
27
src/im_mad/remotes/ec2.d/poll
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2010-2013, C12G Labs S.L #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
||||
# not use this file except in compliance with the License. You may obtain #
|
||||
# a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
$: << File.join(File.dirname(__FILE__), '../../vmm/ec2')
|
||||
|
||||
require 'ec2_driver'
|
||||
|
||||
host = ARGV[2]
|
||||
ec2_drv = EC2Driver.new(host)
|
||||
|
||||
ec2_drv.monitor_all_vms
|
||||
|
1
src/im_mad/remotes/kvm.d/collectd-client.rb
Symbolic link
1
src/im_mad/remotes/kvm.d/collectd-client.rb
Symbolic link
@ -0,0 +1 @@
|
||||
../common.d/collectd-client.rb
|
1
src/im_mad/remotes/kvm.d/collectd-client_control.sh
Symbolic link
1
src/im_mad/remotes/kvm.d/collectd-client_control.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../common.d/collectd-client_control.sh
|
1
src/im_mad/remotes/xen.d/collectd-client.rb
Symbolic link
1
src/im_mad/remotes/xen.d/collectd-client.rb
Symbolic link
@ -0,0 +1 @@
|
||||
../common.d/collectd-client.rb
|
1
src/im_mad/remotes/xen.d/collectd-client_control.sh
Symbolic link
1
src/im_mad/remotes/xen.d/collectd-client_control.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../common.d/collectd-client_control.sh
|
@ -1346,12 +1346,21 @@ void LifeCycleManager::attach_failure_action(int vid)
|
||||
|
||||
tmpl.set(disk);
|
||||
|
||||
Quotas::quota_del(Quotas::IMAGE, uid, gid, &tmpl);
|
||||
|
||||
if ( disk->vector_value("IMAGE_ID", image_id) == 0 )
|
||||
{
|
||||
// Disk using an Image
|
||||
Quotas::quota_del(Quotas::IMAGE, uid, gid, &tmpl);
|
||||
|
||||
imagem->release_image(oid, image_id, false);
|
||||
}
|
||||
else // Volatile disk
|
||||
{
|
||||
// It is an update of the volatile counter without
|
||||
// shutting destroying a VM
|
||||
tmpl.add("VMS", 0);
|
||||
|
||||
Quotas::quota_del(Quotas::VM, uid, gid, &tmpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -15,7 +15,7 @@
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# This module provides an abstraction to generate an execution context for
|
||||
# OpenNebula Drivers. The module has been designed to be included as part
|
||||
# OpenNebula Drivers. The module has been designed to be included as part
|
||||
# of a driver and not to be used standalone.
|
||||
module DriverExecHelper
|
||||
# Action result strings for messages
|
||||
@ -27,7 +27,7 @@ module DriverExecHelper
|
||||
def self.failed?(rc_str)
|
||||
return rc_str == RESULT[:failure]
|
||||
end
|
||||
|
||||
|
||||
#Initialize module variables
|
||||
def initialize_helper(directory, options)
|
||||
@config = read_configuration
|
||||
@ -51,7 +51,7 @@ module DriverExecHelper
|
||||
|
||||
#
|
||||
# METHODS FOR COMMAND LINE & ACTION PATHS
|
||||
#
|
||||
#
|
||||
# Given the action name and the parameter returns full path of the script
|
||||
# and appends its parameters. It uses @local_actions hash to know if the
|
||||
# actions is remote or local. If the local actions has defined an special
|
||||
@ -96,7 +96,7 @@ module DriverExecHelper
|
||||
|
||||
#
|
||||
# METHODS FOR LOGS & COMMAND OUTPUT
|
||||
#
|
||||
#
|
||||
# Sends a message to the OpenNebula core through stdout
|
||||
def send_message(action="-", result=RESULT[:failure], id="-", info="-")
|
||||
@send_mutex.synchronize {
|
||||
@ -151,7 +151,7 @@ module DriverExecHelper
|
||||
}
|
||||
end
|
||||
|
||||
#This method returns the result in terms
|
||||
#This method returns the result in terms
|
||||
def get_info_from_execution(command_exe)
|
||||
if command_exe.code == 0
|
||||
result = RESULT[:success]
|
||||
@ -165,10 +165,10 @@ module DriverExecHelper
|
||||
|
||||
[result, info]
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
# Simple parser for the config file generated by OpenNebula
|
||||
#
|
||||
# Simple parser for the config file generated by OpenNebula
|
||||
def read_configuration
|
||||
one_config=nil
|
||||
|
||||
@ -192,7 +192,16 @@ module DriverExecHelper
|
||||
if m
|
||||
name=m[1].strip.upcase
|
||||
value=m[2].strip
|
||||
config[name]=value
|
||||
|
||||
if config[name]
|
||||
if config[name].instance_of? Array
|
||||
config[name] << value
|
||||
else
|
||||
config[name] = [config[name], value]
|
||||
end
|
||||
else
|
||||
config[name]=value
|
||||
end
|
||||
end
|
||||
end
|
||||
rescue Exception => e
|
||||
|
@ -128,7 +128,7 @@ int SystemDB::check_db_version()
|
||||
oss << "SELECT version FROM " << ver_table
|
||||
<< " WHERE oid=(SELECT MAX(oid) FROM " << ver_table << ")";
|
||||
|
||||
db->exec(oss, this);
|
||||
db->exec(oss, this, true);
|
||||
|
||||
oss.str("");
|
||||
unset_callback();
|
||||
@ -138,7 +138,7 @@ int SystemDB::check_db_version()
|
||||
// Table user_pool is present for all OpenNebula versions, and it
|
||||
// always contains at least the oneadmin user.
|
||||
oss << "SELECT MAX(oid) FROM user_pool";
|
||||
rc = db->exec(oss);
|
||||
rc = db->exec(oss, 0, true);
|
||||
|
||||
oss.str("");
|
||||
|
||||
@ -268,7 +268,15 @@ int SystemDB::select_sys_attribute(const string& attr_name, string& attr_xml)
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void Nebula::start()
|
||||
void Nebula::bootstrap_db()
|
||||
{
|
||||
start(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void Nebula::start(bool bootstrap_only)
|
||||
{
|
||||
int rc;
|
||||
int fd;
|
||||
@ -376,7 +384,7 @@ void Nebula::start()
|
||||
xmlInitParser();
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Pools
|
||||
// Database
|
||||
// -----------------------------------------------------------
|
||||
try
|
||||
{
|
||||
@ -510,6 +518,19 @@ void Nebula::start()
|
||||
throw;
|
||||
}
|
||||
|
||||
if (bootstrap_only)
|
||||
{
|
||||
//XML Library
|
||||
xmlCleanupParser();
|
||||
|
||||
NebulaLog::log("ONE", Log::INFO, "Database bootstrap finalized, exiting.\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Pools
|
||||
// -----------------------------------------------------------
|
||||
try
|
||||
{
|
||||
int size;
|
||||
|
@ -32,9 +32,10 @@ static const char * usage =
|
||||
"SYNOPSIS\n"
|
||||
" Starts the OpenNebula daemon\n\n"
|
||||
"OPTIONS\n"
|
||||
"\t-h\tprints this help.\n"
|
||||
"\t-v\tprints OpenNebula version and license\n"
|
||||
"\t-f\tforeground, do not fork the oned daemon\n";
|
||||
"\t-h\tprints this help.\n"
|
||||
"\t-f\tforeground, do not fork the oned daemon\n"
|
||||
"\t-i\tinitialize the dabase and exit.\n";
|
||||
|
||||
static const char * susage =
|
||||
"usage: oned [-h] [-v] [-f]\n";
|
||||
@ -50,6 +51,24 @@ static void print_license()
|
||||
<< "(http://www.apache.org/licenses/LICENSE-2.0).\n";
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
static void oned_init()
|
||||
{
|
||||
try
|
||||
{
|
||||
Nebula& nd = Nebula::instance();
|
||||
nd.bootstrap_db();
|
||||
}
|
||||
catch (exception &e)
|
||||
{
|
||||
cerr << e.what() << endl;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
@ -58,19 +77,19 @@ static void oned_main()
|
||||
try
|
||||
{
|
||||
Nebula& nd = Nebula::instance();
|
||||
nd.start();
|
||||
nd.start();
|
||||
}
|
||||
catch (exception &e)
|
||||
{
|
||||
cerr << e.what() << endl;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int opt;
|
||||
@ -80,8 +99,8 @@ int main(int argc, char **argv)
|
||||
pid_t pid,sid;
|
||||
string wd;
|
||||
int rc;
|
||||
|
||||
while((opt = getopt(argc,argv,"vhf")) != -1)
|
||||
|
||||
while((opt = getopt(argc,argv,"vhif")) != -1)
|
||||
switch(opt)
|
||||
{
|
||||
case 'v':
|
||||
@ -92,9 +111,13 @@ int main(int argc, char **argv)
|
||||
cout << usage;
|
||||
exit(0);
|
||||
break;
|
||||
case 'i':
|
||||
oned_init();
|
||||
exit(0);
|
||||
break;
|
||||
case 'f':
|
||||
foreground = true;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
cerr << susage;
|
||||
exit(-1);
|
||||
@ -102,24 +125,24 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
// ---------------------------------
|
||||
// Check if other oned is running
|
||||
// ---------------------------------
|
||||
|
||||
// Check if other oned is running
|
||||
// ---------------------------------
|
||||
|
||||
string lockfile;
|
||||
string var_location;
|
||||
|
||||
|
||||
nl = getenv("ONE_LOCATION");
|
||||
|
||||
if (nl == 0) // OpenNebula in root of FSH
|
||||
{
|
||||
var_location = "/var/lib/one/";
|
||||
var_location = "/var/lib/one/";
|
||||
lockfile = "/var/lock/one/one";
|
||||
}
|
||||
else
|
||||
{
|
||||
var_location = nl;
|
||||
var_location += "/var/";
|
||||
|
||||
|
||||
lockfile = var_location + ".lock";
|
||||
}
|
||||
|
||||
@ -127,70 +150,70 @@ int main(int argc, char **argv)
|
||||
|
||||
if( fd == -1)
|
||||
{
|
||||
cerr<< "Error: Cannot start oned, opening lock file " << lockfile
|
||||
cerr<< "Error: Cannot start oned, opening lock file " << lockfile
|
||||
<< endl;
|
||||
|
||||
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
// ----------------------------
|
||||
// Fork & exit main process
|
||||
// ----------------------------
|
||||
|
||||
|
||||
// ----------------------------
|
||||
// Fork & exit main process
|
||||
// ----------------------------
|
||||
|
||||
if (foreground == true)
|
||||
{
|
||||
pid = 0; //Do not fork
|
||||
}
|
||||
else
|
||||
{
|
||||
pid = fork();
|
||||
pid = fork();
|
||||
}
|
||||
|
||||
|
||||
|
||||
switch (pid){
|
||||
case -1: // Error
|
||||
cerr << "Error: Unable to fork.\n";
|
||||
cerr << "Error: Unable to fork.\n";
|
||||
exit(-1);
|
||||
|
||||
|
||||
|
||||
case 0: // Child process
|
||||
|
||||
|
||||
rc = chdir(var_location.c_str());
|
||||
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
goto error_chdir;
|
||||
}
|
||||
|
||||
|
||||
if (foreground == false)
|
||||
{
|
||||
{
|
||||
sid = setsid();
|
||||
|
||||
|
||||
if (sid == -1)
|
||||
{
|
||||
goto error_sid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
oned_main();
|
||||
|
||||
unlink(lockfile.c_str());
|
||||
|
||||
unlink(lockfile.c_str());
|
||||
break;
|
||||
|
||||
default: // Parent process
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
error_chdir:
|
||||
cerr << "Error: cannot change to dir " << wd << "\n";
|
||||
unlink(lockfile.c_str());
|
||||
exit(-1);
|
||||
|
||||
error_sid:
|
||||
error_sid:
|
||||
cerr << "Error: creating new session\n";
|
||||
unlink(lockfile.c_str());
|
||||
exit(-1);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user