1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #5081: oned monitoring API bug with PostgreSQL (#5087)

Signed-off-by: Romanov Andrey Grigorievich <romanov.andrey.grigorievich@gmail.com>

Co-authored-by: Romanov Andrey Grigorievich <romanov.andrey.grigorievich@gmail.com>
(cherry picked from commit c9d360d6f51c51a41bc62d01bb7f88c7c048588b)
This commit is contained in:
arg7 2020-09-23 16:55:58 +02:00 committed by Ruben S. Montero
parent 0e4b9a631c
commit dc09fa7d10
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -332,12 +332,11 @@ int VirtualMachinePool::dump_monitoring(
cmd << "SELECT " << one_db::vm_monitor_table << ".body FROM "
<< one_db::vm_monitor_table
<< " INNER JOIN " << one_db::vm_table
<< " WHERE vmid = oid";
<< " INNER JOIN " << one_db::vm_table << " ON vmid = oid";
if ( !where.empty() )
{
cmd << " AND " << where;
cmd << " WHERE " << where;
}
cmd << " ORDER BY vmid, " << one_db::vm_monitor_table << ".last_poll;";