mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug #1295: If an image is successfully CP/CLONE/MKFS, but it no longer exists log messages is generated to check the datastore
This commit is contained in:
parent
30d571036b
commit
caab59b038
@ -138,6 +138,24 @@ static void cp_action(istringstream& is,
|
||||
|
||||
if ( image == 0 )
|
||||
{
|
||||
if (result == "SUCCESS")
|
||||
{
|
||||
ostringstream oss;
|
||||
|
||||
if ( is.good())
|
||||
{
|
||||
is >> source >> ws;
|
||||
}
|
||||
|
||||
if (!source.empty())
|
||||
{
|
||||
oss << "CP operation succeeded but image no longer exists."
|
||||
<< " Source image: " << source << ", may be left in datastore";
|
||||
|
||||
NebulaLog::log("ImM", Log::ERROR, oss);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -224,6 +242,24 @@ static void clone_action(istringstream& is,
|
||||
|
||||
if ( image == 0 )
|
||||
{
|
||||
if (result == "SUCCESS")
|
||||
{
|
||||
ostringstream oss;
|
||||
|
||||
if ( is.good())
|
||||
{
|
||||
is >> source >> ws;
|
||||
}
|
||||
|
||||
if (!source.empty())
|
||||
{
|
||||
oss << "CLONE operation succeeded but image no longer exists."
|
||||
<< " Source image: " << source << ", may be left in datastore";
|
||||
|
||||
NebulaLog::log("ImM", Log::ERROR, oss);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -310,6 +346,24 @@ static void mkfs_action(istringstream& is,
|
||||
|
||||
if ( image == 0 )
|
||||
{
|
||||
if (result == "SUCCESS")
|
||||
{
|
||||
ostringstream oss;
|
||||
|
||||
if ( is.good())
|
||||
{
|
||||
is >> source >> ws;
|
||||
}
|
||||
|
||||
if (!source.empty())
|
||||
{
|
||||
oss << "MkFS operation succeeded but image no longer exists."
|
||||
<< " Source image: " << source << ", may be left in datastore";
|
||||
|
||||
NebulaLog::log("ImM", Log::ERROR, oss);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user