* Guido Trotter <[email protected]> [2013-11-01 15:57:07 +0100]:

> Shouldn't they be actually reserved, but removed on node
> removal/modification or cluster modify?
> 

Makes sense but this is a rather big patch that should probably go to
master. I can give it a try for master, but I think we should merge this
patch to stable-2.10 to fix the aforeamentioned problem and make the
use case manageable.

Thanks,
dimara

> Thanks,
> 
> Guido
> On 1 Nov 2013 15:24, "Dimitris Aragiorgis" <[email protected]> wrote:
> 
> > Currently, upon network creation, nodes' and master's IPs
> > are reserved in the pool.
> >
> > This leads to pool reservations ('X' in map) that cannot be changed
> > afterwards, although they may need to (e.g. in case of node
> > removal/modification). Also, these IPs are not actually handled by
> > Ganeti in the sense that they are not assigned to the cluster's VMs.
> >
> > Thus, we should mark the as externally reserved and not just reserved.
> >
> > Signed-off-by: Dimitris Aragiorgis <[email protected]>
> > ---
> >  lib/cmdlib/network.py |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/cmdlib/network.py b/lib/cmdlib/network.py
> > index 4f172a4..01bd948 100644
> > --- a/lib/cmdlib/network.py
> > +++ b/lib/cmdlib/network.py
> > @@ -169,7 +169,7 @@ class LUNetworkAdd(LogicalUnit):
> >          for ip in [node.primary_ip, node.secondary_ip]:
> >            try:
> >              if pool.Contains(ip):
> > -              pool.Reserve(ip)
> > +              pool.Reserve(ip, external=True)
> >                self.LogInfo("Reserved IP address of node '%s' (%s)",
> >                             node.name, ip)
> >            except errors.AddressPoolError, err:
> > @@ -179,7 +179,7 @@ class LUNetworkAdd(LogicalUnit):
> >        master_ip = self.cfg.GetClusterInfo().master_ip
> >        try:
> >          if pool.Contains(master_ip):
> > -          pool.Reserve(master_ip)
> > +          pool.Reserve(master_ip, external=True)
> >            self.LogInfo("Reserved cluster master IP address (%s)",
> > master_ip)
> >        except errors.AddressPoolError, err:
> >          self.LogWarning("Cannot reserve cluster master IP address (%s):
> > %s",
> > --
> > 1.7.10.4
> >
> >

Attachment: signature.asc
Description: Digital signature

Reply via email to