chronos icon indicating copy to clipboard operation
chronos copied to clipboard

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

Open gengmao opened this issue 8 years ago • 1 comments

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.

gengmao avatar Feb 16 '17 19:02 gengmao

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.

brndnmtthws avatar Feb 17 '17 17:02 brndnmtthws