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

Bug #1083: Better handling of RM FAILURE in ImageManagerDriver

This commit is contained in:
Carlos Martín 2012-01-24 09:20:37 -08:00
parent 78d9b65b85
commit 8c348ca259

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);