« Previous | Next » 

Revision 17b07758

ID17b07758365d1ee07e31528ee3e290444aa07e0b

Added by Dimitris Aragiorgis over 10 years ago

Change logic in pool reservations

Make IsReserved() to look either in reservations or external ones.
Make Reserve() and Release() to use IsReserved() with external
argument True or False.

With this change if ip=pool ganeti will still assign an IP
that is available in the pool (where pool is reservations || ext_reservations).
If ip=XXX then it will check if XXX is reserved only in reservations and raise
the appropriate error.

One can modify externally reserved IPs on demand without checking reservations.
This way can an IP be assigned to an Instance and then marked as external.
Doing that we ensure that after instance removal the IP will be not inside
the pool.

The only restriction that remains is that you cannot have two instances
on the same network with the same IP (probably used for load balancing etc)
but this would make _WriteConfig print warnings too.

Signed-off-by: Dimitris Aragiorgis <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences