Why does cancel build trigger before-provision foreman-hook scripts?

In this thread from April 2013 it came to light that cancel build triggers before-provision scripts. It still does in v1.15. Is this by design?
What kind of host/managed event is triggered only after the wget foreman-built call but not on cancel build?

I found the commit which should change the bug reported in the thread:

commit d38357213db59dff6ffa45c27a4450e414fa9225
Author: Dominic Cleal <dcleal@redhat.com>
Date:   Thu Apr 18 10:51:29 2013 +0100

    Change AR::Observer to basic AS::Callbacks registration
    This fixes the case where AS::Callbacks are used for host build/provision
    hooks, which don't fire on AR::Observers.
    Change include method to hook loading of missing constants to handle class
    reloads in development.  Thanks to Ivan Necas for this technique.

It appears to be in version v0.3.2 and later.

Anyway, I am afraid we don’t have such an option to do that, both calls are the same source. Foreman hooks plugin does not allow you to hook anything, it’s built on top of ActiveRecord and these are its limits.

1 Like