Bug #1083: Better handling of RM FAILURE in ImageManagerDriver

(cherry picked from commit 8c348ca259)
This commit is contained in:
Carlos Martín committed 2012-01-24 09:22:26 -08:00
1 parent aa60b0f5ac
commit 5a67956e68
1 file changed
+14 -2
+14 -2
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);