« Previous | Next » 

Revision e5370111

IDe53701112dd5e48fd0e2fcce880d3994569a4923

Added by Dimitris Aragiorgis about 7 years ago

(2.10) 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 <>

Conflicts:
test/py/cmdlib/testsupport/config_mock.py

Signed-off-by: Dimitris Aragiorgis <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences