1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Merge branch 'feature-1112' of git.opennebula.org:one into feature-1112

This commit is contained in:
Carlos Martín 2012-02-28 17:31:12 +01:00
commit 7b9e27cffd
2 changed files with 20 additions and 15 deletions

View File

@ -99,8 +99,8 @@ if [ -z "$ROOT" ] ; then
VAR_LOCATION="/var/lib/one"
SUNSTONE_LOCATION="$LIB_LOCATION/sunstone"
OZONES_LOCATION="$LIB_LOCATION/ozones"
SYSTEM_DS_LOCATION="$VAR_LOCATION/system_ds"
DEFAULT_DS_LOCATION="$VAR_LOCATION/default_ds"
SYSTEM_DS_LOCATION="$VAR_LOCATION/datastores/system"
DEFAULT_DS_LOCATION="$VAR_LOCATION/datastores/default"
RUN_LOCATION="/var/run/one"
LOCK_LOCATION="/var/lock/one"
INCLUDE_LOCATION="/usr/include"
@ -146,8 +146,8 @@ else
VAR_LOCATION="$ROOT/var"
SUNSTONE_LOCATION="$LIB_LOCATION/sunstone"
OZONES_LOCATION="$LIB_LOCATION/ozones"
SYSTEM_DS_LOCATION="$VAR_LOCATION/system_ds"
DEFAULT_DS_LOCATION="$VAR_LOCATION/default_ds"
SYSTEM_DS_LOCATION="$VAR_LOCATION/datastores/system"
DEFAULT_DS_LOCATION="$VAR_LOCATION/datastores/default"
INCLUDE_LOCATION="$ROOT/include"
SHARE_LOCATION="$ROOT/share"
MAN_LOCATION="$ROOT/share/man/man1"

View File

@ -26,10 +26,10 @@
/* from ID 100 */
/* -------------------------------------------------------------------------- */
const string DatastorePool::SYSTEM_DS_NAME = "system_ds";
const string DatastorePool::SYSTEM_DS_NAME = "system";
const int DatastorePool::SYSTEM_DS_ID = 0;
const string DatastorePool::DEFAULT_DS_NAME = "default_ds";
const string DatastorePool::DEFAULT_DS_NAME = "default";
const int DatastorePool::DEFAULT_DS_ID = 1;
/* -------------------------------------------------------------------------- */
@ -43,17 +43,22 @@ DatastorePool::DatastorePool(SqlDB * db):
if (get_lastOID() == -1) //lastOID is set in PoolSQL::init_cb
{
int rc;
DatastoreTemplate * ds_tmpl;
int rc;
string base_path;
Nebula& nd = Nebula::instance();
base_path = nd.get_var_location() + "datastores/";
// ---------------------------------------------------------------------
// Create the system datastore
// ---------------------------------------------------------------------
oss << "NAME = " << SYSTEM_DS_NAME << endl
<< "BASE_PATH = /var/lib/one/system_ds" << endl
<< "TYPE = fs" << endl
<< "TM_MAD = tm_shared";
oss << "NAME = " << SYSTEM_DS_NAME << endl
<< "BASE_PATH = " << base_path << "system"<< endl
<< "TYPE = fs" << endl
<< "TM_MAD = tm_shared";
ds_tmpl = new DatastoreTemplate;
rc = ds_tmpl->parse_str_or_xml(oss.str(), error_str);
@ -79,10 +84,10 @@ DatastorePool::DatastorePool(SqlDB * db):
// ---------------------------------------------------------------------
oss.str("");
oss << "NAME = " << DEFAULT_DS_NAME << endl
<< "BASE_PATH = /var/lib/one/default_ds" << endl
<< "TYPE = fs" << endl
<< "TM_MAD = tm_shared";
oss << "NAME = " << DEFAULT_DS_NAME << endl
<< "BASE_PATH = " << base_path << "default" << endl
<< "TYPE = fs" << endl
<< "TM_MAD = tm_shared";
ds_tmpl = new DatastoreTemplate;
rc = ds_tmpl->parse_str_or_xml(oss.str(), error_str);