Puppet : system commands' trace

asked 2017-02-22 03:53:17 -0600

craymore gravatar image

Hell all puppeteers !

I recently had to do some tricky troubleshooting regarding some puppet resources which were failing.

While I ultimately found the culprit and fixed the issue, it got me thinking about one important thing :

What if I had the ability to see the full commands -- incl. args -- puppet is really running behind the scenes ?

e.g :

  • for a puppet cron resource, see the full [ /usr/bin/crontab "..." ] command

( the --debug, --trace and --test flags do not provide such feature unfortunately, hence the question )

edit retag flag offensive close merge delete


General approaches: Use `strace(1)`. Inspect `procfs(5)`. Patch puppet's source code.

Kai Burghardt gravatar imageKai Burghardt ( 2017-02-25 18:22:17 -0600 )edit

I was hoping that there would be a much simpler way of seing commands such as mkdir / crontab / chown etc. ( what you are proposing is a really 'low-level' approach )

craymore gravatar imagecraymore ( 2017-02-27 02:57:23 -0600 )edit