[one-users] opennebula: lease creation and usage

Carlos Martín Sánchez cmartin at opennebula.org
Fri Mar 23 05:33:31 PDT 2012


Hi,

Indeed, it is a bug. We have opened a ticket [1], it will be solved for the
next 3.4 version.

Thank you!

[1] http://dev.opennebula.org/issues/1178
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>



2012/3/23 Stéphane Bulot <stephane at altern-it.com>

> Hi Carlos,
>
> Thanks for your answer.
> I was wrong using LEASE instead of LEASES. I find it a little bit
> confusing. I followed your advices and it is indeed much better.
> Unfortunatly, I've noticed something that looks like a bug in lease
> management: if I try to create a new vm with a template already used by
> another running vm (with lease reservation), the vm is not created (as
> expected), but the lease is freed (not expected).
>
> Tell me what you're thinking about this.
>
> Here's the way to reproduce:
> -First, I create a vm from my template, with the following NIC
> NIC = [ NETWORK_ID = 5,
>         MODEL=virtio,
>         IP=X.X.X.1 ]
> When I do a "onevnet show 5", I see that lease associated with this IP is
> used.
> -Then, I create another vm from the same template (for test purpose). As
> expected, the vm is not created, because lease is already in use. At this
> moment, if I do "onevnet show 5", the lease is not used anymore.
>
> -Finally, because lease has been freed, I'm able to create another vm with
> the template.
>
> Best regards.
> Stephane
>
>
>
> 2012/3/20 Carlos Martín Sánchez <cmartin at opennebula.org>
>
>> Hi Stéphane,
>>
>> I can see some problems with the templates you are pasting:
>>
>> - Your VNet template must use the LEASES attribute instead of LEASE, take
>> a look at the examples in the doc. [1]
>>
>> - Inside VM/NIC, NETWORK_UID must be combined with the NETWORK attribute.
>> If you want to provide the VNET ID, then you need to use  the attribute
>> NETWORK_ID [2].
>>
>> - In VM/NIC, the MAC must not be set manually if you are requesting a
>> Lease from a VNet. It is also a restricted attribute, what means that your
>> template will only work for oneadmin. Instead, request an specific Lease
>> from your VNet using the IP attribute [3].
>>
>> Regards
>>
>> [1] http://opennebula.org/documentation:rel3.2:vnet_template
>> [2]
>> http://opennebula.org/documentation:rel3.2:template_simple#network_section
>> [3] http://opennebula.org/documentation:rel3.2:template#network_section
>> --
>> Carlos Martín, MSc
>> Project Engineer
>> OpenNebula - The Open-source Solution for Data Center Virtualization
>> www.OpenNebula.org | cmartin at opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
>>
>>
>>
>> On Mon, Mar 19, 2012 at 4:22 PM, Stéphane Bulot <stephane at altern-it.com>wrote:
>>
>>> Hello,
>>>
>>> I'm trying to create and use leases on virtual network. My issue is that
>>> I'm not able to associate lease with virtual machines.
>>>
>>> My virtual network template:
>>> NAME = "MYNet"
>>> TYPE = FIXED
>>> BRIDGE = br191
>>> LEASE =[ IP=X.X.X.2,MAC=02:00:0A:01:5B:02]
>>> LEASE =[ IP=X.X.X.3,MAC=02:00:0A:01:5B:03]
>>> LEASE =[ IP=X.X.X.4,MAC=02:00:0A:01:5B:04]
>>>
>>> Virtual network creation seems to be ok, but If I do a "onevnet show ID
>>> -x", I can see that my leases existing in virtual network template, but not
>>> as a free lease.
>>>
>>> Here is my vm template NIC section:
>>> NIC = [ NETWORK_UID=4,
>>>         MODEL=virtio,
>>>         MAC=02:00:0a:01:5b:02]
>>>
>>> where NETWORK_UID is the network id defined above.
>>>
>>> After starting VM, lease is still seen as a template.
>>> As I manually create lease with onevnet addleases command, I'm able to
>>> see lease as a free lease, but after starting VM, lease is still seen as
>>> free lease.
>>>
>>> Purpose of using lease is to prevent multiple vm started with same
>>> MAC/IP.
>>>
>>> Did I miss something?
>>>
>>> Thanks in advance
>>> --
>>> Stéphane Bulot
>>> ***
>>> **44, avenue Dumotel
>>> 94230 CACHAN
>>>
>>> Tél: 01 83 62 06 87
>>> Mob: 06 87 02 73 79
>>> web: http://www.altern-it.fr <http://www.altern-it.com/>
>>> e-mail: stephane at altern-it.com**
>>>
>>> *
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>>
>>
>
>
> --
> Stéphane Bulot
> ***
> **44, avenue Dumotel
> 94230 CACHAN
>
> Tél: 01 83 62 06 87
> Mob: 06 87 02 73 79
> web: http://www.altern-it.fr <http://www.altern-it.com/>
> e-mail: stephane at altern-it.com**
>
> *
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120323/a944561f/attachment.htm>


More information about the Users mailing list