mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
feature #1613: Checks on monitor callback
This commit is contained in:
1 parent
032f5ca47e
commit
622a0edbaf
1 file changed
+19
-1
@@ -582,14 +582,32 @@ static void monitor_action(istringstream& is,
|
||||
const string& result)
|
||||
{
|
||||
string dsinfo64;
|
||||
string *dsinfo;
|
||||
string *dsinfo = 0;
|
||||
|
||||
ostringstream oss;
|
||||
|
||||
getline (is, dsinfo64);
|
||||
|
||||
if (is.fail())
|
||||
{
|
||||
oss << "Error monitoring datastore " << id << ". Bad monitor data: "
|
||||
<< dsinfo64;
|
||||
|
||||
NebulaLog::log("ImM", Log::ERROR, oss);
|
||||
return;
|
||||
}
|
||||
|
||||
dsinfo = one_util::base64_decode(dsinfo64);
|
||||
|
||||
if (dsinfo == 0)
|
||||
{
|
||||
oss << "Error monitoring datastore " << id << ". Bad monitor data: "
|
||||
<< dsinfo64;
|
||||
|
||||
NebulaLog::log("ImM", Log::ERROR, oss);
|
||||
return;
|
||||
}
|
||||
|
||||
if (result != "SUCCESS")
|
||||
{
|
||||
oss << "Error monitoring datastore " << id << ": " << *dsinfo;
|
||||
|
||||
Reference in new issue
Block a user