Reputation: 10460
I have this in my event log for one of my nodes in the puppet dash board:
Changed (1)
Service[openstack-keystone] (/etc/puppetlabs/puppet/modules/keystone/manifests/init.pp:129)
Property Message
ensure ensure changed 'stopped' to 'running'
But how can I see what actually command puppet is using to change the service's state from stopped to running? And how can I change it, if I don't think puppet is doing the correct thing?
Upvotes: 0
Views: 978
Reputation: 1166
You can run puppet agent -t --debug
to manually start a puppet run and see the commands being run.
To change the commands, you can consider specifying the provider
or the start
, stop
, status
, and restart
commands on the service resource. Check out the type reference for more information on the service type's parameters.
Upvotes: 4
Reputation: 156
1)If you want to see the background work of puppet means how it is applying the catalog.
step1) Stop the puppet master and client daemon. eg:/etc/init.d/puppetmaster stop. step2) Run the puppet master and puppet agent as a foreground process to see the - puppet master --no-daemonize (run master as foreground process) - puppet master --debug --no-daemonize (To debug the puppet master) - puppet agent --no-daemonize (run agent as foreground) - puppet agent --debug --no-daemonize (run as foreground and debug)
2) If you think puppet is not doing this properly, you can write your own DSL with puppet types and provider or go with the EXEC to execute commands.Even though if you feel that it is not working as yo then you can write the script to execute on agent nodes.
Upvotes: 1