[one-dev] proof of concept implementation of EXTERNAL leases
Steven Armstrong
steven-opennebula at armstrong.cc
Thu Jan 16 12:36:57 PST 2014
Ruben S. Montero wrote on 01/16/2014 05:47 PM:
> Hi Steven,
>
Hi Ruben
> Again, I've got sidetracked by other (less interesting) things... Anyway, I
> want to clear this to have something for 4.6.
>
> You are right IPs, are not used by ONE core. The IP's assgined by
> OpenNebula are used only to pass a meaningful value to the VM through
> context.
>
> We could decouple this, as in #2545. However, you need to know the MAC
> addresses before hand or set them in the vnets.
If I understand the proposal in #2545 the idea is that ONE should take
care of generating the mac addresses if it manages L2. At least this is
how I would implement it. So as a user I can:
> ONE please create a vm for me with a nic
< here you are, MAC for nic is 52:54:00:35:02:F5
# optional if ONE also manages L3
> ONE please also give my nic an ip
< here you are, IP for 52:54:00:35:02:F5 is 10.0.23.42
Ideally there would be hooks that are called when nics are
created/destroyed. And more hooks that are called when a nic is
assigned/unassigned to a vm.
So in a hook i would get infos about the vm and the nic/mac-lease. I
could use this to allocate an IP for $mac. And when the nic is assigned
to a vm I can configure dns if the vm has a HOSTNAME configured or
generate one based on IP otherwise.
L2 + vlan tagging + hooks = vm-is-just-like-hardware
L2 + L3 + hooks = vm-is-more-like-cloud-thinggy
Maybe I'm missing some things, but to me this seems like it gives
maximum flexibility and can handle any use case.
> In the current setup we
> could:
> 1.- DHCP is configured with a given map (MAC-IP)
> 2.- Define a network of type fixed. Each lease is a mac address and ip
> address, those defined in the DHCP map.
> 3.- Add the the required A register in DNS server for the IP
>
> Note that Option 2 will work with opennebula 4.x. Also note that 2 can be
> easily auotmated using the cli or the API. Is that acceptable for your use
> case?
Yes. I actually decided to implement it just like you proposed for the
moment.
Cheers,
Steven
More information about the Dev
mailing list