On Tue, Aug 25, 2009 at 10:23:47AM +0100, Luca Bigliardi wrote:
> On Tue, Aug 25, 2009 at 9:29 AM, Iustin Pop<[email protected]> wrote:
> 
> > Please modify this to explain that the removed node is getting a
> > 'special treatment' :)
> 
> Right.
> 
> >> @@ -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?
> 
> Right: it's a POST hook. What about calling a PRE phase on the removed node
> (but not here, as the first instruction in Exec)?

Wait. I feel this is a moving target now :)

What is wrong with simply logging but otherwise ignoring the errors from
this?

I'm fine to make the 'pre' hooks run on the target node as well, but
that should be done using the normal mechanisms, not another hack.

iustin

Reply via email to