Issue #16217 has been updated by Charlie Sharpsteen.
Redmine Issue [#16217](http://projects.puppetlabs.com/issues/16217) has been migrated to JIRA: <https://tickets.puppetlabs.com/browse/MCO-49> ---------------------------------------- Feature #16217: scheduled and long running jobs should be supported https://projects.puppetlabs.com/issues/16217#change-101429 * Author: R.I. Pienaar * Status: Accepted * Priority: Normal * Assignee: R.I. Pienaar * Category: Core * Target version: 2.3.x * Keywords: backlog * Branch: * Affected mCollective version: ---------------------------------------- at present mcollective only support real time or near real time actions. Specifically long running actions arent well supported as the actions are run inside a ruby thread inside the mcollective process, this make them vulnerable to the mcollectived process being restarted by something like Puppet and in general they just dont really work inside a ruby thread. We'd like to add a few extra features: * The ability to schedule an action to be run at some future time * The ability to mark an action as background or long running so it will be run in some other forked processes disassociated from mcollectived The 2 cases are more or less the same thing, the 2nd is a scheduled job for 'now' run in the same infrastructure as the first. This will mean we need some 2nd daemon to supervise these jobs eventually this daemon will be in something like C and mcollectived will start it on demand. In future we'd add: * Ability to have a series of dependant jobs scheduled where dependencies are single-host only * Ability to have repeating jobs schduled The RPC library should be extended so that using the existing RPC library any action can be scheduled in this way, mock up UI might be: <pre> mco rpc package yum_update --at="4 am" Action scheduled for 2012-09-04 04:00 with id: 93db89f4ba575b09804ea91197222cd5 </pre> Using this ID the user should then later be able to do normal Edit/Delete/Update/Status actions: <pre> mco rpc package yum_update --status=93db89f4ba575b09804ea91197222cd5 </pre> this command will return the exact same data structures and show the exact same output as if the command was a normal RPC request run right now thus reusing most existing knowledge in interacting with agents. Incomplete/Not run yet jobs will return 'failed' statusses via the usual error reporting For other actions like edit/delete a separate agent could probably stand in rather than give all agents the ability to perform these functions but that's unsure at present <pre> mco schedule delete 93db89f4ba575b09804ea91197222cd5 mco schedule update 93db89f4ba575b09804ea91197222cd5 --at "5am" mco schedule status 93db89f4ba575b09804ea91197222cd5 mco schedule list </pre> alternatively if all agents could do their own thing we might end up in a place where you can only edit jobs using the agent that created them, not sure if that's desirable. This ticket is just a placeholder for the basic overview of the feature, dependant tickets will be created for individual actions -- 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 unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.