On Tue, Aug 25, 2009 at 12:12:28PM +0100, Luca Bigliardi wrote:
> On Tue, Aug 25, 2009 at 9:29 AM, Iustin Pop<[email protected]> wrote:
> 
> >> @@ -2198,6 +2199,10 @@ class LURemoveNode(LogicalUnit):
> >>
> >>      self.context.RemoveNode(node.name)
> >>
> >> +    # Run hooks on the node before it's removed
> >> +    hm = self.proc.hmclass(self.rpc.call_hooks_runner, self)
> >> +    hm.RunPhase(constants.HOOKS_PHASE_POST, [node.name])
> >
> > This can raise errors here, which would abort the operation. Since this
> > is a 'post' hook, I think we should just log, not abort the actual
> > removal.
> >
> > What do you think?
> 
> Mhh I did miss HooksMaster is raising exceptions only in PRE phase.. mhh..

Oh, no, I did miss it. This is post, so no exception should be raised.

> So, is a 'try ... finally' block enough for this?

Yes. Just to be sure.

iustin

Reply via email to