mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Bug #1306: Fix bug, deployment didn't work for Hosts in cluster -1 (none)
This commit is contained in:
parent
df0e1ce13a
commit
54dccb3a46
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user