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

Merge branch 'master' of git.opennebula.org:one

This commit is contained in:
Tino Vazquez 2012-01-26 16:29:58 +01:00
commit acfd5902eb
5 changed files with 45 additions and 5 deletions

View File

@ -817,6 +817,7 @@ ONEDB_MIGRATOR_FILES="src/onedb/2.0_to_2.9.80.rb \
src/onedb/3.0.0_to_3.1.0.rb \
src/onedb/3.1.0_to_3.1.80.rb \
src/onedb/3.1.80_to_3.2.0.rb \
src/onedb/3.2.0_to_3.2.1.rb \
src/onedb/onedb.rb \
src/onedb/onedb_backend.rb"

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2012, OpenNebula Project Leads (OCCI.org) */
/* Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) */
/* */
/* 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 */

View File

@ -0,0 +1,28 @@
# -------------------------------------------------------------------------- *
# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) #
# 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. *
# -------------------------------------------------------------------------- *
module Migrator
def db_version
"3.2.1"
end
def one_version
"OpenNebula 3.2.1"
end
def up
return true
end
end

View File

@ -356,7 +356,11 @@ void PoolSQL::update_cache_index(string& old_name,
if ( index != name_pool.end() )
{
name_pool.erase(old_key);
name_pool.insert(make_pair(new_key, index->second));
if ( name_pool.find(new_key) == name_pool.end())
{
name_pool.insert(make_pair(new_key, index->second));
}
}
unlock();

View File

@ -69,6 +69,9 @@ void RequestManagerChown::request_execute(xmlrpc_c::paramList const& paramList,
PoolObjectSQL * object;
string obj_name;
int old_uid;
// ------------- Check new user and group id's ---------------------
if ( noid > -1 )
@ -138,12 +141,11 @@ void RequestManagerChown::request_execute(xmlrpc_c::paramList const& paramList,
if ( noid != -1 )
{
string obj_name = object->get_name();
int old_uid = object->get_uid();
obj_name = object->get_name();
old_uid = object->get_uid();
object->set_user(noid,nuname);
pool->update_cache_index(obj_name, old_uid, obj_name, noid);
}
if ( ngid != -1 )
@ -155,6 +157,11 @@ void RequestManagerChown::request_execute(xmlrpc_c::paramList const& paramList,
object->unlock();
if ( noid != -1 )
{
pool->update_cache_index(obj_name, old_uid, obj_name, noid);
}
success_response(oid, att);
return;