Page MenuHomePhabricator

PAWS cron functionality
Closed, DeclinedPublic

Description

The ability to control when a job is run, periodically, would help PAWS meet the needs of typical bot operators.

https://github.com/kubernetes/features/issues/19 is the Upstream tracker for this.

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added projects: PAWS, Upstream.
jayvdb subscribed.

@yuvipanda , Have you had a chance to look at this now that the pull request upstream has been merged?

The doc was just a proposal, the implementation hasn't been merged yet.

Oh... is there another upstream ticket we can follow?

It's scheduled for 1.3, which is a few months away.

Any updates on this? Is it currently possible to run code in paws automatically?

Chicocvenancio changed the task status from Open to Stalled.Feb 26 2018, 10:53 PM
Chicocvenancio triaged this task as Medium priority.

We're still waiting for upstream here, unless I'm misreading the relevant issues.

Chicocvenancio changed the task status from Stalled to Open.Mar 11 2019, 1:27 PM
Chicocvenancio claimed this task.

(arg, I had this as draft for some 6 months (Yay phab draft save))
I was misreading the relevant issues. It is beta, but CronJobs are working in Kubernetes. There is no extension to jupyterhub to create CronJobs that I'm aware of, however, so this task is to either find such extension and configure it into PAWS, or develop one ourselves.
Requirements:

  • Allow users to run notebooks on a schedule, like Cron
  • Allow users to run arbitrary terminal commands that can be run from PAWS' terminals on a schedule
  • Allow access to delete or edit scheduled CronJobs
  • Only allow users access to their own CronJobs
  • Do so securely (don't leak k8s credentials, don't give full access k8s cluster, etc)

Help would be much appreciated, brainstorming alone will be a big help right now.

As I can see notebooks are killed after some time when the terminal was closed the job was killed and local data file saved in the the default data folder was deleted. How may a cron job run if a normal cannot if it is offline.

As I can see notebooks are killed after some time when the terminal was closed the job was killed and local data file saved in the the default data folder was deleted. How may a cron job run if a normal cannot if it is offline.

Well, just like you might have ssh timeouts and cron still works on a server. To be honest I fail to see any correlation between culling servers and using k8s CronJobs in PAWS.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years (see emails sent to assignee on May26 and Jun17, and T270544). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be very welcome!

(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

As it stands in today's deployment PAWS exists as an easily redeployable project that doesn't have much logic for scheduled or continuously running jobs (indeed pods are shut down by jupyter periodically). Adding this would step away from this paradigm complicating simple redeployment for upgrades and changes. As a result this seems out of scope for PAWS. I will close this on such grounds, though if further discussion is needed please reopen.

I mentioned https://blog.jupyter.org/introducing-jupyter-scheduler-f9e82676c388 as a possible solution for this long standing feature request in a recent Toolforge council meeting.