mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-17 02:03:15 +09:00
Merge branch 'one-4.4' into feature-2345
This commit is contained in:
commit
1adce277a0
144 files changed
+2686
-2853
No files matched your search
+6
-1
@@ -146,9 +146,14 @@ public:
|
||||
* attributes
|
||||
*
|
||||
* @param disk
|
||||
* @param inherit_attrs Attributes to be inherited from the DS template
|
||||
* into the disk
|
||||
* @return 0 on success
|
||||
*/
|
||||
int disk_attribute(VectorAttribute * disk);
|
||||
int disk_attribute(
|
||||
VectorAttribute * disk,
|
||||
const vector<string>& inherit_attrs);
|
||||
|
||||
|
||||
/**
|
||||
* Replace template for this object. Object should be updated
|
||||
|
||||
+6
-3
@@ -467,12 +467,15 @@ public:
|
||||
* @param img_type will be set to the used image's type
|
||||
* @param dev_prefix will be set to the defined dev_prefix,
|
||||
* or the default one
|
||||
* @param inherit_attrs Attributes to be inherited from the image template
|
||||
* into the disk
|
||||
*
|
||||
* @return 0 on success, -1 otherwise
|
||||
*/
|
||||
int disk_attribute( VectorAttribute * disk,
|
||||
ImageType& img_type,
|
||||
string& dev_prefix);
|
||||
int disk_attribute( VectorAttribute * disk,
|
||||
ImageType& img_type,
|
||||
string& dev_prefix,
|
||||
const vector<string>& inherit_attrs);
|
||||
|
||||
/**
|
||||
* Factory method for image templates
|
||||
|
||||
+19
-6
@@ -39,12 +39,15 @@ class ImagePool : public PoolSQL
|
||||
{
|
||||
public:
|
||||
|
||||
ImagePool(SqlDB * db,
|
||||
const string& _default_type,
|
||||
const string& _default_dev_prefix,
|
||||
vector<const Attribute *>& restricted_attrs,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location);
|
||||
ImagePool(
|
||||
SqlDB * db,
|
||||
const string& __default_type,
|
||||
const string& __default_dev_prefix,
|
||||
vector<const Attribute *>& restricted_attrs,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location,
|
||||
const vector<const Attribute *>& _inherit_image_attrs,
|
||||
const vector<const Attribute *>& _inherit_datastore_attrs);
|
||||
|
||||
~ImagePool(){};
|
||||
|
||||
@@ -212,6 +215,16 @@ private:
|
||||
**/
|
||||
static string _default_dev_prefix;
|
||||
|
||||
/**
|
||||
* Image attributes to be inherited into the VM disk
|
||||
*/
|
||||
vector<string> inherit_image_attrs;
|
||||
|
||||
/**
|
||||
* Datastore attributes to be inherited into the VM disk
|
||||
*/
|
||||
vector<string> inherit_datastore_attrs;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Pool Attributes
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
+2
-2
@@ -357,12 +357,12 @@ public:
|
||||
*/
|
||||
static string version()
|
||||
{
|
||||
return "OpenNebula 4.3.80";
|
||||
return "OpenNebula 4.3.85";
|
||||
};
|
||||
|
||||
static string db_version()
|
||||
{
|
||||
return "4.3.80";
|
||||
return "4.3.85";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define _NEBULA_UTIL_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace one_util
|
||||
{
|
||||
@@ -66,6 +67,23 @@ namespace one_util
|
||||
* @return a new random password
|
||||
*/
|
||||
std::string random_password();
|
||||
|
||||
/**
|
||||
* Splits a string, using the given delimiter
|
||||
*
|
||||
* @param st string to split
|
||||
* @param delim delimiter character
|
||||
* @param clean_empty true to clean empty split parts.
|
||||
* Example for st "a::b:c"
|
||||
* clean_empty true will return ["a", "b", "c"]
|
||||
* clean_empty fase will return ["a", "", "b", "c"]
|
||||
*
|
||||
* @return a vector containing the resulting substrings
|
||||
*/
|
||||
std::vector<std::string> split(
|
||||
const std::string& st,
|
||||
char delim,
|
||||
bool clean_empty=true);
|
||||
};
|
||||
|
||||
#endif /* _NEBULA_UTIL_H_ */
|
||||
@@ -201,9 +201,14 @@ public:
|
||||
* * BRIDGE: for this virtual network
|
||||
* @param nic attribute for the VM template
|
||||
* @param vid of the VM getting the lease
|
||||
* @param inherit_attrs Attributes to be inherited from the vnet template
|
||||
* into the nic
|
||||
* @return 0 on success
|
||||
*/
|
||||
int nic_attribute(VectorAttribute * nic, int vid);
|
||||
int nic_attribute(
|
||||
VectorAttribute * nic,
|
||||
int vid,
|
||||
const vector<string>& inherit_attrs);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -33,11 +33,12 @@ class VirtualNetworkPool : public PoolSQL
|
||||
{
|
||||
public:
|
||||
|
||||
VirtualNetworkPool(SqlDB * db,
|
||||
const string& str_mac_prefix,
|
||||
int default_size,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location);
|
||||
VirtualNetworkPool(SqlDB * db,
|
||||
const string& str_mac_prefix,
|
||||
int default_size,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location,
|
||||
const vector<const Attribute *>& _inherit_attrs);
|
||||
|
||||
~VirtualNetworkPool(){};
|
||||
|
||||
@@ -174,6 +175,11 @@ private:
|
||||
*/
|
||||
static unsigned int _default_size;
|
||||
|
||||
/**
|
||||
* VNet attributes to be injected into the VM nic
|
||||
*/
|
||||
vector<string> inherit_attrs;
|
||||
|
||||
/**
|
||||
* Factory method to produce VN objects
|
||||
* @return a pointer to the new VN
|
||||
|
||||
+12
-42
@@ -224,7 +224,6 @@ else
|
||||
fi
|
||||
|
||||
SHARE_DIRS="$SHARE_LOCATION/examples \
|
||||
$SHARE_LOCATION/tgt \
|
||||
$SHARE_LOCATION/websockify"
|
||||
|
||||
ETC_DIRS="$ETC_LOCATION/vmm_exec \
|
||||
@@ -284,11 +283,10 @@ VAR_DIRS="$VAR_LOCATION/remotes \
|
||||
$VAR_LOCATION/remotes/tm/ \
|
||||
$VAR_LOCATION/remotes/tm/dummy \
|
||||
$VAR_LOCATION/remotes/tm/shared \
|
||||
$VAR_LOCATION/remotes/tm/shared_lvm \
|
||||
$VAR_LOCATION/remotes/tm/fs_lvm \
|
||||
$VAR_LOCATION/remotes/tm/qcow2 \
|
||||
$VAR_LOCATION/remotes/tm/ssh \
|
||||
$VAR_LOCATION/remotes/tm/vmfs \
|
||||
$VAR_LOCATION/remotes/tm/iscsi \
|
||||
$VAR_LOCATION/remotes/tm/lvm \
|
||||
$VAR_LOCATION/remotes/tm/ceph \
|
||||
$VAR_LOCATION/remotes/hooks \
|
||||
@@ -297,7 +295,6 @@ VAR_DIRS="$VAR_LOCATION/remotes \
|
||||
$VAR_LOCATION/remotes/datastore/dummy \
|
||||
$VAR_LOCATION/remotes/datastore/fs \
|
||||
$VAR_LOCATION/remotes/datastore/vmfs \
|
||||
$VAR_LOCATION/remotes/datastore/iscsi \
|
||||
$VAR_LOCATION/remotes/datastore/lvm \
|
||||
$VAR_LOCATION/remotes/datastore/ceph \
|
||||
$VAR_LOCATION/remotes/auth \
|
||||
@@ -470,11 +467,10 @@ INSTALL_FILES=(
|
||||
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
|
||||
TM_FS_LVM_FILES:$VAR_LOCATION/remotes/tm/fs_lvm
|
||||
TM_QCOW2_FILES:$VAR_LOCATION/remotes/tm/qcow2
|
||||
TM_SSH_FILES:$VAR_LOCATION/remotes/tm/ssh
|
||||
TM_VMFS_FILES:$VAR_LOCATION/remotes/tm/vmfs
|
||||
TM_ISCSI_FILES:$VAR_LOCATION/remotes/tm/iscsi
|
||||
TM_LVM_FILES:$VAR_LOCATION/remotes/tm/lvm
|
||||
TM_CEPH_FILES:$VAR_LOCATION/remotes/tm/ceph
|
||||
TM_DUMMY_FILES:$VAR_LOCATION/remotes/tm/dummy
|
||||
@@ -482,7 +478,6 @@ INSTALL_FILES=(
|
||||
DATASTORE_DRIVER_DUMMY_SCRIPTS:$VAR_LOCATION/remotes/datastore/dummy
|
||||
DATASTORE_DRIVER_FS_SCRIPTS:$VAR_LOCATION/remotes/datastore/fs
|
||||
DATASTORE_DRIVER_VMFS_SCRIPTS:$VAR_LOCATION/remotes/datastore/vmfs
|
||||
DATASTORE_DRIVER_ISCSI_SCRIPTS:$VAR_LOCATION/remotes/datastore/iscsi
|
||||
DATASTORE_DRIVER_LVM_SCRIPTS:$VAR_LOCATION/remotes/datastore/lvm
|
||||
DATASTORE_DRIVER_CEPH_SCRIPTS:$VAR_LOCATION/remotes/datastore/ceph
|
||||
NETWORK_FILES:$VAR_LOCATION/remotes/vnm
|
||||
@@ -494,7 +489,6 @@ INSTALL_FILES=(
|
||||
NETWORK_OVSWITCH_BRCOMPAT_FILES:$VAR_LOCATION/remotes/vnm/ovswitch_brcompat
|
||||
NETWORK_VMWARE_FILES:$VAR_LOCATION/remotes/vnm/vmware
|
||||
EXAMPLE_SHARE_FILES:$SHARE_LOCATION/examples
|
||||
TGT_SHARE_FILES:$SHARE_LOCATION/tgt
|
||||
WEBSOCKIFY_SHARE_FILES:$SHARE_LOCATION/websockify
|
||||
INSTALL_GEMS_SHARE_FILE:$SHARE_LOCATION
|
||||
HOOK_FT_FILES:$VAR_LOCATION/remotes/hooks/ft
|
||||
@@ -979,12 +973,11 @@ NETWORK_VMWARE_FILES="src/vnm_mad/remotes/vmware/clean \
|
||||
#-------------------------------------------------------------------------------
|
||||
# Transfer Manager commands, to be installed under $LIB_LOCATION/tm_commands
|
||||
# - SHARED TM, $VAR_LOCATION/tm/shared
|
||||
# - SHARED_LVM TM, $VAR_LOCATION/tm/shared_lvm
|
||||
# - FS_LVM TM, $VAR_LOCATION/tm/fs_lvm
|
||||
# - QCOW2 TM, $VAR_LOCATION/tm/qcow2
|
||||
# - SSH TM, $VAR_LOCATION/tm/ssh
|
||||
# - DUMMY TM, $VAR_LOCATION/tm/dummy
|
||||
# - VMWARE TM, $VAR_LOCATION/tm/vmware
|
||||
# - ISCSI TM, $VAR_LOCATION/tm/iscsi
|
||||
# - LVM TM, $VAR_LOCATION/tm/lvm
|
||||
# - CEPH TM, $VAR_LOCATION/tm/ceph
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -1003,14 +996,14 @@ TM_SHARED_FILES="src/tm_mad/shared/clone \
|
||||
src/tm_mad/shared/mvds \
|
||||
src/tm_mad/shared/cpds"
|
||||
|
||||
TM_SHARED_LVM_FILES="src/tm_mad/shared_lvm/clone \
|
||||
src/tm_mad/shared_lvm/ln \
|
||||
src/tm_mad/shared_lvm/mv \
|
||||
src/tm_mad/shared_lvm/mvds \
|
||||
src/tm_mad/shared_lvm/cpds \
|
||||
src/tm_mad/shared_lvm/premigrate \
|
||||
src/tm_mad/shared_lvm/postmigrate \
|
||||
src/tm_mad/shared_lvm/delete"
|
||||
TM_FS_LVM_FILES="src/tm_mad/fs_lvm/clone \
|
||||
src/tm_mad/fs_lvm/ln \
|
||||
src/tm_mad/fs_lvm/mv \
|
||||
src/tm_mad/fs_lvm/mvds \
|
||||
src/tm_mad/fs_lvm/cpds \
|
||||
src/tm_mad/fs_lvm/premigrate \
|
||||
src/tm_mad/fs_lvm/postmigrate \
|
||||
src/tm_mad/fs_lvm/delete"
|
||||
|
||||
TM_QCOW2_FILES="src/tm_mad/qcow2/clone \
|
||||
src/tm_mad/qcow2/delete \
|
||||
@@ -1060,15 +1053,6 @@ TM_VMFS_FILES="src/tm_mad/vmfs/clone \
|
||||
src/tm_mad/vmfs/postmigrate \
|
||||
src/tm_mad/vmfs/premigrate"
|
||||
|
||||
TM_ISCSI_FILES="src/tm_mad/iscsi/clone \
|
||||
src/tm_mad/iscsi/ln \
|
||||
src/tm_mad/iscsi/mv \
|
||||
src/tm_mad/iscsi/mvds \
|
||||
src/tm_mad/iscsi/cpds \
|
||||
src/tm_mad/iscsi/premigrate \
|
||||
src/tm_mad/iscsi/postmigrate \
|
||||
src/tm_mad/iscsi/delete"
|
||||
|
||||
TM_LVM_FILES="src/tm_mad/lvm/clone \
|
||||
src/tm_mad/lvm/ln \
|
||||
src/tm_mad/lvm/mv \
|
||||
@@ -1092,7 +1076,6 @@ TM_CEPH_FILES="src/tm_mad/ceph/clone \
|
||||
# - Dummy Image Repository, $REMOTES_LOCATION/datastore/dummy
|
||||
# - FS based Image Repository, $REMOTES_LOCATION/datastore/fs
|
||||
# - VMFS based Image Repository, $REMOTES_LOCATION/datastore/vmfs
|
||||
# - iSCSI based Image Repository, $REMOTES_LOCATION/datastore/iscsi
|
||||
# - LVM based Image Repository, $REMOTES_LOCATION/datastore/lvm
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
@@ -1122,14 +1105,6 @@ DATASTORE_DRIVER_VMFS_SCRIPTS="src/datastore_mad/remotes/vmfs/cp \
|
||||
src/datastore_mad/remotes/vmfs/rm \
|
||||
src/datastore_mad/remotes/vmfs/vmfs.conf"
|
||||
|
||||
DATASTORE_DRIVER_ISCSI_SCRIPTS="src/datastore_mad/remotes/iscsi/cp \
|
||||
src/datastore_mad/remotes/iscsi/mkfs \
|
||||
src/datastore_mad/remotes/iscsi/stat \
|
||||
src/datastore_mad/remotes/iscsi/rm \
|
||||
src/datastore_mad/remotes/iscsi/clone \
|
||||
src/datastore_mad/remotes/iscsi/monitor \
|
||||
src/datastore_mad/remotes/iscsi/iscsi.conf"
|
||||
|
||||
DATASTORE_DRIVER_LVM_SCRIPTS="src/datastore_mad/remotes/lvm/cp \
|
||||
src/datastore_mad/remotes/lvm/mkfs \
|
||||
src/datastore_mad/remotes/lvm/stat \
|
||||
@@ -1177,6 +1152,7 @@ ONEDB_MIGRATOR_FILES="src/onedb/2.0_to_2.9.80.rb \
|
||||
src/onedb/4.0.1_to_4.1.80.rb \
|
||||
src/onedb/4.1.80_to_4.2.0.rb \
|
||||
src/onedb/4.2.0_to_4.3.80.rb \
|
||||
src/onedb/4.3.80_to_4.3.85.rb \
|
||||
src/onedb/fsck.rb \
|
||||
src/onedb/onedb.rb \
|
||||
src/onedb/onedb_backend.rb"
|
||||
@@ -1229,12 +1205,6 @@ EXAMPLE_SHARE_FILES="share/examples/vm.template \
|
||||
share/examples/private.net \
|
||||
share/examples/public.net"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# File required to interact with a tgtd server
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
TGT_SHARE_FILES="share/scripts/tgt/tgt-setup-lun-one"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Files required to interact with the websockify server
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
@@ -369,7 +369,7 @@ VM_MAD = [ name="dummy", executable="one_vmm_dummy", type="xml" ]
|
||||
|
||||
TM_MAD = [
|
||||
executable = "one_tm",
|
||||
arguments = "-t 15 -d dummy,lvm,shared,shared_lvm,qcow2,ssh,vmfs,iscsi,ceph"
|
||||
arguments = "-t 15 -d dummy,lvm,shared,shared_lvm,qcow2,ssh,vmfs,ceph"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
@@ -421,13 +421,6 @@ TM_MAD_CONF = [
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "iscsi",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SELF",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "ceph",
|
||||
ln_target = "NONE",
|
||||
@@ -450,7 +443,7 @@ TM_MAD_CONF = [
|
||||
|
||||
DATASTORE_MAD = [
|
||||
executable = "one_datastore",
|
||||
arguments = "-t 15 -d dummy,fs,vmfs,iscsi,lvm,ceph"
|
||||
arguments = "-t 15 -d dummy,fs,vmfs,lvm,ceph"
|
||||
]
|
||||
|
||||
#*******************************************************************************
|
||||
|
||||
+28
-10
@@ -390,7 +390,7 @@ VM_MAD = [
|
||||
|
||||
TM_MAD = [
|
||||
executable = "one_tm",
|
||||
arguments = "-t 15 -d dummy,lvm,shared,shared_lvm,qcow2,ssh,vmfs,iscsi,ceph"
|
||||
arguments = "-t 15 -d dummy,lvm,shared,fs_lvm,qcow2,ssh,vmfs,ceph"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
@@ -415,7 +415,7 @@ TM_MAD_CONF = [
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "shared_lvm",
|
||||
name = "fs_lvm",
|
||||
ln_target = "SYSTEM",
|
||||
clone_target= "SYSTEM",
|
||||
shared = "yes"
|
||||
@@ -442,13 +442,6 @@ TM_MAD_CONF = [
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "iscsi",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SELF",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "ceph",
|
||||
ln_target = "NONE",
|
||||
@@ -471,7 +464,7 @@ TM_MAD_CONF = [
|
||||
|
||||
DATASTORE_MAD = [
|
||||
executable = "one_datastore",
|
||||
arguments = "-t 15 -d dummy,fs,vmfs,iscsi,lvm,ceph"
|
||||
arguments = "-t 15 -d dummy,fs,vmfs,lvm,ceph"
|
||||
]
|
||||
|
||||
#*******************************************************************************
|
||||
@@ -666,6 +659,7 @@ DEFAULT_UMASK = 177
|
||||
VM_RESTRICTED_ATTR = "CONTEXT/FILES"
|
||||
VM_RESTRICTED_ATTR = "NIC/MAC"
|
||||
VM_RESTRICTED_ATTR = "NIC/VLAN_ID"
|
||||
VM_RESTRICTED_ATTR = "NIC/BRIDGE"
|
||||
|
||||
#VM_RESTRICTED_ATTR = "RANK"
|
||||
#VM_RESTRICTED_ATTR = "SCHED_RANK"
|
||||
@@ -679,3 +673,27 @@ IMAGE_RESTRICTED_ATTR = "SOURCE"
|
||||
#*******************************************************************************
|
||||
|
||||
#ONEGATE_ENDPOINT = "http://frontend:5030"
|
||||
|
||||
#*******************************************************************************
|
||||
# Inherited Attributes Configuration
|
||||
#*******************************************************************************
|
||||
# The following attributes will be copied from the resource template to the
|
||||
# instantiated VMs. More than one attribute can be defined.
|
||||
#
|
||||
# INHERIT_IMAGE_ATTR: Attribute to be copied from the Image template
|
||||
# to each VM/DISK.
|
||||
#
|
||||
# INHERIT_DATASTORE_ATTR: Attribute to be copied from the Datastore template
|
||||
# to each VM/DISK.
|
||||
#
|
||||
# INHERIT_VNET_ATTR: Attribute to be copied from the Network template
|
||||
# to each VM/NIC.
|
||||
#*******************************************************************************
|
||||
|
||||
#INHERIT_IMAGE_ATTR = "EXAMPLE"
|
||||
#INHERIT_IMAGE_ATTR = "SECOND_EXAMPLE"
|
||||
#INHERIT_DATASTORE_ATTR = "COLOR"
|
||||
#INHERIT_VNET_ATTR = "BANDWIDTH_THROTTLING"
|
||||
|
||||
INHERIT_DATASTORE_ATTR = "CEPH_HOST"
|
||||
INHERIT_DATASTORE_ATTR = "CEPH_SECRET"
|
||||
@@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -45,7 +45,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -40,7 +40,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -36,7 +36,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -39,7 +39,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -45,7 +45,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -42,7 +42,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -53,7 +53,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -45,7 +45,7 @@ instance_id The IDs of instances, comma\-separated
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -43,7 +43,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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" "November 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.TH OPENNEBULA "1" "November 2013" "OpenNebula 4.3.85" "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" "November 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.TH OPENNEBULA "1" "November 2013" "OpenNebula 4.3.85" "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" "November 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.TH OPENNEBULA "1" "November 2013" "OpenNebula 4.3.85" "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" "November 2013" "OpenNebula 4.3.80" "User Commands"
|
||||
.TH OPENNEBULA "1" "November 2013" "OpenNebula 4.3.85" "User Commands"
|
||||
.SH NAME
|
||||
OpenNebula \- OCCI Manage Storage
|
||||
.SH SYNOPSIS
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ text String
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -54,7 +54,7 @@ aclid_list Comma\-separated list of OpenNebula ACL names or ids
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -99,7 +99,7 @@ datastoreid OpenNebula DATASTORE name or id
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -91,7 +91,7 @@ userid OpenNebula USER name or id
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -84,7 +84,7 @@ templateid_list Comma\-separated list of OpenNebula SERVICE TEMPLATE names or id
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -94,7 +94,7 @@ vm_action Actions supported: shutdown, shutdown\-hard, undeploy, undeploy\-hard,
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -74,7 +74,7 @@ groupid_list Comma\-separated list of OpenNebula GROUP names or ids
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -91,7 +91,7 @@ hostid_list Comma\-separated list of OpenNebula HOST names or ids
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -161,7 +161,7 @@ type Image type: OS, CDROM, DATABLOCK, KERNEL, RAMDISK, CONTEXT
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
@@ -162,7 +162,7 @@ filterflag a, all all the known VMTEMPLATEs m, mine the VMTEMPLATE belonging to
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -147,7 +147,7 @@ password User password
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -63,7 +63,7 @@ vdcid VDC ID
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -518,7 +518,7 @@ diskid Integer
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -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\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
-1
@@ -53,7 +53,7 @@ zoneid Zone ID
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "LICENSE"
|
||||
OpenNebula 4\.3\.80 Copyright 2002\-2013, OpenNebula Project (OpenNebula\.org), C12G Labs
|
||||
OpenNebula 4\.3\.85 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
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# /etc/rc.d/init.d/opennebula-econe
|
||||
#
|
||||
# Starts the OpenNebula ECONE Server
|
||||
#
|
||||
# chkconfig: 345 66 34
|
||||
# description: Starts the ECONE Server daemon
|
||||
# processname: opennebula-econe
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-econe
|
||||
# Required-Start: $local_fs $remote_fs oned
|
||||
# Required-Stop: $local_fs $remote_fs oned
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: start and stop opennebula-econe
|
||||
# Description: start and stop opennebula-econe
|
||||
### END INIT INFO
|
||||
|
||||
prog="opennebula-econe"
|
||||
|
||||
SERVER_BIN=/usr/bin/econe-server
|
||||
SERVER_PROGRAM=econe-server.rb
|
||||
LOCKFILE=/var/lock/subsys/${prog}
|
||||
PID_FILE=/var/run/${prog}.pid
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
|
||||
RETVAL=0
|
||||
|
||||
check() {
|
||||
# Check that we're a privileged user
|
||||
[ `id -u` = 0 ] || exit 4
|
||||
|
||||
# Check if $SERVER_BIN is executable
|
||||
test -x $SERVER_BIN || exit 5
|
||||
}
|
||||
|
||||
start() {
|
||||
check
|
||||
|
||||
echo -n $"Starting $prog Server: "
|
||||
daemon --user oneadmin $SERVER_BIN start
|
||||
RETVAL=$?
|
||||
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && {
|
||||
touch $LOCKFILE
|
||||
echo $(ps -ef|grep $SERVER_PROGRAM | awk '{print $2}') > $PID_FILE
|
||||
}
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
check
|
||||
|
||||
echo -n $"Stopping $prog Server daemon: "
|
||||
daemon --user oneadmin $SERVER_BIN stop
|
||||
RETVAL=$?
|
||||
|
||||
[ $RETVAL -eq 0 ] && success || failure
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE $PID_FILE
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
status)
|
||||
status $prog
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart}"
|
||||
RETVAL=2
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# /etc/rc.d/init.d/opennebula-ozones
|
||||
#
|
||||
# Starts the OpenNebula oZones Server
|
||||
#
|
||||
# chkconfig: 345 66 34
|
||||
# description: Starts the oZones Server daemon
|
||||
# processname: opennebula-ozones
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-ozones
|
||||
# Required-Start: $local_fs $remote_fs oned
|
||||
# Required-Stop: $local_fs $remote_fs oned
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: start and stop opennebula-ozones
|
||||
# Description: start and stop opennebula-ozones
|
||||
### END INIT INFO
|
||||
|
||||
prog="opennebula-ozones"
|
||||
|
||||
SERVER_BIN=/usr/bin/ozones-server
|
||||
SERVER_PROGRAM=ozones-server.rb
|
||||
LOCKFILE=/var/lock/subsys/${prog}
|
||||
PID_FILE=/var/run/${prog}.pid
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
|
||||
RETVAL=0
|
||||
|
||||
check() {
|
||||
# Check that we're a privileged user
|
||||
[ `id -u` = 0 ] || exit 4
|
||||
|
||||
# Check if $SERVER_BIN is executable
|
||||
test -x $SERVER_BIN || exit 5
|
||||
}
|
||||
|
||||
start() {
|
||||
check
|
||||
|
||||
echo -n $"Starting $prog Server: "
|
||||
daemon --user oneadmin $SERVER_BIN start
|
||||
RETVAL=$?
|
||||
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && {
|
||||
touch $LOCKFILE
|
||||
echo $(ps -ef|grep $SERVER_PROGRAM | awk '{print $2}') > $PID_FILE
|
||||
}
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
check
|
||||
|
||||
echo -n $"Stopping $prog Server daemon: "
|
||||
daemon --user oneadmin $SERVER_BIN stop
|
||||
RETVAL=$?
|
||||
|
||||
[ $RETVAL -eq 0 ] && success || failure
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE $PID_FILE
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
status)
|
||||
status $prog
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart}"
|
||||
RETVAL=2
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-econe
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: ECONE Server init script
|
||||
# Description: OpenNebula ECONE service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="ECONE Service"
|
||||
NAME=econe-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-flow
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OneFlow init script
|
||||
# Description: OpenNebula OneFlow service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="OneFlow Service"
|
||||
NAME=oneflow-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-gate
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OneGate init script
|
||||
# Description: OpenNebula OneGate service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="OneGate Service"
|
||||
NAME=onegate-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-occi
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OCCI Server init script
|
||||
# Description: OpenNebula OCCI service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="OCCI Service"
|
||||
NAME=occi-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-ozones
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: oZones Server init script
|
||||
# Description: OpenNebula oZones service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="oZones Service"
|
||||
NAME=ozones-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-sunstone
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Sunstone init script
|
||||
# Description: OpenNebula Sunstone web interface cloud initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Jaime Melis <jmelis@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Sunstone Web interface"
|
||||
NAME=sunstone-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-econe
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: ECONE Server init script
|
||||
# Description: OpenNebula ECONE service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="ECONE Service"
|
||||
NAME=econe-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-flow
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OneFlow init script
|
||||
# Description: OpenNebula OneFlow service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="OneFlow Service"
|
||||
NAME=oneflow-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-gate
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OneGate init script
|
||||
# Description: OpenNebula OneGate service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="OneGate Service"
|
||||
NAME=onegate-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-occi
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: OCCI Server init script
|
||||
# Description: OpenNebula OCCI service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="OCCI Service"
|
||||
NAME=occi-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-ozones
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: oZones Server init script
|
||||
# Description: OpenNebula oZones service initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Tino Vázquez <tinova@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="oZones Service"
|
||||
NAME=ozones-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: opennebula-sunstone
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Sunstone init script
|
||||
# Description: OpenNebula Sunstone web interface cloud initialisation script
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Jaime Melis <jmelis@opennebula.org>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Sunstone Web interface"
|
||||
NAME=sunstone-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/one /var/lock/one /var/log/one
|
||||
chown oneadmin /var/run/one /var/lock/one /var/log/one
|
||||
su oneadmin -s /bin/sh -c "$DAEMON start"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
su oneadmin -s /bin/sh -c "$DAEMON stop"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=OpenNebula EC2 Interface Service
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
After=one.service
|
||||
After=one_scheduler.service
|
||||
BindTo=one.service
|
||||
!ConditionFileExists=/var/lock/one/.econe.lock
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c "/usr/bin/econe-server start"
|
||||
ExecStartPost=/usr/bin/touch /var/lock/one/.econe.lock
|
||||
ExecStop=/bin/kill -INT $MAINPID
|
||||
PIDFile=/var/run/one/econe.pid
|
||||
Type=simple
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=OpenNebula OCCI Interface Service
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
After=one.service
|
||||
After=one_scheduler.service
|
||||
BindTo=one.service
|
||||
!ConditionFileExists=/var/lock/one/.occiserver.lock
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c "/usr/bin/occi-server start"
|
||||
ExecStartPost=/usr/bin/touch /var/lock/one/.occiserver.lock
|
||||
ExecStop=/bin/kill -INT $MAINPID
|
||||
PIDFile=/var/run/one/occiserver.pid
|
||||
Type=simple
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=OpenNebula Flow Service for multi tier applications
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
After=one.service
|
||||
After=one_scheduler.service
|
||||
BindTo=one.service
|
||||
!ConditionFileExists=/var/lock/one/.oneflow.lock
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c "/usr/bin/oneflow-server start"
|
||||
ExecStartPost=/usr/bin/touch /var/lock/one/.oneflow.lock
|
||||
ExecStop=/bin/kill -INT $MAINPID
|
||||
PIDFile=/var/run/one/oneflow.pid
|
||||
Type=simple
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=OpenNebula Gate Service for Service monitoring
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
After=one.service
|
||||
After=one_scheduler.service
|
||||
BindTo=one.service
|
||||
!ConditionFileExists=/var/lock/one/.onegate.lock
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c "/usr/bin/onegate-server start"
|
||||
ExecStartPost=/usr/bin/touch /var/lock/one/.onegate.lock
|
||||
ExecStop=/bin/kill -INT $MAINPID
|
||||
PIDFile=/var/run/one/onegate.pid
|
||||
Type=simple
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -8,7 +8,7 @@ BindTo=one.service
|
||||
!ConditionFileExists=/var/lock/one/.ozones.lock
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c "/usr/bin/rackup /usr/lib/one/ozones/config.ru -s thin -P /var/run/one/ozones.pid > /var/log/one/ozones-server.log 2>&1"
|
||||
ExecStart=/bin/bash -c "/usr/bin/ozones-server start"
|
||||
ExecStartPost=/usr/bin/touch /var/lock/one/.ozones.lock
|
||||
ExecStop=/bin/kill -INT $MAINPID
|
||||
PIDFile=/var/run/one/ozones.pid
|
||||
|
||||
@@ -21,7 +21,7 @@ require 'tmpdir'
|
||||
|
||||
|
||||
DEFAULTS={
|
||||
:version => "4.3.80",
|
||||
:version => "4.3.85",
|
||||
:date => Time.now.strftime("%Y-%m-%d"),
|
||||
:dependencies => []
|
||||
}
|
||||
|
||||
@@ -50,16 +50,21 @@ function execute_scripts {
|
||||
done
|
||||
}
|
||||
|
||||
if [ -e "/dev/disk/by-label/CONTEXT" ]; then
|
||||
mount -t iso9660 -L CONTEXT -o ro /mnt
|
||||
if [ -f /mnt/context.sh ]; then
|
||||
export_rc_vars /mnt/context.sh
|
||||
case "$1" in
|
||||
"start")
|
||||
if [ -e "/dev/disk/by-label/CONTEXT" ]; then
|
||||
mount -t iso9660 -L CONTEXT -o ro /mnt
|
||||
if [ -f /mnt/context.sh ]; then
|
||||
export_rc_vars /mnt/context.sh
|
||||
fi
|
||||
|
||||
execute_scripts
|
||||
|
||||
umount /mnt
|
||||
else
|
||||
execute_scripts
|
||||
fi
|
||||
;;
|
||||
|
||||
execute_scripts
|
||||
|
||||
umount /mnt
|
||||
else
|
||||
execute_scripts
|
||||
fi
|
||||
esac
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
export DNS_VARIABLES="DNS $(env | sed 's/=.*$//' | grep -E '^ETH[0-9]+_DNS$' | sort)"
|
||||
|
||||
export SEARCH_VARIABLES="SEARCH $(env | sed 's/=.*$//' | grep -E '^ETH[0-9]+_SEARCH$' | sort)"
|
||||
export SEARCH_VARIABLES="SEARCH_DOMAIN $(env | sed 's/=.*$//' | grep -E '^ETH[0-9]+_SEARCH_DOMAIN$' | sort)"
|
||||
|
||||
nameservers=$(
|
||||
for var in ${DNS_VARIABLES}; do
|
||||
@@ -49,3 +49,4 @@ done
|
||||
[ -z "$searchdomains" ] && exit 0
|
||||
|
||||
echo search $searchdomains >> /etc/resolv.conf
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
VERSION=${VERSION:-4.3.80}
|
||||
VERSION=${VERSION:-4.3.85}
|
||||
MAINTAINER=${MAINTAINER:-C12G Labs <support@c12g.com>}
|
||||
LICENSE=${LICENSE:-Apache 2.0}
|
||||
PACKAGE_NAME=${PACKAGE_NAME:-one-context}
|
||||
|
||||
@@ -1,279 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# LUN assignment script
|
||||
#
|
||||
# Copyright (C) 2007 Erez Zilber <erezz@voltaire.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, version 2 of the
|
||||
# License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
usage()
|
||||
{
|
||||
name=$(basename $0);
|
||||
echo "usage:";
|
||||
echo -e "\t$name -n tgt_name -d dev -b bs_name -t transport [initiator_IP1 initiator_IP2 ...]";
|
||||
echo "defaults:";
|
||||
echo -e "\tbacking store: rdwr";
|
||||
echo -e "\ttransport: iscsi";
|
||||
echo -e "\tinitiator: ALL";
|
||||
echo "examples:";
|
||||
echo -e "\t$name -n tgt-1 -d /dev/sdb1 192.168.1.2";
|
||||
echo -e "\t$name -n tgt-2 -d /tmp/null -b null -t iser";
|
||||
echo -e "\t$name -n tgt-3 -d ~/disk3.bin -b rdwr 192.168.1.2 192.168.1.3";
|
||||
}
|
||||
|
||||
verify_params()
|
||||
{
|
||||
if ! [ "$dev" -o "$bs_type" == "null" ]; then
|
||||
echo "Error: a device is mandatory";
|
||||
exit 1;
|
||||
else
|
||||
return;
|
||||
fi
|
||||
|
||||
# Make sure that the device exists
|
||||
if ! [ -b $dev -o -f $dev -o -c $dev ]; then
|
||||
echo "Error: $dev is not a device";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if ! [ "$tgt_name" ]; then
|
||||
echo "Error: target name is mandatory";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if ! [ "$lld_name" ]; then
|
||||
echo "Error: lld name empty";
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
find_vacant_tgt_id()
|
||||
{
|
||||
tmp_file=`mktemp`
|
||||
tgtadm --lld $lld_name --op show --mode target | strings > $tmp_file
|
||||
id_list=$(cat $tmp_file | grep Target | cut -d" " -f2 | sed s/://)
|
||||
next_vacant_id=1
|
||||
for id in $id_list; do
|
||||
if (($id > $next_vacant_id)); then
|
||||
break;
|
||||
else
|
||||
next_vacant_id=$((next_vacant_id+1))
|
||||
fi
|
||||
done
|
||||
rm -f $tmp_file
|
||||
echo $next_vacant_id
|
||||
}
|
||||
|
||||
find_vacant_lun()
|
||||
{
|
||||
tid=$1
|
||||
tgt_found=0
|
||||
next_vacant_lun=0
|
||||
tmp_file=`mktemp`
|
||||
|
||||
tgtadm --lld $lld_name --op show --mode target | strings | tgt-admin -s | grep 'LUN\|Target' > $tmp_file
|
||||
retcode=$?
|
||||
while read line; do
|
||||
# Check if we finished going over this target
|
||||
if ((tgt_found == 1 && $(echo $line | grep -c "^Target") == 1)); then
|
||||
break
|
||||
fi
|
||||
|
||||
# Check if we found the requested target
|
||||
if (($(echo $line | grep -c "Target $tid:") == 1)); then
|
||||
tgt_found=1
|
||||
continue
|
||||
fi
|
||||
|
||||
if ((tgt_found == 1 && $(echo $line | grep -c "LUN:") == 1)); then
|
||||
curr_lun=$(echo $line | cut -d" " -f2)
|
||||
if (($curr_lun > $next_vacant_lun)); then
|
||||
break
|
||||
else
|
||||
next_vacant_lun=$((next_vacant_lun+1))
|
||||
fi
|
||||
fi
|
||||
done < $tmp_file
|
||||
|
||||
rm -f $tmp_file
|
||||
|
||||
if ((tgt_found == 0)); then
|
||||
echo "Error: could not find a LUN for target $tid, guessing 1 as next vacant LUN"
|
||||
return 1
|
||||
fi
|
||||
if ((next_vacant_lun == 0)); then
|
||||
echo "Error: could not find a LUN for target $tid, guessing 1 as next vacant LUN"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return $next_vacant_lun
|
||||
}
|
||||
|
||||
err_exit()
|
||||
{
|
||||
if ((new_tgt == 0)); then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Deleting new target, tid=$tid"
|
||||
tgtadm --lld $lld_name --op delete --mode target --tid $tid
|
||||
res=$?
|
||||
|
||||
if [ $res -ne 0 ]; then
|
||||
echo "Error: failed to delete target, tid=$tid"
|
||||
fi
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
check_if_tgt_exists()
|
||||
{
|
||||
tgt_list=$(tgtadm --lld $lld_name --op show --mode target | strings | grep Target | cut -d" " -f3)
|
||||
|
||||
for curr_tgt in $tgt_list; do
|
||||
if [ $tgt_name = $curr_tgt ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
lld_name="iscsi"
|
||||
|
||||
while getopts "d:n:b:t:h:" opt
|
||||
do
|
||||
case ${opt} in
|
||||
d)
|
||||
dev=$OPTARG;;
|
||||
n)
|
||||
tgt_name=$OPTARG;;
|
||||
b)
|
||||
bs_type=$OPTARG;;
|
||||
t)
|
||||
lld_name=$OPTARG;;
|
||||
h*)
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
initiators=$*
|
||||
|
||||
verify_params
|
||||
|
||||
# Check if tgtd is running (we should have 2 daemons)
|
||||
tgtd_count=`pidof tgtd | wc -w`
|
||||
if [ $tgtd_count -lt 1 ]; then
|
||||
echo "tgtd is not running"
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using transport: $lld_name"
|
||||
|
||||
if ! [[ $tgt_name =~ ^iqn ]]; then
|
||||
tgt_name="iqn.2001-04.com.$(hostname -s)-$tgt_name"
|
||||
fi
|
||||
|
||||
# Make sure that a target with the same name doesn't exist
|
||||
check_if_tgt_exists
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Error: target named $tgt_name already exists"
|
||||
read -p "Add a new lun to the existing target? (yes/NO): " add_lun
|
||||
if [ $add_lun != "yes" ]; then
|
||||
exit 1
|
||||
fi
|
||||
tid=$(tgtadm --lld $lld_name --op show --mode target | strings | grep $tgt_name | cut -d" " -f2)
|
||||
tid=${tid%:}
|
||||
new_tgt=0
|
||||
else
|
||||
|
||||
i=0
|
||||
while [ true ]
|
||||
do
|
||||
let i=i+1
|
||||
tid=`find_vacant_tgt_id`
|
||||
#tid=$?
|
||||
# Create the new target
|
||||
echo -n "Creating new target (name=$tgt_name, tid=$tid)..."
|
||||
tgtoutput=`tgtadm --lld $lld_name --op new --mode target --tid $tid -T $tgt_name 2>&1`
|
||||
res=$?
|
||||
if [ "$tgtoutput" == "tgtadm: this target already exists" ]; then
|
||||
echo "Target already exists (this should not happen)... Attempt $i"
|
||||
elif [ $res -eq 0 ]; then # output is not about duplication and return value is zero, this is the normal condition
|
||||
break
|
||||
fi
|
||||
if [ $i -eq 100 ]; then
|
||||
echo "Too many attempts, giving up"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $res -ne 0 ]; then
|
||||
echo "Error: failed to create target (name=$tgt_name, tid=$tid)"
|
||||
exit 1
|
||||
fi
|
||||
new_tgt=1
|
||||
fi
|
||||
echo "OK"
|
||||
find_vacant_lun $tid
|
||||
lun=$?
|
||||
echo "LUN ok, $lun"
|
||||
|
||||
# Add a logical unit to the target
|
||||
echo "Adding a logical unit ($dev) to target, tid=$tid"
|
||||
if [ $bs_type ]; then
|
||||
echo "Setting backing store type: $bs_type"
|
||||
bs_opt="-E $bs_type"
|
||||
fi
|
||||
tgtadm --lld $lld_name --op new --mode logicalunit --tid $tid --lun $lun -b $dev $bs_opt
|
||||
res=$?
|
||||
|
||||
if [ $res -ne 0 ]; then
|
||||
echo "Error: failed to add a logical unit ($dev) to target, tid=$tid"
|
||||
err_exit
|
||||
fi
|
||||
|
||||
# Define which initiators can use this target
|
||||
if test "$initiators" ; then
|
||||
# Allow access only for specific initiators
|
||||
echo "Accepting connections only from $initiators"
|
||||
for initiator in $initiators; do
|
||||
tgtadm --lld $lld_name --op bind --mode target --tid $tid -I $initiator
|
||||
res=$?
|
||||
|
||||
if [ $res -ne 0 ]; then
|
||||
echo "Error: could not assign initiator $initiator to the target"
|
||||
fi
|
||||
done
|
||||
else
|
||||
# Allow access for everyone
|
||||
echo "Accepting connections from all initiators"
|
||||
tgtadm --lld $lld_name --op bind --mode target --tid $tid -I ALL
|
||||
res=$?
|
||||
|
||||
if [ $res -ne 0 ]; then
|
||||
echo "Error: failed to set access for all initiators"
|
||||
err_exit
|
||||
fi
|
||||
fi
|
||||
@@ -50,7 +50,7 @@ end
|
||||
module CloudClient
|
||||
|
||||
# OpenNebula version
|
||||
VERSION = '4.3.80'
|
||||
VERSION = '4.3.85'
|
||||
|
||||
# #########################################################################
|
||||
# Default location for the authentication file
|
||||
|
||||
@@ -217,3 +217,24 @@ string one_util::random_password()
|
||||
|
||||
return sha1_digest(sstr.str());
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
vector<string> one_util::split(const string& st, char delim, bool clean_empty)
|
||||
{
|
||||
vector<string> parts;
|
||||
string part;
|
||||
|
||||
stringstream ss(st);
|
||||
|
||||
while (getline(ss, part, delim))
|
||||
{
|
||||
if (!(clean_empty && part.empty()))
|
||||
{
|
||||
parts.push_back(part);
|
||||
}
|
||||
}
|
||||
|
||||
return parts;
|
||||
}
|
||||
@@ -71,10 +71,15 @@ Datastore::Datastore(
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
int Datastore::disk_attribute(VectorAttribute * disk)
|
||||
int Datastore::disk_attribute(
|
||||
VectorAttribute * disk,
|
||||
const vector<string>& inherit_attrs)
|
||||
{
|
||||
ostringstream oss;
|
||||
string st;
|
||||
string inherit_val;
|
||||
|
||||
vector<string>::const_iterator it;
|
||||
|
||||
oss << oid;
|
||||
|
||||
@@ -104,6 +109,16 @@ int Datastore::disk_attribute(VectorAttribute * disk)
|
||||
disk->replace("LN_TARGET", st);
|
||||
}
|
||||
|
||||
for (it = inherit_attrs.begin(); it != inherit_attrs.end(); it++)
|
||||
{
|
||||
get_template_attribute((*it).c_str(), inherit_val);
|
||||
|
||||
if (!inherit_val.empty())
|
||||
{
|
||||
disk->replace(*it, inherit_val);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
###############################################################################
|
||||
# This script is used to copy a VM image (SRC) to the image repository as DST
|
||||
# Several SRC types are supported
|
||||
###############################################################################
|
||||
# -------- Set up the environment to source common tools & conf ------------
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
LIB_LOCATION=/usr/lib/one
|
||||
else
|
||||
LIB_LOCATION=$ONE_LOCATION/lib
|
||||
fi
|
||||
|
||||
. $LIB_LOCATION/sh/scripts_common.sh
|
||||
|
||||
DRIVER_PATH=$(dirname $0)
|
||||
source ${DRIVER_PATH}/../libfs.sh
|
||||
source ${DRIVER_PATH}/iscsi.conf
|
||||
|
||||
# -------- Get cp and datastore arguments from OpenNebula core ------------
|
||||
|
||||
DRV_ACTION=$1
|
||||
ID=$2
|
||||
|
||||
XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION"
|
||||
|
||||
unset i j XPATH_ELEMENTS
|
||||
|
||||
while IFS= read -r -d '' element; do
|
||||
XPATH_ELEMENTS[i++]="$element"
|
||||
done < <($XPATH /DS_DRIVER_ACTION_DATA/DATASTORE/BASE_PATH \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/RESTRICTED_DIRS \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/SAFE_DIRS \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BRIDGE_LIST \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/VG_NAME \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BASE_IQN \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/PATH \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/SIZE)
|
||||
|
||||
BASE_PATH="${XPATH_ELEMENTS[j++]}"
|
||||
RESTRICTED_DIRS="${XPATH_ELEMENTS[j++]}"
|
||||
SAFE_DIRS="${XPATH_ELEMENTS[j++]}"
|
||||
BRIDGE_LIST="${XPATH_ELEMENTS[j++]}"
|
||||
VG_NAME="${XPATH_ELEMENTS[j++]:-$VG_NAME}"
|
||||
BASE_IQN="${XPATH_ELEMENTS[j++]:-$BASE_IQN}"
|
||||
SRC="${XPATH_ELEMENTS[j++]}"
|
||||
SIZE="${XPATH_ELEMENTS[j++]}"
|
||||
|
||||
DST_HOST=`get_destination_host $ID`
|
||||
|
||||
if [ -z "$DST_HOST" ]; then
|
||||
error_message "Datastore template missing 'BRIDGE_LIST' attribute."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Check if 'TGTSETUPLUN' is installed
|
||||
tgt_setup_lun_install "$DST_HOST" "$BASE_PATH"
|
||||
|
||||
set_up_datastore "$BASE_PATH" "$RESTRICTED_DIRS" "$SAFE_DIRS"
|
||||
|
||||
LV_NAME="lv-one-${ID}"
|
||||
IQN="$BASE_IQN:$DST_HOST.$VG_NAME.$LV_NAME"
|
||||
DEV="/dev/$VG_NAME/$LV_NAME"
|
||||
|
||||
LV_SRC=$(echo $SRC|awk -F. '{print $NF}')
|
||||
DEV_SRC="/dev/$VG_NAME/$LV_SRC"
|
||||
|
||||
CLONE_CMD=$(cat <<EOF
|
||||
set -e
|
||||
$SUDO $LVCREATE -L${SIZE}M ${VG_NAME} -n ${LV_NAME}
|
||||
$SUDO $DD if=$DEV_SRC of=$DEV bs=2M
|
||||
|
||||
$SUDO $(tgt_setup_lun "$IQN" "$DEV")
|
||||
$SUDO $(tgt_admin_dump_config "$TARGET_CONF")
|
||||
EOF
|
||||
)
|
||||
|
||||
ssh_exec_and_log "$DST_HOST" "$CLONE_CMD" \
|
||||
"Error cloning $DEV_SRC to $DEV in $DST_HOST"
|
||||
|
||||
echo "$IQN"
|
||||
@@ -1,131 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
###############################################################################
|
||||
# This script is used to copy a VM image (SRC) to the image repository as DST
|
||||
# Several SRC types are supported
|
||||
###############################################################################
|
||||
|
||||
# -------- Set up the environment to source common tools & conf ------------
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
LIB_LOCATION=/usr/lib/one
|
||||
else
|
||||
LIB_LOCATION=$ONE_LOCATION/lib
|
||||
fi
|
||||
|
||||
. $LIB_LOCATION/sh/scripts_common.sh
|
||||
|
||||
DRIVER_PATH=$(dirname $0)
|
||||
source ${DRIVER_PATH}/../libfs.sh
|
||||
source ${DRIVER_PATH}/iscsi.conf
|
||||
|
||||
# -------- Get cp and datastore arguments from OpenNebula core ------------
|
||||
|
||||
DRV_ACTION=$1
|
||||
ID=$2
|
||||
|
||||
UTILS_PATH="${DRIVER_PATH}/.."
|
||||
|
||||
XPATH="$UTILS_PATH/xpath.rb -b $DRV_ACTION"
|
||||
|
||||
unset i j XPATH_ELEMENTS
|
||||
|
||||
while IFS= read -r -d '' element; do
|
||||
XPATH_ELEMENTS[i++]="$element"
|
||||
done < <($XPATH /DS_DRIVER_ACTION_DATA/DATASTORE/BASE_PATH \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/RESTRICTED_DIRS \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/SAFE_DIRS \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BRIDGE_LIST \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/VG_NAME \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BASE_IQN \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/PATH \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/SIZE \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/TEMPLATE/MD5 \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/TEMPLATE/SHA1 \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/NO_DECOMPRESS \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/LIMIT_TRANSFER_BW)
|
||||
|
||||
BASE_PATH="${XPATH_ELEMENTS[j++]}"
|
||||
RESTRICTED_DIRS="${XPATH_ELEMENTS[j++]}"
|
||||
SAFE_DIRS="${XPATH_ELEMENTS[j++]}"
|
||||
BRIDGE_LIST="${XPATH_ELEMENTS[j++]}"
|
||||
VG_NAME="${XPATH_ELEMENTS[j++]:-$VG_NAME}"
|
||||
BASE_IQN="${XPATH_ELEMENTS[j++]:-$BASE_IQN}"
|
||||
SRC="${XPATH_ELEMENTS[j++]}"
|
||||
SIZE="${XPATH_ELEMENTS[j++]}"
|
||||
MD5="${XPATH_ELEMENTS[j++]}"
|
||||
SHA1="${XPATH_ELEMENTS[j++]}"
|
||||
NO_DECOMPRESS="${XPATH_ELEMENTS[j++]}"
|
||||
LIMIT_TRANSFER_BW="${XPATH_ELEMENTS[j++]}"
|
||||
|
||||
DST_HOST=`get_destination_host $ID`
|
||||
|
||||
if [ -z "$DST_HOST" ]; then
|
||||
error_message "Datastore template missing 'BRIDGE_LIST' attribute."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Check if 'TGTSETUPLUN' is installed
|
||||
tgt_setup_lun_install "$DST_HOST" "$BASE_PATH"
|
||||
|
||||
set_up_datastore "$BASE_PATH" "$RESTRICTED_DIRS" "$SAFE_DIRS"
|
||||
|
||||
LV_NAME="lv-one-${ID}"
|
||||
IQN="$BASE_IQN:$DST_HOST.$VG_NAME.$LV_NAME"
|
||||
DEV="/dev/$VG_NAME/$LV_NAME"
|
||||
|
||||
REGISTER_CMD=$(cat <<EOF
|
||||
set -e
|
||||
$SUDO $LVCREATE -L${SIZE}M ${VG_NAME} -n ${LV_NAME}
|
||||
|
||||
$SUDO $(tgt_setup_lun "$IQN" "$DEV")
|
||||
$SUDO $(tgt_admin_dump_config "$TARGET_CONF")
|
||||
EOF
|
||||
)
|
||||
|
||||
DOWNLOADER_ARGS=`set_downloader_args "$MD5" "$SHA1" "$NO_DECOMPRESS" "$LIMIT_TRANSFER_BW" "$SRC" -`
|
||||
|
||||
COPY_COMMAND="$UTILS_PATH/downloader.sh $DOWNLOADER_ARGS"
|
||||
|
||||
case $SRC in
|
||||
http://*|https://*)
|
||||
log "Downloading $SRC to the image repository"
|
||||
|
||||
DUMP="$COPY_COMMAND"
|
||||
;;
|
||||
|
||||
*)
|
||||
if [ `check_restricted $SRC` -eq 1 ]; then
|
||||
log_error "Not allowed to copy images from $RESTRICTED_DIRS"
|
||||
error_message "Not allowed to copy image file $SRC"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
log "Copying local image $SRC to the image repository"
|
||||
|
||||
DUMP="$COPY_COMMAND"
|
||||
;;
|
||||
esac
|
||||
|
||||
ssh_exec_and_log "$DST_HOST" "$REGISTER_CMD" "Error registering $DST_HOST:$DEV"
|
||||
|
||||
exec_and_log "eval $DUMP | $SSH $DST_HOST $SUDO $DD of=$DEV bs=2M" \
|
||||
"Error dumping $SRC to $DST_HOST:$DEV"
|
||||
|
||||
echo "$IQN"
|
||||
@@ -1,99 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
###############################################################################
|
||||
# This script is used to create a VM image (SRC) of size (SIZE) and formatted
|
||||
# as (FS)
|
||||
###############################################################################
|
||||
|
||||
# -------- Set up the environment to source common tools & conf ------------
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
LIB_LOCATION=/usr/lib/one
|
||||
else
|
||||
LIB_LOCATION=$ONE_LOCATION/lib
|
||||
fi
|
||||
|
||||
. $LIB_LOCATION/sh/scripts_common.sh
|
||||
|
||||
DRIVER_PATH=$(dirname $0)
|
||||
source ${DRIVER_PATH}/../libfs.sh
|
||||
source ${DRIVER_PATH}/iscsi.conf
|
||||
|
||||
# -------- Get mkfs and datastore arguments from OpenNebula core ------------
|
||||
|
||||
DRV_ACTION=$1
|
||||
ID=$2
|
||||
|
||||
XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION"
|
||||
|
||||
unset i j XPATH_ELEMENTS
|
||||
|
||||
while IFS= read -r -d '' element; do
|
||||
XPATH_ELEMENTS[i++]="$element"
|
||||
done < <($XPATH /DS_DRIVER_ACTION_DATA/DATASTORE/BASE_PATH \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/RESTRICTED_DIRS \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/SAFE_DIRS \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BRIDGE_LIST \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/VG_NAME \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BASE_IQN \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/FSTYPE \
|
||||
/DS_DRIVER_ACTION_DATA/IMAGE/SIZE)
|
||||
|
||||
BASE_PATH="${XPATH_ELEMENTS[j++]}"
|
||||
RESTRICTED_DIRS="${XPATH_ELEMENTS[j++]}"
|
||||
SAFE_DIRS="${XPATH_ELEMENTS[j++]}"
|
||||
BRIDGE_LIST="${XPATH_ELEMENTS[j++]}"
|
||||
VG_NAME="${XPATH_ELEMENTS[j++]:-$VG_NAME}"
|
||||
BASE_IQN="${XPATH_ELEMENTS[j++]:-$BASE_IQN}"
|
||||
FSTYPE="${XPATH_ELEMENTS[j++]}"
|
||||
SIZE="${XPATH_ELEMENTS[j++]:-0}"
|
||||
|
||||
DST_HOST=`get_destination_host $ID`
|
||||
|
||||
if [ -z "$DST_HOST" ]; then
|
||||
error_message "Datastore template missing 'BRIDGE_LIST' attribute."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# Check if 'TGTSETUPLUN' is installed
|
||||
tgt_setup_lun_install "$DST_HOST" "$BASE_PATH"
|
||||
|
||||
set_up_datastore "$BASE_PATH" "$RESTRICTED_DIRS" "$SAFE_DIRS"
|
||||
|
||||
LV_NAME="lv-one-${ID}"
|
||||
IQN="$BASE_IQN:$DST_HOST.$VG_NAME.$LV_NAME"
|
||||
DEV="/dev/$VG_NAME/$LV_NAME"
|
||||
|
||||
REGISTER_CMD=$(cat <<EOF
|
||||
set -e
|
||||
$SUDO $LVCREATE -L${SIZE}M ${VG_NAME} -n ${LV_NAME}
|
||||
|
||||
$SUDO $(tgt_setup_lun "$IQN" "$DEV")
|
||||
$SUDO $(tgt_admin_dump_config "$TARGET_CONF")
|
||||
|
||||
if [ "$FSTYPE" != "save_as" ]; then
|
||||
$SUDO $(mkfs_command "$DEV" "$FSTYPE")
|
||||
fi
|
||||
EOF
|
||||
)
|
||||
|
||||
ssh_exec_and_log "$DST_HOST" "$REGISTER_CMD" \
|
||||
"Error registering $DST_HOST:$DEV"
|
||||
|
||||
echo "$IQN"
|
||||
@@ -1,86 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
###############################################################################
|
||||
# This script is used to monitor the free and used space of a datastore
|
||||
###############################################################################
|
||||
|
||||
# -------- Set up the environment to source common tools & conf ------------
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
LIB_LOCATION=/usr/lib/one
|
||||
else
|
||||
LIB_LOCATION=$ONE_LOCATION/lib
|
||||
fi
|
||||
|
||||
. $LIB_LOCATION/sh/scripts_common.sh
|
||||
|
||||
DRIVER_PATH=$(dirname $0)
|
||||
source ${DRIVER_PATH}/../libfs.sh
|
||||
source ${DRIVER_PATH}/iscsi.conf
|
||||
|
||||
# -------- Get datastore arguments from OpenNebula core ------------
|
||||
|
||||
DRV_ACTION=$1
|
||||
ID=$2
|
||||
|
||||
XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION"
|
||||
|
||||
unset i j XPATH_ELEMENTS
|
||||
|
||||
while IFS= read -r -d '' element; do
|
||||
XPATH_ELEMENTS[i++]="$element"
|
||||
done < <($XPATH /DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BRIDGE_LIST \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/VG_NAME)
|
||||
|
||||
BRIDGE_LIST="${XPATH_ELEMENTS[j++]}"
|
||||
VG_NAME="${XPATH_ELEMENTS[j++]:-$VG_NAME}"
|
||||
|
||||
HOST=`get_destination_host`
|
||||
|
||||
if [ -z "$HOST" ]; then
|
||||
error_message "Datastore template missing 'BRIDGE_LIST' attribute."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# ------------ Compute datastore usage -------------
|
||||
|
||||
MONITOR_SCRIPT=$(cat <<EOF
|
||||
set -e
|
||||
|
||||
VG_OPTS="--units M -C --noheadings --nosuffix $VG_NAME"
|
||||
|
||||
TOTAL_MB=\$($SUDO $VGDISPLAY -o vg_size \$VG_OPTS | $TR -d ' ')
|
||||
FREE_MB=\$($SUDO $VGDISPLAY -o vg_free \$VG_OPTS | $TR -d ' ')
|
||||
USED_MB=\$($AWK "BEGIN {print \$TOTAL_MB - \$FREE_MB}")
|
||||
|
||||
echo "USED_MB=\$USED_MB"
|
||||
echo "TOTAL_MB=\$TOTAL_MB"
|
||||
echo "FREE_MB=\$FREE_MB"
|
||||
EOF
|
||||
)
|
||||
|
||||
MONITOR_DATA=$(ssh_monitor_and_log $HOST "$MONITOR_SCRIPT" 2>&1)
|
||||
MONITOR_STATUS=$?
|
||||
|
||||
if [ "$MONITOR_STATUS" = "0" ]; then
|
||||
echo "$MONITOR_DATA" | tr ' ' '\n'
|
||||
else
|
||||
echo "$MONITOR_DATA"
|
||||
exit $MONITOR_STATUS
|
||||
fi
|
||||
@@ -1,85 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
###############################################################################
|
||||
# This script is used to remove a VM image (SRC) from the image repository
|
||||
###############################################################################
|
||||
|
||||
# ------------ Set up the environment to source common tools ------------
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
LIB_LOCATION=/usr/lib/one
|
||||
else
|
||||
LIB_LOCATION=$ONE_LOCATION/lib
|
||||
fi
|
||||
|
||||
. $LIB_LOCATION/sh/scripts_common.sh
|
||||
|
||||
DRIVER_PATH=$(dirname $0)
|
||||
source ${DRIVER_PATH}/../libfs.sh
|
||||
source ${DRIVER_PATH}/iscsi.conf
|
||||
|
||||
# -------- Get rm and datastore arguments from OpenNebula core ------------
|
||||
|
||||
DRV_ACTION=$1
|
||||
ID=$2
|
||||
|
||||
XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION"
|
||||
|
||||
unset i j XPATH_ELEMENTS
|
||||
|
||||
while IFS= read -r -d '' element; do
|
||||
XPATH_ELEMENTS[i++]="$element"
|
||||
done < <($XPATH /DS_DRIVER_ACTION_DATA/IMAGE/SOURCE \
|
||||
/DS_DRIVER_ACTION_DATA/DATASTORE/TEMPLATE/BRIDGE_LIST)
|
||||
|
||||
SRC="${XPATH_ELEMENTS[j++]}"
|
||||
BRIDGE_LIST="${XPATH_ELEMENTS[j++]}"
|
||||
|
||||
DST_HOST=`get_destination_host $ID`
|
||||
|
||||
if [ -z "$DST_HOST" ]; then
|
||||
error_message "Datastore template missing 'BRIDGE_LIST' attribute."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
BASE_IQN=`echo $SRC|$CUT -d: -f1`
|
||||
TARGET=`echo $SRC|$CUT -d: -f2`
|
||||
LV_NAME=`echo $TARGET|$AWK -F. '{print $(NF)}'`
|
||||
VG_NAME=`echo $TARGET|$AWK -F. '{print $(NF-1)}'`
|
||||
DEV="/dev/$VG_NAME/$LV_NAME"
|
||||
|
||||
IQN="$BASE_IQN:$DST_HOST.$VG_NAME.$LV_NAME"
|
||||
|
||||
RM_COMMAND=$(cat <<EOF
|
||||
set -e
|
||||
|
||||
TID=\$($SUDO $(tgtadm_get_tid_for_iqn "$IQN"))
|
||||
|
||||
$SUDO $(tgtadm_target_delete "\$TID")
|
||||
$SUDO $SYNC
|
||||
$SUDO $LVREMOVE -f $VG_NAME/$LV_NAME
|
||||
$SUDO $(tgt_admin_dump_config "$TARGET_CONF")
|
||||
EOF
|
||||
)
|
||||
|
||||
log "Removing $DST_HOST:$DEV from the image repository"
|
||||
|
||||
ssh_exec_and_log "$DST_HOST" "$RM_COMMAND" \
|
||||
"Error removing $DST_HOST:$DEV"
|
||||
|
||||
exit 0
|
||||
@@ -1 +0,0 @@
|
||||
../common/stat
|
||||
@@ -65,9 +65,8 @@ fi
|
||||
|
||||
SAFE_DIRS=""
|
||||
|
||||
SRC_HOST=`echo $SRC|cut -d. -f1`
|
||||
SRC_PATH=`echo $SRC|cut -d. -f2`
|
||||
|
||||
SRC_HOST=`echo $SRC|cut -d: -f1`
|
||||
SRC_PATH=`echo $SRC|awk -F. '{print $NF}'`
|
||||
LV_SRC=$(echo $SRC_PATH|cut -d. -f2)
|
||||
DEV_SRC="/dev/$VG_NAME/$LV_SRC"
|
||||
|
||||
|
||||
@@ -338,7 +338,7 @@ void InformationManager::timer_action()
|
||||
oss << "Monitoring host " << host->get_name() << " ("
|
||||
<< host->get_oid() << ")";
|
||||
|
||||
NebulaLog::log("InM",Log::INFO,oss);
|
||||
NebulaLog::log("InM",Log::DEBUG,oss);
|
||||
|
||||
imd = get(host->get_im_mad());
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ void InformationManagerDriver::protocol(const string& message) const
|
||||
oss << "Datastore " << ds->get_name() <<
|
||||
" (" << ds->get_oid() << ") successfully monitored.";
|
||||
|
||||
NebulaLog::log("ImM", Log::INFO, oss);
|
||||
NebulaLog::log("ImM", Log::DEBUG, oss);
|
||||
|
||||
dspool->update(ds);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,12 @@ HYPERVISOR=$1
|
||||
DATASTORE_LOCATION=${2:-"/var/lib/one/datastores"}
|
||||
|
||||
LVM_VG_PREFIX="vg-one-"
|
||||
LVM_SIZE_CMD="sudo vgdisplay --separator : --units m -o vg_size,vg_free --nosuffix --noheadings -C"
|
||||
|
||||
PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin which vgdisplay &> /dev/null
|
||||
|
||||
if [ $? == 0 ]; then
|
||||
LVM_SIZE_CMD="sudo vgdisplay --separator : --units m -o vg_size,vg_free --nosuffix --noheadings -C"
|
||||
fi
|
||||
|
||||
USED_MB=$(du -sLm $DATASTORE_LOCATION 2>/dev/null | cut -f1)
|
||||
TOTAL_MB=$(df -B1M -P $DATASTORE_LOCATION 2>/dev/null | tail -n 1 | awk '{print $2}')
|
||||
@@ -26,8 +31,12 @@ for ds in $dirs; do
|
||||
TOTAL_MB=$(df -B1M -P $dir 2>/dev/null | tail -n 1 | awk '{print $2}')
|
||||
FREE_MB=$(df -B1M -P $dir 2>/dev/null | tail -n 1 | awk '{print $4}')
|
||||
|
||||
LVM_SIZE=$($LVM_SIZE_CMD ${LVM_VG_PREFIX}${ds} 2>/dev/null)
|
||||
LVM_STATUS=$?
|
||||
if [ -n "$LVM_SIZE_CMD" ]; then
|
||||
LVM_SIZE=$($LVM_SIZE_CMD ${LVM_VG_PREFIX}${ds} 2>/dev/null)
|
||||
LVM_STATUS=$?
|
||||
else
|
||||
LVM_STATUS=255
|
||||
fi
|
||||
|
||||
echo "DS = ["
|
||||
echo " ID = $ds,"
|
||||
|
||||
+17
-3
@@ -467,18 +467,22 @@ int Image::from_xml(const string& xml)
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
int Image::disk_attribute( VectorAttribute * disk,
|
||||
ImageType& img_type,
|
||||
string& dev_prefix)
|
||||
int Image::disk_attribute( VectorAttribute * disk,
|
||||
ImageType& img_type,
|
||||
string& dev_prefix,
|
||||
const vector<string>& inherit_attrs)
|
||||
{
|
||||
string target;
|
||||
string driver;
|
||||
string disk_attr_type;
|
||||
string inherit_val;
|
||||
|
||||
bool ro;
|
||||
|
||||
ostringstream iid;
|
||||
|
||||
vector<string>::const_iterator it;
|
||||
|
||||
img_type = type;
|
||||
target = disk->vector_value("TARGET");
|
||||
driver = disk->vector_value("DRIVER");
|
||||
@@ -614,6 +618,16 @@ int Image::disk_attribute( VectorAttribute * disk,
|
||||
disk->replace("TARGET", template_target);
|
||||
}
|
||||
|
||||
for (it = inherit_attrs.begin(); it != inherit_attrs.end(); it++)
|
||||
{
|
||||
get_template_attribute((*it).c_str(), inherit_val);
|
||||
|
||||
if (!inherit_val.empty())
|
||||
{
|
||||
disk->replace(*it, inherit_val);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ void ImageManager::monitor_datastore(int ds_id)
|
||||
|
||||
oss << "Monitoring datastore " << ds->get_name() << " (" << ds_id << ")";
|
||||
|
||||
NebulaLog::log("InM", Log::INFO, oss);
|
||||
NebulaLog::log("InM", Log::DEBUG, oss);
|
||||
|
||||
ds->unlock();
|
||||
|
||||
|
||||
@@ -195,7 +195,8 @@ static int cp_action(istringstream& is,
|
||||
|
||||
image->unlock();
|
||||
|
||||
NebulaLog::log("ImM", Log::INFO, "Image copied and ready to use.");
|
||||
oss << "Image (" << id << ") copied and ready to use.";
|
||||
NebulaLog::log("ImM", Log::INFO, oss);
|
||||
|
||||
return ds_id;
|
||||
|
||||
@@ -661,7 +662,7 @@ static void monitor_action(istringstream& is,
|
||||
|
||||
oss << "Datastore " << ds_name << " (" << id << ") successfully monitored.";
|
||||
|
||||
NebulaLog::log("ImM", Log::INFO, oss);
|
||||
NebulaLog::log("ImM", Log::DEBUG, oss);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+28
-10
@@ -31,20 +31,38 @@ string ImagePool::_default_dev_prefix;
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
ImagePool::ImagePool(SqlDB * db,
|
||||
const string& __default_type,
|
||||
const string& __default_dev_prefix,
|
||||
vector<const Attribute *>& restricted_attrs,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location)
|
||||
ImagePool::ImagePool(
|
||||
SqlDB * db,
|
||||
const string& __default_type,
|
||||
const string& __default_dev_prefix,
|
||||
vector<const Attribute *>& restricted_attrs,
|
||||
vector<const Attribute *> hook_mads,
|
||||
const string& remotes_location,
|
||||
const vector<const Attribute *>& _inherit_image_attrs,
|
||||
const vector<const Attribute *>& _inherit_datastore_attrs)
|
||||
:PoolSQL(db, Image::table, true)
|
||||
{
|
||||
ostringstream sql;
|
||||
|
||||
// Init static defaults
|
||||
_default_type = __default_type;
|
||||
_default_dev_prefix = __default_dev_prefix;
|
||||
|
||||
// Init inherit attributes
|
||||
vector<const Attribute *>::const_iterator it;
|
||||
|
||||
for (it = _inherit_image_attrs.begin(); it != _inherit_image_attrs.end(); it++)
|
||||
{
|
||||
const SingleAttribute* sattr = static_cast<const SingleAttribute *>(*it);
|
||||
|
||||
inherit_image_attrs.push_back(sattr->value());
|
||||
}
|
||||
|
||||
for (it = _inherit_datastore_attrs.begin(); it != _inherit_datastore_attrs.end(); it++)
|
||||
{
|
||||
const SingleAttribute* sattr = static_cast<const SingleAttribute *>(*it);
|
||||
|
||||
inherit_datastore_attrs.push_back(sattr->value());
|
||||
}
|
||||
|
||||
// Set default type
|
||||
if (_default_type != "OS" &&
|
||||
_default_type != "CDROM" &&
|
||||
@@ -385,7 +403,7 @@ int ImagePool::disk_attribute(int vm_id,
|
||||
Datastore * ds;
|
||||
|
||||
iid = img->get_oid();
|
||||
rc = img->disk_attribute(disk, img_type, dev_prefix);
|
||||
rc = img->disk_attribute(disk, img_type, dev_prefix, inherit_image_attrs);
|
||||
|
||||
image_id = img->get_oid();
|
||||
datastore_id = img->get_ds_id();
|
||||
@@ -410,7 +428,7 @@ int ImagePool::disk_attribute(int vm_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ds->disk_attribute(disk);
|
||||
ds->disk_attribute(disk, inherit_datastore_attrs);
|
||||
|
||||
ds->unlock();
|
||||
}
|
||||
|
||||
@@ -855,6 +855,9 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose, int& imag
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_etime(the_time);
|
||||
|
||||
@@ -47,6 +47,9 @@ void LifeCycleManager::save_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_previous_etime(the_time);
|
||||
@@ -85,6 +88,9 @@ void LifeCycleManager::save_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_running_etime(the_time);
|
||||
@@ -115,6 +121,9 @@ void LifeCycleManager::save_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_epilog_stime(the_time);
|
||||
@@ -509,6 +518,9 @@ void LifeCycleManager::shutdown_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_epilog_stime(the_time);
|
||||
@@ -533,6 +545,9 @@ void LifeCycleManager::shutdown_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_running_etime(the_time);
|
||||
@@ -559,6 +574,9 @@ void LifeCycleManager::shutdown_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_epilog_stime(the_time);
|
||||
@@ -987,6 +1005,9 @@ void LifeCycleManager::cancel_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_reason(History::USER);
|
||||
@@ -1013,6 +1034,9 @@ void LifeCycleManager::cancel_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_epilog_stime(the_time);
|
||||
@@ -1037,6 +1061,9 @@ void LifeCycleManager::cancel_success_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_running_etime(the_time);
|
||||
@@ -1172,6 +1199,9 @@ void LifeCycleManager::monitor_suspend_action(int vid)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_running_etime(the_time);
|
||||
@@ -1255,6 +1285,9 @@ void LifeCycleManager::failure_action(VirtualMachine * vm)
|
||||
|
||||
vm->delete_snapshots();
|
||||
|
||||
map<string, string> empty;
|
||||
vm->update_info(0, 0, -1, -1, empty);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_etime(the_time);
|
||||
|
||||
@@ -148,6 +148,33 @@ function exec_and_log
|
||||
fi
|
||||
}
|
||||
|
||||
# Executes a command, if it fails returns error message and exits. Similar to
|
||||
# exec_and_log, except that it allows multiline commands.
|
||||
# If a second parameter is present it is used as the error message when
|
||||
# the command fails.
|
||||
function multiline_exec_and_log
|
||||
{
|
||||
message=$2
|
||||
|
||||
EXEC_LOG_ERR=`bash -s 2>&1 1>/dev/null <<EOF
|
||||
export LANG=C
|
||||
export LC_ALL=C
|
||||
$1
|
||||
EOF`
|
||||
EXEC_LOG_RC=$?
|
||||
|
||||
if [ $EXEC_LOG_RC -ne 0 ]; then
|
||||
log_error "Command \"$1\" failed: $EXEC_LOG_ERR"
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
error_message "$2"
|
||||
else
|
||||
error_message "Error executing $1: $EXEC_LOG_ERR"
|
||||
fi
|
||||
exit $EXEC_LOG_RC
|
||||
fi
|
||||
}
|
||||
|
||||
# Like exec_and_log but does not exit on failure. Just sets the variable
|
||||
# ERROR to the error message.
|
||||
function exec_and_set_error
|
||||
@@ -367,6 +394,9 @@ EOF`
|
||||
fi
|
||||
}
|
||||
|
||||
# TODO -> Use a dynamically loaded scripts directory. Not removing this due
|
||||
# to iSCSI addon: https://github.com/OpenNebula/addon-iscsi
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# iSCSI functions
|
||||
|
||||
+15
-2
@@ -555,6 +555,10 @@ void Nebula::start(bool bootstrap_only)
|
||||
vector<const Attribute *> vm_restricted_attrs;
|
||||
vector<const Attribute *> img_restricted_attrs;
|
||||
|
||||
vector<const Attribute *> inherit_image_attrs;
|
||||
vector<const Attribute *> inherit_datastore_attrs;
|
||||
vector<const Attribute *> inherit_vnet_attrs;
|
||||
|
||||
clpool = new ClusterPool(db);
|
||||
docpool = new DocumentPool(db);
|
||||
|
||||
@@ -568,6 +572,10 @@ void Nebula::start(bool bootstrap_only)
|
||||
nebula_configuration->get("VM_RESTRICTED_ATTR", vm_restricted_attrs);
|
||||
nebula_configuration->get("IMAGE_RESTRICTED_ATTR", img_restricted_attrs);
|
||||
|
||||
nebula_configuration->get("INHERIT_IMAGE_ATTR", inherit_image_attrs);
|
||||
nebula_configuration->get("INHERIT_DATASTORE_ATTR", inherit_datastore_attrs);
|
||||
nebula_configuration->get("INHERIT_VNET_ATTR", inherit_vnet_attrs);
|
||||
|
||||
nebula_configuration->get("VM_MONITORING_EXPIRATION_TIME",vm_expiration);
|
||||
nebula_configuration->get("HOST_MONITORING_EXPIRATION_TIME",host_expiration);
|
||||
|
||||
@@ -593,7 +601,8 @@ void Nebula::start(bool bootstrap_only)
|
||||
mac_prefix,
|
||||
size,
|
||||
vnet_hooks,
|
||||
remotes_location);
|
||||
remotes_location,
|
||||
inherit_vnet_attrs);
|
||||
|
||||
gpool = new GroupPool(db, group_hooks, remotes_location);
|
||||
|
||||
@@ -609,7 +618,9 @@ void Nebula::start(bool bootstrap_only)
|
||||
default_device_prefix,
|
||||
img_restricted_attrs,
|
||||
image_hooks,
|
||||
remotes_location);
|
||||
remotes_location,
|
||||
inherit_image_attrs,
|
||||
inherit_datastore_attrs);
|
||||
|
||||
tpool = new VMTemplatePool(db);
|
||||
|
||||
@@ -989,6 +1000,8 @@ void Nebula::start(bool bootstrap_only)
|
||||
|
||||
NebulaLog::log("ONE", Log::INFO, "All modules finalized, exiting.\n");
|
||||
|
||||
return;
|
||||
|
||||
error_mad:
|
||||
NebulaLog::log("ONE", Log::ERROR, "Could not load driver");
|
||||
throw runtime_error("Could not load an OpenNebula driver");
|
||||
|
||||
@@ -32,7 +32,7 @@ public class OneSystem
|
||||
private static final String GROUP_QUOTA_INFO = "groupquota.info";
|
||||
private static final String GROUP_QUOTA_UPDATE = "groupquota.update";
|
||||
|
||||
public static final String VERSION = "4.3.80";
|
||||
public static final String VERSION = "4.3.85";
|
||||
|
||||
public OneSystem(Client client)
|
||||
{
|
||||
|
||||
@@ -390,7 +390,7 @@ VM_MAD = [ name="dummy", executable="one_vmm_dummy", type="xml" ]
|
||||
|
||||
TM_MAD = [
|
||||
executable = "one_tm",
|
||||
arguments = "-t 15 -d dummy,lvm,shared,shared_lvm,qcow2,ssh,vmfs,iscsi,ceph"
|
||||
arguments = "-t 15 -d dummy,lvm,shared,shared_lvm,qcow2,ssh,vmfs,ceph"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
@@ -442,13 +442,6 @@ TM_MAD_CONF = [
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "iscsi",
|
||||
ln_target = "NONE",
|
||||
clone_target= "SELF",
|
||||
shared = "yes"
|
||||
]
|
||||
|
||||
TM_MAD_CONF = [
|
||||
name = "ceph",
|
||||
ln_target = "NONE",
|
||||
@@ -471,7 +464,7 @@ TM_MAD_CONF = [
|
||||
|
||||
DATASTORE_MAD = [
|
||||
executable = "one_datastore",
|
||||
arguments = "-t 15 -d dummy,fs,vmfs,iscsi,lvm,ceph"
|
||||
arguments = "-t 15 -d dummy,fs,vmfs,lvm,ceph"
|
||||
]
|
||||
|
||||
#*******************************************************************************
|
||||
|
||||
@@ -54,5 +54,5 @@ require 'opennebula/system'
|
||||
module OpenNebula
|
||||
|
||||
# OpenNebula version
|
||||
VERSION = '4.3.80'
|
||||
VERSION = '4.3.85'
|
||||
end
|
||||
@@ -14,16 +14,16 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# Default IQN path
|
||||
BASE_IQN=iqn.2012-02.org.opennebula
|
||||
module Migrator
|
||||
def db_version
|
||||
"4.3.85"
|
||||
end
|
||||
|
||||
# Default volume group
|
||||
VG_NAME=vg-one
|
||||
def one_version
|
||||
"OpenNebula 4.3.85"
|
||||
end
|
||||
|
||||
# Lists of hosts (separated by spaces) for which no iscsiadm login or logout
|
||||
# is performed.
|
||||
NO_ISCSI="$HOSTNAME"
|
||||
|
||||
# File where the iSCSI configured is dumped to (tgt-admin --dump)
|
||||
# If it poings to /dev/null, iSCSI targets will not be persistent
|
||||
TARGET_CONF=/etc/tgt/targets.conf
|
||||
def up
|
||||
return true
|
||||
end
|
||||
end
|
||||
Loaded 100 of 144 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user