Why Kickstart default finish does not have /unattended/built call?

Hey, @kgaikwad pointed out on an interesting fact I am not able to resolve. Our template “Kickstart default finish” don’t have “call home” or it’s so hidden I am missing it. All other finish templated do have it, but “Kickstart default finish” don’t have it from the very beginning (54715f70fb1e62).

Can someone explain me how this is supposed to work? Maybe the puppet agent is supposed to flip build flag when new report comes in? Or do we have some code in Foreman core which flips the build flag back when finish template return zero?

(Head-scratching meme…)

1 Like

Thank you @lzap for raising this query here.

Some references which I found while debugging this scenario:
In setSSHProvision, it calls client.deploy!and based on result it calls built method on host.
Inside deploy! method, it run command which contents exit $(cat #{remote_script}.status)

1 Like

Oh ok that makes sense, so I am creating a patch that will sync up all finish templates and drops a comment so there are no surprises anymore.


logs for future reference:

08:25:23 rails.1 | 2019-07-22T08:25:23 [D|app|5397953d] about to execute sudo sh -c ‘(chmod 0701 ./bootstrap-helen-billiel && sudo ./bootstrap-helen-billiel ; echo $? >bootstrap-helen-billiel.status) 2>&1 | tee bootstrap-helen-billiel.log; exit $(cat bootstrap-helen-billiel.status)’

1 Like

Guys, I have finally figured out why we have built calls in finish scripts. These are used both in image-based provisioning when Foreman scp them, however they are also used for Debian provisioning to “finish off” provisioning since debian installer does not allow arbitrary scripts (only short commands). Hence the name. The same applies for Free BSD. I don’t often test Debian or BSD therefore I was confused.