mesos / chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
http://mesos.github.io/chronos/
Apache License 2.0
4.38k stars 529 forks source link

Upgrade from chronos 2.4 to 3.0 and found jobs with space in their names can't be scheduled #805

Open gengmao opened 7 years ago

gengmao commented 7 years ago

Chronos 3.0 UI prevents to create a job with space in their name. But when upgrading from old Chronos with jobs definition already in zookeeper, Chronos didn't complain these jobs with space in their names, but silently stopped scheduling them. It just left some logs like below:

23:46:15.321 [Thread-393] INFO org.apache.mesos.chronos.scheduler.jobs.TaskManager - High priority queue contains task: ct:1487202374429:0:somejob prod:
23:46:15.321 [pool-4-thread-1] INFO org.apache.mesos.chronos.scheduler.jobs.JobScheduler - Reloading jobs
23:46:15.326 [pool-4-thread-1] INFO org.apache.mesos.chronos.scheduler.jobs.JobScheduler - jobsToRun.size=2, jobsNotToRun.size=4
23:46:15.326 [pool-4-thread-1] INFO org.apache.mesos.chronos.scheduler.jobs.JobScheduler - Scheduling:somejob prod
23:46:15.326 [pool-4-thread-1] WARN org.apache.mesos.chronos.scheduler.jobs.TaskManager - JobSchedule 'somejob' no longer registered.
23:46:15.326 [pool-4-thread-1] INFO org.apache.mesos.chronos.scheduler.jobs.JobScheduler - Scheduling:somejob staging

"somejob prod" and "somejob staging" are two jobs we have. They work fine in Chronos 2.4.0.

This issue is trivial to workaround. I just want to raise it here so that others can aware and avoid it.

I found https://github.com/mesos/chronos/blob/master/docs/docs/api.md in master mentioned job name criteria.

name: The job name. Must match the following regular expression: ([\w.-]+)

It would have been better if release notes or change logs mentioned this backward incompatibility change explicitly.

brndnmtthws commented 7 years ago

The intention was to change it in the API so you can't add new jobs with spaces in the name, but allow existing jobs to continue working. The space in job name issue has long been a nuisance.