Issue #16491 has been reported by R.I. Pienaar. ---------------------------------------- Bug #16491: Create a standalone API to manage the Puppet lock files, pid files and status files https://projects.puppetlabs.com/issues/16491
Author: R.I. Pienaar Status: Unreviewed Priority: Normal Assignee: Category: Target version: Affected Puppet version: Keywords: Branch: The behavior of pid files and lock files is quite complex and changes between versions and platforms. Other applications rely on these behaviors as an API for their monitoring and management of the agents. A light weight Ruby API should be written that expose the following information/abilities: * Lock the agent, with a message * Unlock the agent * Trigger a run with common used features like limited tags, foreground, background and signal the already running agent in the process list * Obtain a list of managed resources, how many managed resources and if a specific resource is managed on this node * When a catalog was last applied in unix epoch time, and how many seconds ago that was * The current lock message for versions of puppet that supports that * Is the agent stopped - not applying any catalog * Is the agent idling - stopped and there is a daemon process in the ps tree * Is it enabled? * Is it disabled? * Is the daemon present in the process list? * A way to load the last_run_summary that normalizes the data ensuring at least the main keys are always present I've written the beginnings of such a library at https://github.com/ripienaar/puppet_agent_mgr but it has some short comings: * No windows support yet - need to supply a couple of methods * This kind of library *must* read the main puppet.conf that the agent would read and it must read the right section from that file, I dont know how to do this * The runonce method should be improved to support more common behaviors I can complete the work to support the various behaviors but we should probably have a discussion about the requirements others have and around the basic approach - I am re-implementing a lot of stuff no doubt already present in the Puppet libraries and we might be able to DRY this up without sacrificing speed. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
