Bug #3883
Attach disk doesn't check cluster compatibility.
Status: | Closed | Start date: | 07/22/2015 | ||
---|---|---|---|---|---|
Priority: | High | Due date: | |||
Assignee: | Guillaume Oberlé | % Done: | 80% | ||
Category: | Core & System | ||||
Target version: | Release 4.14 | ||||
Resolution: | fixed | Pull request: | |||
Affected Versions: | Development |
Description
Attaching a disk doesn't check that the datastore of the image is in the same cluster as the host where the VM is running. The template instantiation seems not impacted by the bug, the scheduler returns an error if the image datastore are in different clusters.
Example : I have two cluster and each cluster have it's own image/system datastore assigned. I create a new VM in cluster1 and I'm able to attach a disk from the image datastore assigned to cluster 2. This is problematic because, imagine you have a cluster with hypervisors configured for ceph storage (no disks) and another one with hypervisors that have local storage, you don't want users to be able to assign local disks on VMs in the Ceph cluster.
In fact it's a bit more complicated than that, here are the 4 different possibilities I saw :
- VM's host and the image datastore are in the same cluster => should allowed to attach disk.
- VM's host is in a cluster and the image datastore is not in a cluster => should allowed to attach disk (the datastore is considered available for every cluster).
- VM's host is not in a cluster and the image datastore is in a cluster => should not allowed to attach disk (the datastore is reserved for the cluster).
- VM's host is in a cluster and the image datastore is in another cluster => should not allowed to attach disk.
Related issues
Associated revisions
Bug #3883: Attach disk doesn't check cluster compatibility. It also sets all
output values in set_up_attach_disk. Changed some checks in
DispatchManager::attach
(cherry picked from commit 4227b80cc54c66c36846eee904964c9187d445a1)
History
#1 Updated by Carlos Martín almost 6 years ago
- Related to Feature #1803: Attach NIC operation should check Cluster constraints added
#2 Updated by Guillaume Oberlé almost 6 years ago
- Assignee set to Guillaume Oberlé
- % Done changed from 0 to 80
Pull request : https://github.com/OpenNebula/one/pull/68.
Any comments and/or review will be appreciated :).
#3 Updated by Ruben S. Montero almost 6 years ago
- Status changed from Pending to Closed
- Target version set to Release 4.14
- Resolution set to fixed
Merged. THANKS!