From 2eec562361fa11b4a5e8802475be6ca09f2ac6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Thu, 15 Mar 2012 17:19:27 +0100 Subject: [PATCH] Feature #1112: Fix bug in cluster requirements generation --- src/vm/VirtualMachine.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vm/VirtualMachine.cc b/src/vm/VirtualMachine.cc index f11f91ac70..87e6a19943 100644 --- a/src/vm/VirtualMachine.cc +++ b/src/vm/VirtualMachine.cc @@ -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; }