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

Feature #1112: Fix bug in cluster requirements generation

This commit is contained in:
Carlos Martín 2012-03-15 17:19:27 +01:00
parent 6dc08dbfa6
commit 2eec562361

View File

@ -512,7 +512,7 @@ int VirtualMachine::automatic_requirements(string& error_str)
ostringstream oss;
string requirements;
string cluster_id;
string cluster_id = "";
string vatt_cluster_id;
// Get cluster id from all DISK vector attributes
@ -532,7 +532,7 @@ int VirtualMachine::automatic_requirements(string& error_str)
if ( !vatt_cluster_id.empty() )
{
if ( cluster_id != vatt_cluster_id )
if ( !cluster_id.empty() && cluster_id != vatt_cluster_id )
{
goto error;
}
@ -559,7 +559,7 @@ int VirtualMachine::automatic_requirements(string& error_str)
if ( !vatt_cluster_id.empty() )
{
if ( cluster_id != vatt_cluster_id )
if ( !cluster_id.empty() && cluster_id != vatt_cluster_id )
{
goto error;
}