1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-27 14:03:40 +03:00

Bug #1083: Better handling of RM FAILURE in ImageManagerDriver

(cherry picked from commit 8c348ca259e90c953e07a5101c499e6c1b1ea98e)
This commit is contained in:
Carlos Martín 2012-01-24 09:20:37 -08:00
parent aa60b0f5ac
commit 5a67956e68

View File

@ -228,13 +228,12 @@ void ImageManagerDriver::protocol(
if ( rc < 0 )
{
image->unlock();
NebulaLog::log("ImM",Log::ERROR,"Image could not be removed from DB");
}
if ( result == "SUCCESS" )
{
NebulaLog::log("ImM",Log::ERROR,"Image successfully removed.");
NebulaLog::log("ImM",Log::INFO,"Image successfully removed.");
}
else
{
@ -267,10 +266,23 @@ error_mkfs:
goto error_common;
error_rm:
image->unlock();
os.str("");
os << "Error removing image from repository. Remove file " << source
<< " to completely delete image.";
getline(is,info);
if (!info.empty() && (info[0] != '-'))
{
os << ": " << info;
}
NebulaLog::log("ImM", Log::ERROR, os);
return;
error_common:
getline(is,info);