mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-17 02:03:15 +09:00
Bug #1306: Fix bug, deployment didn't work for Hosts in cluster -1 (none)
This commit is contained in:
1 parent
df0e1ce13a
commit
54dccb3a46
1 file changed
+18
-11
@@ -134,20 +134,27 @@ int RequestManagerVirtualMachine::get_host_information(int hid,
|
||||
|
||||
host->unlock();
|
||||
|
||||
cluster = nd.get_clpool()->get(cluster_id, true);
|
||||
|
||||
if ( cluster == 0 )
|
||||
if ( cluster_id != -1 )
|
||||
{
|
||||
failure_response(NO_EXISTS,
|
||||
get_error(object_name(PoolObjectSQL::CLUSTER),cluster_id),
|
||||
att);
|
||||
cluster = nd.get_clpool()->get(cluster_id, true);
|
||||
|
||||
return -1;
|
||||
if ( cluster == 0 )
|
||||
{
|
||||
failure_response(NO_EXISTS,
|
||||
get_error(object_name(PoolObjectSQL::CLUSTER),cluster_id),
|
||||
att);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
ds_id = cluster->get_ds_id();
|
||||
|
||||
cluster->unlock();
|
||||
}
|
||||
else
|
||||
{
|
||||
ds_id = DatastorePool::SYSTEM_DS_ID;
|
||||
}
|
||||
|
||||
ds_id = cluster->get_ds_id();
|
||||
|
||||
cluster->unlock();
|
||||
|
||||
ds = nd.get_dspool()->get(ds_id, true);
|
||||
|
||||
|
||||
Reference in new issue
Block a user