« Previous | Next » 

Revision 031d2db1

ID031d2db16fde03f7919b7732809caaec51d64cb4
Parent 28d466dc
Child 508b9539

Added by Dimitris Aragiorgis over 10 years ago

Allow instances to obtain externally reserved IPs

The administrator should be able to assign an externally reserved IP
to a Ganeti instance manually, if desired. Currently this is not
supported. External reservations should act as holes in the pool and
not just as IPs already used by someone outside of Ganeti.
Automatic allocation with ip=pool will continue to exclude those IPs
as happens now.

To allow such functionality the administrator needs to pass explicitly
the desired IP along with the ``--no-conflicts-check`` option, or else
an error will be produced as happens now.

The aforementioned require the following changes:

- Make IsReserved() to look either in reservations or external ones.
- Make Reserve() and Release() to use IsReserved() with external
argument True or False.
- Pass extra option to ReserveIp() to bypass checking of external reservations
- Update man pages and design doc for this change.

Furthermore, a side effect of this patch is that it fixes the
following problem:
Currently, one could not mark an IP as external if it was already
reserved (i.e. belonged to an instance). The code would produce a warning
and fail silently.

Fix config_mock.py so that if network and ip is given then reserve it in
the pool.

Signed-off-by: Dimitris Aragiorgis <>
Signed-off-by: Thomas Thrainer <>
Reviewed-by: Thomas Thrainer <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences