LGTM, thanks On Tue, May 5, 2015 at 4:03 PM, 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote:
> We only acquired a config lock if it was not shared in order > to have lock-free reads. Hence, only release the config lock > if we actually acquired it. > > Signed-off-by: Klaus Aehlig <[email protected]> > Reviewed-by: Niklas Hambuechen <[email protected]> > > Cherry-picked-from: 35056743 > Signed-off-by: Klaus Aehlig <[email protected]> > --- > lib/config.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/config.py b/lib/config.py > index af0e650..da0a007 100644 > --- a/lib/config.py > +++ b/lib/config.py > @@ -2844,7 +2844,7 @@ class ConfigWriter(object): > logging.critical("Can't write the configuration: %s", str(err)) > raise > finally: > - if not self._offline: > + if not self._offline and not self._lock_current_shared: > try: > self._wconfd.UnlockConfig(self._GetWConfdContext()) > except AttributeError: > -- > 2.2.0.rc0.207.ga3a616c > > Hrvoje Ribicic Ganeti Engineering 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 Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
