[one-users] onevnet policy violation?

Carlos Martín Sánchez cmartin at opennebula.org
Thu Jan 30 08:22:33 PST 2014


Hi Stefan,

On Thu, Jan 30, 2014 at 9:18 AM, Stefan Kooman <stefan at bit.nl> wrote:

> Hi,
>
> I created a new vnet based on the following template:
>
> --- template start ---
> NAME    = "v-test01"
> TYPE    = "ranged"
> BRIDGE  = "uplink"
> CLUSTER = "kvm_cluster"
>
> NETWORK_ADDRESS = 172.17.226.0
> NETWORK_MASK    = 255.255.255.224
> IP_START        = 172.17.226.4
> IP_END          = 172.17.226.30
>
> GATEWAY         = 172.17.226.1
>
> VLAN    = "YES"
> VLAN_ID = 226
> --- template end ---
>
> After creation the vnet is not a member of the kvm_cluster but instead
> of the default cluster "-". Is this a bug or is it me doing it wrong?
> After reading [1] again it explicitly states a "vnet or datastore"
> should be added with the onecluster add command, so I was doing it
> wrong. It still would be nice to have it automatically added to a
> cluster if "CLUSTER" attribute is there.
>

You can create vnets directly in a cluster, using the --cluster option [1],
but not with the CLUSTER attribute [2].
I agree that since the new vnet is defined with a template, it is more
intuitive to set the cluster also there, so I've opened a ticket for this
[3].


> After that  I instantiated a vm based on a template with a mix of
> resources from "kvm_cluster" and "-" (v-test01). This vm succesfully
> managed to get into running state. According to [1] section "The Default
> Cluster 'None'" hosts in the Cluster 'none' will only run VMs using
> resources without a cluster. I assume this is equally true for hosts
> that are a member of a non-default cluster (kvm_cluster in our case) but
> instead it did run the vm. Indeed, according to "The "Scheduling and
> Cluster" section of [1] the deployment should have failed. What info do
> we need to make sure it's a bug and not PEBKAC?
>
> Gr. Stefan
>
> [1]:
>
> http://docs.opennebula.org/4.4/administration/hosts_and_clusters/cluster_guide.html


This is a bit hard to explain easily in the docs, but the key is this
paragraph [4]:

Virtual Machines using resources from Datastores or Virtual Networks in the
Cluster 'none' can be deployed in any Host, which must be properly
configured.

That is, your vnet is not in any cluster (or cluster 'none'), which means
that all hosts (either in cluster none or any other cluster) will be able
to deploy the VM.
The core sees that you are requesting something specific to cluster
kvm_cluster and a vnet that is configured to be used by any Host, including
those in kvm_cluster.

If you try to create a VM using resources from two different clusters, the
core will complain on creation, it won't wait for the scheduler to notice.


This may be a bit convoluted, but the other option we had was to force you
to put everything in a cluster. That would mean that you can't configure a
network to be used by both xen and kvm hosts.
In future versions, we may change this and allow to select more than one
cluster for each host/vnet/ds...

Regards

[1] http://docs.opennebula.org/doc/4.4/cli/onevnet.1.html
[2] http://docs.opennebula.org/4.4/user/references/vnet_template.html
[3] http://dev.opennebula.org/issues/2698
[4]
http://docs.opennebula.org/4.4/administration/hosts_and_clusters/cluster_guide.html#the-default-cluster-none
--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org <http://www.opennebula.org/> | cmartin at opennebula.org |
@OpenNebula <http://twitter.com/opennebula>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140130/1429a7c0/attachment-0002.htm>


More information about the Users mailing list