* Michele Tartara <[email protected]> [2013-12-10 10:34:11 +0100]:

> On Tue, Dec 10, 2013 at 10:14 AM, Dimitris Aragiorgis <[email protected]> wrote:
> > Commits 5dbee5e and cce4616 fix disk upgrades concerning params
> > slot. Since 2.7 params slot should be empty and gets filled
> > any time needed.
> >
> > Still ext template allows passing arbitrary params per disk.
> > These params should be saved in config file for future use.
> > For instance if we have the shared-filer provider and we
> 
> s/shared-filer/shared-file/
> I'll change it while pushing.
> 

I was talking about that:

https://groups.google.com/forum/#!searchin/ganeti-devel/shared-filer/ganeti-devel/kGTje2FP94k/in8s6RVFQqQJ

which currenly is out dated. The up-to-date source along with other
providers is kept under:

https://code.grnet.gr/git/extstorage

Thanks,
dimara

> > specify shared_dir param during instance create, this param
> > is needed when we want to attach the disk e.g., during
> > retrieving instance info. If it gets overridden during a daemon
> > restart or a config reload we fail to get the instance's info.
> >
> > To avoid such a failure, we set params slot to an empty dict
> > only if params not found in the first place.
> >
> > Signed-off-by: Dimitris Aragiorgis <[email protected]>
> > ---
> >  lib/objects.py |    7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/objects.py b/lib/objects.py
> > index 1c8de13..358f108 100644
> > --- a/lib/objects.py
> > +++ b/lib/objects.py
> > @@ -828,7 +828,12 @@ class Disk(ConfigObject):
> >          child.UpgradeConfig()
> >
> >      # FIXME: Make this configurable in Ganeti 2.7
> > -    self.params = {}
> > +    # Params should be an empty dict that gets filled any time needed
> > +    # In case of ext template we allow arbitrary params that should not
> > +    # be overrided during a config reload/upgrade.
> > +    if not self.params or not isinstance(self.params, dict):
> > +      self.params = {}
> > +
> >      # add here config upgrade for this disk
> >
> >      # If the file driver is empty, fill it up with the default value
> > --
> > 1.7.10.4
> >
> 
> LGTM, thanks.
> 
> Michele
> 
> -- 
> Google Germany GmbH
> Dienerstr. 12
> 80331 München
> 
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschäftsführer: Graham Law, Christine Elizabeth Flores

Attachment: signature.asc
Description: Digital signature

Reply via email to