Hammer host puppetrun

Hi everyone,

I'm using hammer-cli to provision a VM doing "hammer host puppertrun
–name=XXXX" within a Continuous Delivery tool (ie, Jenkins).
This command returns 0 exit code when this "puppet run" reaches the VM and
gets executed, or !=0 otherwise. In other words, this task goes green/red.

However, if the "puppet run" crashes when installing stuff ( because of bad
modules, different errors,…), hammer-cli doesn't notice it, because
hammer-cli process doesn't wait puppet to finish, but just to be executed
into the VM.

Is there any 'easy' way to fix it? or add it to the roadmap?
Does anyone need the same functionality as us? It is very useful for
continuous delivery.

Regards!

> However, if the "puppet run" crashes when installing stuff ( because of bad
> modules, different errors,…), hammer-cli doesn't notice it, because
> hammer-cli process doesn't wait puppet to finish, but just to be executed
> into the VM.
>
> Is there any 'easy' way to fix it? or add it to the roadmap?

Last week we merged new configuration value for smart-proxy which
introduces new option puppetssh_run which makes smart proxy to wait for
the command and report the result back:

https://github.com/theforeman/smart-proxy/pull/219

You can either wait for 1.7 release or apply the patch and test it
yourself. I think this could make the CLI wait. If not, you want maybe
to make a patch to CLI to add a new option (–wait) for this. PR would
be appreciated.

LZ

··· -- Later, Lukas #lzap Zapletal