Feature #1666
Allow multiple VNET to have the same name
Status: | Closed | Start date: | 11/27/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Core & System | |||
Target version: | - | |||
Resolution: | wontfix | Pull request: |
Description
When a VNET is created in OpenNebula a name is provided. That name currently has to be unique. It would be useful to allow multiple VNET to have the same name, and then VM Template that refer to a VNET using its name to be able to retrieve an IP address in any of the VNET that share that name. For example:
ID | NAME | IP RANGE
1 | Public | 1.1.1.1 1.1.1.254
2 | Public | 2.1.1.1 2.1.1.254
A VM template having a NIC = [ NETWORK = "Public" ] definition would be able to pick IP addresses from VNET ID 1 or ID 2, whatever lease is available in any of these network.
Related issues
History
#1 Updated by Simon Boulet over 8 years ago
Hi,
My use case is the following:
I have a few "clusters" in OpenNebula. Each cluster have their own public network/VLAN. I have 1 VNET assigned to each cluster. Right now I can't have VNETs having the same name, so I use, ex.:
Public-ClusterA
Public-ClusterB
Public-ClusterC
When deploying new VMs I don't necessarily care on which cluster they end up. The problem is I have to specify the VNET ID (or name) in my template, Ex.:
NIC[ NETWORK="Public-ClusterA" ]
I though I could use "OR" statements in my VM NIC definition, but this doesn't work. Ex.:
NIC=[ NETWORK_ID="7|8" ]
To pick either NETWORK_ID 7 or 8.
So, we could either allow multiple VNET to have the same name (then we could have NETWORK="Public" and match any cluster) or allow "OR" network definition to specify multiple networks (ex. NETWORK="Public-ClusterA|Public-ClusterB" or NETWORK_ID="1|2").
Thanks
Simon
#2 Updated by Ruben S. Montero over 8 years ago
In your case, if you do not associate the networks to any cluster means that it could be used in all of them. So a single Public network (not associated to any cluster) will work in your case, right?
The problem here is that you may want to add a network to a cluster subset (not all). Initially, we do not like the idea of a resource spawning multiple clusters, as we want to model physical clusters (i.e. each rack with it's network switches, storage...)
I'd say that changing the name uniqueness for networks is a path we do not want to follow (we've previously tried that in previous versions and we ended with the current schema unique names in the user scope).
Simon Boulet wrote:
Hi,
My use case is the following:
I have a few "clusters" in OpenNebula. Each cluster have their own public network/VLAN. I have 1 VNET assigned to each cluster. Right now I can't have VNETs having the same name, so I use, ex.:
Public-ClusterA
Public-ClusterB
Public-ClusterCWhen deploying new VMs I don't necessarily care on which cluster they end up. The problem is I have to specify the VNET ID (or name) in my template, Ex.:
NIC[ NETWORK="Public-ClusterA" ]
I though I could use "OR" statements in my VM NIC definition, but this doesn't work. Ex.:
NIC=[ NETWORK_ID="7|8" ]
To pick either NETWORK_ID 7 or 8.
So, we could either allow multiple VNET to have the same name (then we could have NETWORK="Public" and match any cluster) or allow "OR" network definition to specify multiple networks (ex. NETWORK="Public-ClusterA|Public-ClusterB" or NETWORK_ID="1|2").
Thanks
Simon
#3 Updated by Ruben S. Montero about 8 years ago
Closing this one the #1727 may help in this scenario also...
#4 Updated by Ruben S. Montero about 8 years ago
- Category set to Core & System
- Status changed from New to Closed
- Resolution set to wontfix
#5 Updated by Simon Boulet about 8 years ago
Hi Ruben
Ruben S. Montero wrote:
Closing this one the #1727 may help in this scenario also...
Humm I think you got the bug number wrong.
I'm still having issue with this. Let me re-explain what I'm trying to achieve.
I have 2 clusters in an OpenNebula installation. The 2 clusters are independent, they don't share the same IP space. I create 2 Virtual networks, 1 for each cluster. Now, I provide my users with predefined templates, very similar to Amazon Small, Medium, Large. Sometime, I don't mind on which cluster my clients ends up.. So, I would like them to instantiate the template of their choice, and the Virtual network to be assigned to be the one that is available on the cluster the VM ends up being deployed to. Does that make sense?
My initial idea was to allow multiple networks with the same name (name "Public" in my example), have NIC[NETWORK="Public"] set in my template, and OpenNebula would pick the right "Public" network that is available to the cluster.
Another idea would be to add support for Cluster variables and NIC substitution. I could set a DEFAULT_NETWORK variable in my Cluster and use NIC[NETWORK="$CLUSTER[DEFAULT_NETWORK]"] in my template.
I really don't know what's the best approach for this. Perhaps I'm missing something obvious or it's simply something not possible.
Thanks
Simon
#6 Updated by Ruben S. Montero about 8 years ago
Yes you are right, I was thinking of #1773